Residuals
| English | Chinese | Pinyin |
|---|---|---|
| residual | 残差 | cán chà |
| residual plot | 残差图 | cán chà tú |
How wrong is each prediction?
- A residual 残差 is the leftover: observed minus predicted, $y - \hat{y}$.
- It's the vertical gap between a data point and the regression line.
- Positive residual: the point sits above the line (model underpredicted).
- Negative residual: the point sits below the line (model overpredicted).
The residual plot
- A residual plot 残差图 graphs the residuals ($y$-axis) against $x$ (or against $\hat{y}$).
- It magnifies the leftover pattern the eye misses on the original scatterplot.
- Each point's height is how far off that prediction was.
- The horizontal line at residual $=0$ is "a perfect prediction."
Is a line appropriate?
- Good sign: residuals scattered randomly around zero — no leftover pattern → a line fits well.
- Bad sign: a curve or U-shape in the residuals → the true form is non-linear.
- Also watch for a fan shape (spread growing), which signals unequal variability.
- The residual plot is the deciding test of whether linear regression was the right choice.
Over- and under-prediction
- Where residuals are negative, the model overpredicts (guessed too high).
- Where residuals are positive, the model underpredicts (guessed too low).
- A stretch of same-sign residuals means the line is systematically off there.
- Random signs, small sizes → the model is doing its job.
Sign convention trips people up: a residual is observed − predicted. A positive residual means the actual value is above the line, so the model underpredicted it. And a curved residual plot is the clearest evidence that a straight-line model is wrong, even if the original scatterplot looked "close enough."
A house is predicted at $300$ but actually sells for $330$ (thousands of dollars).
- Residual $= 330 - 300 = +30$ — positive.
- The point sits above the line; the model underpredicted this house.
- If many nearby points share a positive residual, the line is biased low there.
A residual is $y - \hat{y}$ (observed − predicted): positive = point above the line (underpredicted), negative = below (overpredicted). A residual plot with random scatter around $0$ supports a linear model; a curved pattern means the relationship is non-linear and a line is not appropriate.
Residuals = vertical gaps to the line
Each point's vertical distance from the line is its residual.
A house predicted at 300 sold for 330 (thousands). What is the residual?
Residual = observed − predicted = 330 − 300 = 30.
A positive residual tells you the point is... and the model...
Observed > predicted → point above line → model underpredicted.
What does a residual plot with an obvious curved (U-shaped) pattern tell you?
A leftover curve means the true form isn't linear.
A residual plot with points scattered randomly around zero suggests a linear model is appropriate.
Random scatter, no pattern → a line fits well.
A residual is computed as observed minus ___.
Residual = y − y-hat = observed − predicted.