A line of fit summarizes a scatter plot with an equation, which is a linear model you can use to predict. How well does it fit? Look at the residuals: how far each actual point is from the line.
Why it works
For each data point, the line predicts $\hat{y}$ (read “y-hat”) at that $x$. The residual is $y - \hat{y}$, actual minus predicted. A positive residual means the point is above the line, a negative one means below, and $0$ means on it. The least-squares line is the line that makes the sum of the squared residuals as small as possible; squaring keeps positive and negative misses from canceling and weighs big misses more. A good linear fit leaves residuals scattered randomly around $0$; a curved pattern in the residuals says a line is the wrong shape.
Key idea
Residual $= y - \hat{y}$ = actual $-$ predicted. Small residuals with no pattern mean the line fits well.
Worked examples
Worked example: Compute a residual
A line of fit is $\hat{y} = 4x + 48$. A student who studied $5$ hours scored $70$. Find the residual.
- Predicted: $\hat{y} = 4(5) + 48 = 68$.
- Residual: $70 - 68 = 2$.
Answer: $2$: the student scored $2$ points above the prediction.
Worked example: Read a residual pattern
Residuals in order of $x$: $-4, -1, 2, 3, 2, -1, -4$. Is the line a good model?
- The residuals go negative, then positive, then negative: a curved pattern, not random scatter.
Answer: No: the data bends, so a curve would fit better.
Common mistake
Computing residuals as predicted minus actual, which flips every sign. Residual means actual minus predicted, so a point above the line has a positive residual. Check against the picture: above the line should give a positive number.