Skip to main content

Unit 5 · Topic 5.4

5.4 Residuals

A residual is the gap between an observed value and the line's prediction: y − ŷ. Residuals tell you how far off a prediction was for one individual, and a residual plot tells you whether a line was the right model at all.

Key terms

  • residual (y − ŷ)
  • residual plot
  • underestimate / overestimate
  • curvature in a residual plot

Computing a residual

Residual = observed y − predicted y = y − ŷ. Always subtract in that order.

Using ŷ = 58.55 + 3.83x, a student who studied 5 hours and scored 74 has ŷ = 58.55 + 3.83(5) = 77.70. Residual = 74 − 77.70 = −3.70.

Interpreting residuals

In context: "This student's actual score was 3.70 points lower than the score predicted by the line for a student who studied 5 hours."

You can also work backward. If you know the residual and ŷ, the actual value is y = ŷ + residual.

  • Positive residual: the point is above the line, and the model underestimated (underpredicted) the actual value.
  • Negative residual: the point is below the line, and the model overestimated (overpredicted).
  • Zero: the point is on the line.

Residual plots

A residual plot graphs each residual (vertical axis) against x or against ŷ (horizontal axis), with a horizontal line at 0.

If the residuals look randomly scattered above and below 0, with no clear pattern, a linear model is appropriate. If they form a curve, like a U shape or an upside-down U, the relationship is curved and a line is not the best model.

Why residual plots help

A residual plot magnifies departures from a line that are hard to see in the scatterplot. For the points following y = x² at x = 1, 2, …, 8, r ≈ 0.976, but the residuals from the best line are 7, 1, −3, −5, −5, −3, 1, 7: positive at both ends and negative in the middle. That U-shape shows the line misses the curve, even though r is high.

For the hours-and-scores data, the residuals from ŷ = 58.55 + 3.83x (−0.38, −1.21, 3.79, −2.04, 1.13, 0.30, −3.70, 1.47, −0.36, 0.81) bounce above and below 0 with no pattern, so the linear model is appropriate.

Residuals from the exact least-squares line always add to 0. These add to about −0.19 only because the slope and intercept were rounded.

How big is a residual?

Judge a residual against the others. In the hours-and-scores data, most residuals are within about 2 points of 0, so −3.70 and 3.79 are among the larger misses, but neither is far from the rest. A residual several times larger than the others would mark an unusual point worth investigating.

Residual plots can also show spread that grows as x increases, a fan shape. That means predictions are less precise for larger x-values, even if a line fits the overall trend.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1Calculator allowed

    Find and interpret a residual

    Using ŷ = 58.55 + 3.83x for exam score vs. hours studied, find and interpret the residual for the student who studied 6 hours and scored 83.

    Show the solution
    1. Step 1: Predicted: ŷ = 58.55 + 3.83(6) = 81.53.
    2. Step 2: Residual: 83 − 81.53 = 1.47.
    3. Step 3: Positive, so the line underestimated this student's score.

    Answer: Residual ≈ 1.47. The student scored about 1.47 points higher than the line predicts for a student who studies 6 hours.

  2. Example 2Calculator allowed

    Work backward from a residual

    A wolf is 1.4 m long. The regression line for weight on length predicts 41.0 kg for that length, and the wolf's residual is −3.2 kg. What is its actual weight, and what does the residual say?

    Show the solution
    1. Step 1: Actual = predicted + residual = 41.0 + (−3.2) = 37.8 kg.
    2. Step 2: Negative residual: the line overestimated this wolf's weight.

    Answer: 37.8 kg. The wolf weighs 3.2 kg less than the model predicts for a wolf 1.4 m long.

  3. Example 3Calculator allowed

    Trap: subtracting in the wrong order

    A student computes a residual as ŷ − y = 77.70 − 74 = 3.70 and says the line underestimated. What's wrong?

    Show the solution
    1. Step 1: Residual is y − ŷ, not ŷ − y. The correct residual is 74 − 77.70 = −3.70.
    2. Step 2: The actual value (74) is below the prediction (77.70), so the line overestimated.

    Answer: The residual is −3.70, and the line overestimated, not underestimated.

Common mistakes

  • Computing ŷ − y instead of y − ŷ.
  • Mixing up the meaning: a positive residual means the model underestimated.
  • Calling a residual plot with a clear curve "random."
  • Interpreting a residual without context or units.

On the exam

  • "Interpret the residual" answers need the size, the direction (actual above or below predicted) and context including the x-value.
  • If asked whether a linear model is appropriate, refer to the residual plot: "The residual plot shows no clear pattern, so a linear model is appropriate."

Connected topics

Videos

  • Residuals THE TRUTH EXPLAINED AP Statistics Topic 5.4

    Michael Porinchak - AP Statistics & AP PrecalculusWatch on YouTube (opens in a new tab)

  • AP Stats 3.3, Day 1 - Residuals & Residual Plots (Version A)

    Skew The ScriptWatch on YouTube (opens in a new tab)

  • AP Statistics Exploring Two Variable Data – Residuals

    Goldie's Math EmporiumWatch on YouTube (opens in a new tab)

  • Residual plots | Exploring bivariate numerical data | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Calculating residual example | Exploring bivariate numerical data | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Residuals (2.3)

    Simple Learning ProWatch on YouTube (opens in a new tab)

Check yourself

4 questions on 5.4 Residuals. Pick an answer to see if you got it, and why.

Question 1 of 4Calculator allowed

In a regression of home price on square footage, one home has a residual of −$22,000. What does this mean?

Question 2 of 4Calculator allowed

A regression line predicts a runner's 5K time to be 24.5 minutes. The runner's residual is 1.8 minutes. What was the runner's actual time?

Question 3 of 4Calculator allowed

A residual plot for a linear model shows residuals that are positive for small x, negative for middle x, and positive again for large x, forming a U shape. What does this suggest?

Question 4 of 4Calculator allowed

Which description of a residual plot supports using a linear model?

0 of 4 answered