AP Statistics · Study guide

Residual is leftover, not leftover of x.

AP® Statistics · Unit 5 · Regression Analysis

Residuals: What the Line Misses

How to compute a residual as observed minus predicted, interpret its sign as underprediction or overprediction, and use a residual plot to decide whether a linear model is appropriate.

The idea in one paragraph

A residual is what is left over after the model makes its prediction: \(\text{residual} = y - \hat{y}\), observed minus predicted. A positive residual means the model underpredicted; a negative one means it overpredicted. Plot every residual against \(x\) (or \(\hat{y}\)): random scatter around 0 confirms a linear form, while a curve says the line is missing a pattern.

1What a residual is

A residual is the difference between the observed response value and the predicted response value for the given value of the explanatory variable:

\[ \text{residual} = y - \hat{y} = \text{observed } y - \text{predicted } y \]
Figure 1. A residual is the vertical distance from a point to the regression line: observed y minus predicted y. Above the line the model underpredicts; below it the model overpredicts.
Worked Example 1 Compute and interpret a residual

A 4-year-old car

The regression line is \(\hat{y} = 25.69 - 1.583x\). One 4-year-old car sold for 21.0 thousand dollars. Find and interpret its residual.

  1. 1Predicted: \(\hat{y} = 25.69 - 1.583(4) \approx 19.36\).
  2. 2Residual \(= y - \hat{y} = 21.0 - 19.36 = 1.64\).
  3. 3Positive, so the actual price is above the prediction: the model underpredicts.
Answer: The residual is 1.64. This car sold for 1.64 thousand dollars more than the model predicts for a 4-year-old car.
Say it like this

“The residual of 1.64 means this 4-year-old car sold for 1.64 thousand dollars more than the model predicts for a car of its age.”

Common Mistake 1 · Subtracting in the wrong order

\(\hat{y} - y\) flips every sign and reverses every interpretation. The order is always observed minus predicted, the same as “actual minus expected.”

2Reading the sign

ResidualPoint isThe model
PositiveAbove the lineUnderpredicts (underestimates) y
NegativeBelow the lineOverpredicts (overestimates) y
ZeroOn the linePredicts y exactly
Worked Example 2 A negative residual

A 6-year-old car

A 6-year-old car sold for 15.0 thousand dollars. Find and interpret its residual.

  1. 1\(\hat{y} = 25.69 - 1.583(6) \approx 16.19\).
  2. 2Residual \(= 15.0 - 16.19 = -1.19\).
Answer: The residual is −1.19: this car sold for 1.19 thousand dollars less than predicted, so the model overpredicts its price.
Worked Example 3 From a residual back to the data

A 10-year-old car

The 10-year-old car has a residual of −0.46. What was its actual price?

  1. 1Residual \(= y - \hat{y}\), so \(y = \hat{y} + \text{residual}\).
  2. 2\(\hat{y} = 25.69 - 1.583(10) = 9.86\), so \(y = 9.86 + (-0.46) = 9.40\).
Answer: 9.40 thousand dollars.

3Residual plots

A residual plot is a scatterplot of the residuals against the explanatory variable (or the predicted values). It removes the overall trend so that any leftover pattern stands out. A linear regression model should only be fit to data that show a linear trend.

What the residual plot showsWhat it means
Apparent randomness around 0Confirms a linear form: the linear model is appropriate
CurvatureThe linear model is not the most appropriate model
Figure 2. A residual plot puts the residuals on the y-axis against x (or against ŷ). Apparent randomness confirms a linear form. A curved pattern, like the U shape for stopping distance, says a line misses something systematic, even though r = 0.991 there.
Figure 3. The points sit above the line at both ends and below it in the middle. That systematic up-down-up pattern becomes the U shape in the residual plot. A straight line cannot follow a curve.
Worked Example 4 Read the residual plots

Cars and stopping distance

Use Figure 2 to judge whether a linear model is appropriate for each data set.

  1. 1Cars: residuals bounce above and below 0 with no curve or trend. That randomness confirms a linear form.
  2. 2Stopping distance: residuals are positive, then negative, then positive again. That curvature means a line is not the best model, despite r = 0.991.
Answer: Linear model appropriate for the cars; not the most appropriate for stopping distance.
Common Mistake 2 · Trusting r instead of the residual plot

Stopping distance has r = 0.991, yet its residual plot curves. A large correlation says the points are close to a line; only the residual plot shows whether a line is the right shape.

Common Mistake 3 · Expecting residuals to be small to call the model linear

Residuals of ±1.6 thousand dollars are fine as long as they scatter randomly. The question for the form is the pattern, not the size of individual residuals.

On the calculator

After LinReg(a+bx) L1, L2, the calculator stores the residuals in the list RESID (2nd, LIST, NAMES). Make a STAT PLOT scatterplot with Xlist L1 and Ylist RESID to see the residual plot.

Quick reference

FactRule
Residual\(y - \hat{y}\) (observed minus predicted)
Positive residualModel underpredicts
Negative residualModel overpredicts
Actual value\(y = \hat{y} + \text{residual}\)
Residual plotResiduals vs x (or \(\hat{y}\))
Random scatterLinear model appropriate
CurvatureLinear model not the most appropriate