aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Aimnova site navigation

Stay in the loop

Get the latest study resources and updates

New features, study tips and exam insights — straight to your inbox.

IB Diploma

  • IB Past Papers
  • IB Study Notes
  • IB Question Bank
  • IB Mock Exams
  • IB Revision

IB Subjects

  • IB Math AA
  • IB Math AI
  • IB Economics
  • IB Business Management
  • IB Physics
  • IB Biology
  • View all IB subjects→

IB Past Papers

  • IB Math AA HL Past Papers
  • IB Math AA SL Past Papers
  • IB Math AI HL Past Papers
  • IB Math AI SL Past Papers
  • IB Economics HL Past Papers
  • IB Economics SL Past Papers
  • IB ESS Past Papers
  • View all past papers→

Study Resources

  • Study Notes
  • Question Bank
  • Mock Exams
  • Flashcards
  • Revision Guide
  • Exam Skills
  • Command Terms
  • Grade Calculator
  • Exam Timetable 2026

Aimnova

  • Features
  • Pricing
  • For Schools
  • For Parents
  • About Us
  • Blog
  • Contact
aimnova.

AI-powered study platform for smarter revision, past-paper analysis and examiner-style feedback.

TermsPrivacyCookies·© 2026 Aimnova. All rights reserved.8afc4e3

Aimnova is not affiliated with or endorsed by the International Baccalaureate Organization (IB).

NotesComputer Science HLTopic 4.3Linear regression
Back to Computer Science HL Topics
4.3.14 min read

Linear regression (Computer Science HL)

IB Computer Science • Unit 4

AI-powered feedback

Stop guessing — know where you lost marks

Get instant, examiner-style feedback on every answer. See exactly how to improve and what the markscheme expects.

Try It Free

Contents

  • A line through the data
  • How the line is chosen
  • When it works and when it does not
  • Exam-style question
The big idea: Linear regression predicts a continuous number by fitting a straight line through the data.

The model is just — and training means finding the and that make the line fit best.

What makes it regression rather than classification

  • The output is a number on a scale — price, temperature, minutes, marks
  • Not a category — spam or not, cat or dog, pass or fail
  • "How much?" is regression · "which one?" is classification
  • The same input data can support either, depending on what you ask

Free preview

This is the free notes preview

You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:

  • FlashcardsLock in vocabulary and key terms with spaced repetition.
  • Practice questionsAnswer exam-style questions and get instant AI marking.
  • Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
  • Personalised study planA daily plan built around your exam date and weak areas.
Start Studying Free Full access to Aimnova Pro · cancel anytime
1

Measure the error

2

Square it

3

Minimise the total

4

Read off the parameters

The gradient is the interpretation: In a model predicting house price from floor area, m is the price per square metre.

That is why regression is prized where a decision has to be explained: the parameter itself is a plain-English statement about the world.
Squaring is why outliers hurt: An error of 10 contributes 100; an error of 100 contributes 10,000. One wildly wrong point can drag the whole line towards itself, which is why outliers matter so much more here than in some other methods.

Practice with real exam questions

Answer exam-style questions and get AI feedback that shows you exactly what examiners want to see in a full-marks response.

Try Practice FreeYour first topic is free to keep • No credit card required
WorksFails
RelationshipRoughly straightCurved, or a threshold effect
OutputContinuousCategories
OutliersFewAny — squaring amplifies them
ExtrapolationInside the observed rangeOutside it — the line keeps going, reality may not
Extrapolation is the classic failure: A line fitted to house sizes between 50 and 200 m² will happily predict a price for 5,000 m², or a negative price for 0 m².

The model has no concept of the range it was trained on. Predicting outside it is the commonest way regression gives an absurd answer with full confidence.
Correlation is not causation: A regression showing ice-cream sales predicting drownings has found a real correlation with a third cause — hot weather. The model is not wrong; the causal reading of it is.

How this is tested — you must decide whether the target is continuous, interpret the gradient, and know where the line stops being trustworthy. It comes up two ways:

Paper 1 Section A

  • Explain how linear regression predicts, 3-4 marks
  • Identify whether a task is regression or classification
  • State what the gradient means

Paper 1 Section B — case study

  • Interpret a fitted model in context
  • Explain why a prediction is unsafe
The classic trap: Reading a gradient as a cause. Regression finds that two things move together; it says nothing about one producing the other. Say "associated with", not "causes".
IB-style questionExplain[5 marks]

An estate agent fits price = 2400 × area + 18000, using homes between 50 and 200 m². Explain what the model says, and why its prediction for a 600 m² property should not be trusted.

Model answer plan

See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.

Claim your free topic

IB Exam Questions on Linear regression

Practice with IB-style questions filtered to Topic 4.3.1. Get instant AI feedback on every answer.

Practice Topic 4.3.1 QuestionsBrowse All Computer Science HL Topics

How Linear regression Appears in IB Exams

Examiners use specific command terms when asking about this topic. Here's what to expect:

Define

Give the precise meaning of key terms related to Linear regression.

AO1
Describe

Give a detailed account of processes or features in Linear regression.

AO2
Explain

Give reasons WHY — cause and effect within Linear regression.

AO3
Evaluate

Weigh strengths AND limitations of approaches in Linear regression.

AO3
Discuss

Present arguments FOR and AGAINST with a balanced conclusion.

AO3

See the full IB Command Terms guide →

Related Computer Science HL Topics

Continue learning with these related topics from the same unit:

4.1.1Types of machine learning
4.1.2Hardware for machine learning
4.2.1Data cleaning
4.2.2Feature selection
View all Computer Science HL topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Computer Science HL

Previous
4.2.3Dimensionality reduction
Next
Classification4.3.2

Make these notes count

Reading notes is just the start. Test yourself with IB-style questions and get feedback that shows you what examiners want.

Start FreeView All Computer Science HL Topics