← Back to course

Residuals & Model Fit

You’ll be able to

Residuals: observed minus predicted

A residual is the vertical distance between an actual data point and the regression line: residual = observed y − predicted y (y − y-hat). A positive residual means the model underpredicted (the true value is above the line); a negative residual means it overpredicted. Least-squares fitting guarantees the residuals sum to zero.

Reading a residual plot

A residual plot graphs residuals against x. If a line is a good fit, the residual plot shows random, patternless scatter around zero. A curved or U-shaped residual plot signals that the true relationship is not linear — a linear model is the wrong choice. Fanning (a change in spread) signals non-constant variability. The rule: no leftover pattern in the residuals means the model captured the pattern.

Residual
residual = y − y-hat = observed − predicted
A positive residual means the actual value lies above the line (model underpredicted); a negative residual means it lies below (model overpredicted).
Worked example

The LSRL is price-hat = 20000 − 1500·(age in years) for used cars. A 6-year-old car actually sells for $13,500. Find and interpret its residual.

  1. 1.Predict with the model: price-hat = 20000 − 1500(6) = 20000 − 9000 = 11000.
  2. 2.Compute the residual: residual = observed − predicted = 13500 − 11000 = 2500.
  3. 3.The residual is positive, so the actual price is above the line — the model underpredicted this car’s price.
Answer: The residual is 13500 − 11000 = +$2500. Because it is positive, this car sold for $2500 more than the model predicted, meaning the regression underpredicted its price.
Checkpoint

A residual plot shows a clear U-shaped (curved) pattern. What does this indicate?

Watch out

Extrapolation — using the regression line to predict outside the range of the observed x-values — is unreliable and can give absurd answers. A growth model fit to plants aged 1–30 days should not be used to predict height at 300 days. State the x-range and stay inside it.

Checkpoint

For a regression predicting weight from height, one data point has a residual of −8 pounds. What does this mean?

Answer the 2 checkpoints as you read.

Sign in to save your progress