The Least Squares Regression Line
The regression line of on , , is the straight line that makes the squared vertical distances from the points as small as possible. Its gradient is and it always passes through , so .
Learning objectives
- Identify the explanatory and response variables.
- Calculate and for the regression line of on .
- Interpret and in context and make predictions.
- Know when predictions are unreliable, and convert coded regression lines.
Draw a line through a scatter of points "by eye". How could you decide which of two lines fits better?
Core idea
Points on a scatter graph rarely lie on a line. Many lines could go "through the middle", but one is special: it makes the total of the squared vertical misses as small as possible. That's the least squares regression line.
with , . It passes through . Interpolate safely; extrapolate with caution.
1. The line
- where
- gradient: change in per unit of .
- intercept.
- residual
- observed − predicted.
Find the regression line of on .
- Goal
- , .
- Strategy
- Means, then formulas.
- Divide by 8.
- Gradient.
- Through the means.
2. Using it
Predict at and (data range –). Residual at ?
- Goal
- Predictions; comment; residual.
- Strategy
- Substitute.
- Interpolation: reliable.
- Extrapolation: unreliable.
- Residual: point lies below the line.
Interpret .
Summary
- ; .
- Interpolate, don't extrapolate.
- Residual
- Observed − predicted.
- Extrapolation
- Predicting outside the data.
Create a free account to read the rest of this lesson: key formulae, worked examples, explore the graph, common mistakes, exam tip, guided practice and more. Your answers are checked and your progress is saved.