Least Squares Regression Lines From Summary Statistics (Linear Regression and Residuals) | OCR B (MEI) A Level Further Maths notes
Free preview: Least Squares Regression Lines From Summary Statistics
The Line of Best Fit, Done Properly
Year 1 (AS) for OCR B (MEI), where it is in the Statistics Minor (the AS content). Edexcel teaches it in Further Statistics 2. For Edexcel and OCR A, check your own specification for whether it is taught in Year 1 or Year 2.
Ask ten people to draw a line of best fit by eye on the same scatter diagram and you get ten different lines. Which is "best"? We need a rule everyone agrees on, so that everyone gets the same line and the same predictions.
You met regression lines in A Level Maths, mostly from a calculator. Now we see what "best" means and calculate the line from summary statistics.
The words you need
- The independent (explanatory) variable x is the one controlled or measured first.
- The dependent (response) variable y is the one we want to predict.
- For each point, the vertical gap from the point to the line, , is called its residual.

Following the diagram
- The line is the regression line of y on x for the eight points from the PMCC note.
- Each short vertical segment is a residual: positive above the line, negative below.
- The least squares line is the one that makes the sum of the squared residuals as small as possible.
- Why vertical gaps? Because we are predicting y from x, so errors in y are what matter.
💡 In plain words
- b is the gradient: how much y changes, on average, when x goes up by 1.
- The line always passes through the mean point , which is how a is found.
Where the formula comes from
- It can be shown that the best line passes through . So measure from there: let and , and the line is .
- Sum of squared residuals: .
- This is a quadratic in b with positive coefficient. Its minimum is where the derivative is zero: , so .
Method: the regression line of y on x
- Find and (and ).
- .
- , using the unrounded b.
- Write with sensible rounding (3 or 4 s.f.).
👀 Watch me do it: the eight points from the PMCC note:
| What I write | Why I do it |
|---|---|
| Step 2: positive, matching the positive correlation. | |
| (using the unrounded b) | Step 3: 1.97959... times 7.5 = 14.847. |
| Regression line: | Step 4. |
✏️ YOUR TURN 1
Try this first:
For 10 pairs: . Find the regression line of y on x.
Answer:
- , .
- , .
- .
Making Predictions
Using the line
- To predict y for a given x, substitute: at x = 9, .
- Interpolation (x inside the range of the data, here 2 to 13) is fairly reliable, especially if r is close to ±1.
- Extrapolation (x outside the range) is unreliable: the pattern may not continue.
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in Linear Regression and Residuals
- Least Squares Regression Lines From Summary Statistics
- Residuals and the Residual Sum of Squares
What's inside for this topic
2 teacher notes, 104 practice questions, 45 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Next note: Residuals and the Residual Sum of Squares
Least Squares Regression Lines From Summary Statistics on other exam boards
All OCR B (MEI) A Level Further Maths topics · A Level Further Maths