Line of best fit concept
Regression line: The regression line of y on x is the straight line that best fits the points.
It is used to predict y from x.
The least-squares regression line passes through the mean point (x̄, ȳ); use it to predict.
Interactive diagram
Explore the labelled diagram, charts and maps for this topic in full study mode.
| Component | Meaning |
|---|---|
| a | gradient: the change in y for each 1 of x |
| b | y-intercept: the value of y when x = 0 |
| x | the variable you know (independent) |
| y | the variable you predict (dependent) |
By eye or by GDC: A line of best fit drawn by eye goes through the mean point (x̄, ȳ) with the points spread evenly either side.
The exact regression line comes from the GDC.
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.
Least squares method
What the GDC finds: The regression line makes the squared vertical distances from the points to the line as small as possible in total ("least squares").
You never work it out by hand: the GDC does it.
Worked example — find the line
Hours of practice x: 1, 2, 3, 4, 5, 6, 7, 8
Scores y: 48, 55, 57, 63, 64, 71, 73, 79
Find the equation of the regression line of y on x.
Step by step
- Enter x in L1 and y in L2.
- Run LinReg (ax + b) on L1, L2.
- Write it as an equation, coefficients to 3 s.f.
- Check: the mean point (4.5, 63.75) is on the line.
Final answer
y = 4.17x + 45.0
Memorize terms 3x faster
Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.
Using regression for prediction
Worked example
Regression line: y = 0.8x + 1.5.
Predict y when x = 10.
Solution
- Substitute x = 10 into the equation.
- y = 0.8(10) + 1.5
- y = 8 + 1.5
- y = 9.5
Final answer
When x=10, predicted y=9.5.
Extrapolation warning: Predictions are only reliable within the range of data used.
Predicting far outside this range is risky (extrapolation).
y from x only: A y-on-x line predicts y from a value of x. It cannot reliably give x from a value of y.
When can you use the line?
In the exam: "Not appropriate" or "not valid" needs its reason: "r is too close to zero" or "x is outside the range of the data".
Know your predicted grade
Take timed mock exams and get detailed feedback on every answer. See exactly where you're losing marks.
Animated graph
Watch the graph build step by step in study mode.
See it drawn, step by step
In My Learning, handwritten diagrams build one step at a time. Play, pause and replay each explanation until it clicks. Create your free account to try it.
Get feedback like a real examiner
Submit your answers and get instant feedback — what you did well, what's missing, and exactly what to write to score full marks.
Exam-style question — iced tea [7 marks]
A café records the midday temperature, x °C, on six days and the volume, y litres, of iced tea it sells.
| x (°C) | 10 | 14 | 18 | 22 | 26 | 30 |
|---|---|---|---|---|---|---|
| y (litres) | 3.2 | 4.1 | 5.3 | 5.9 | 7.2 | 7.8 |
(a) Find the equation of the regression line of y on x. [2]
(b) Use your equation to estimate the volume of iced tea sold on a day when the temperature is 20 °C. [2]
(c) Interpret, in context, the gradient of the regression line. [1]
(d) The owner uses the line to estimate the sales on a day of 38 °C. State, with a reason, whether this estimate is reliable. [2]
Step by step
- (a) GDC: x in L1, y in L2, LinReg (ax + b). Write an equation, 3 s.f.
- (b) Substitute x = 20 into the unrounded line: about 5.58 litres.
- (c) The gradient is the change in y for each 1 °C: about 0.235 litres more iced tea for each 1 °C warmer.
- (d) Compare 38 with the data: 10 °C to 30 °C.
Final answer
(a) y = 0.235x + 0.883 (b) 5.58 litres (c) each 1 °C warmer, about 0.235 litres more iced tea is sold (d) not reliable: 38 °C is outside the data (10 °C to 30 °C), so it is extrapolation