10.5Residuals
Calculate and interpret residuals — the difference between actual and predicted values. Use residual plots to evaluate whether a linear model is a good fit for the data.
Why This Matters
Residuals measure how well a model fits the data — a concept central to regression analysis in AP Statistics and data science. Understanding residuals helps you evaluate whether a linear model is appropriate or if a different model is needed.
Workbook
Lesson, vocabulary, worked examples, and practice problems.
Essential Question
How do residuals help us evaluate how well a linear model fits a set of data?
Lesson Overview
A residual is the difference between an actual data value and the value predicted by the line of best fit: residual = y − ŷ (actual minus predicted). A positive residual means the actual value is above the line (the model underestimated). A negative residual means the actual value is below the line (the model overestimated). A residual plot graphs the residuals against the x-values. If the residuals are randomly scattered with no pattern, the linear model is a good fit. If the residuals show a curved or systematic pattern, a nonlinear model may be more appropriate.
Residual Formula
Residual = Actual − Predicted = y − ŷ
Positive residual (y > ŷ)
Point is above the line. Model underestimates.
Zero residual (y = ŷ)
Point is exactly on the line. Perfect prediction.
Negative residual (y < ŷ)
Point is below the line. Model overestimates.
Residuals — Actual vs. Predicted
Blue dots = actual data points (y)
Red dots = predicted values (ŷ) on the line
Green dashed = positive residual (above line)
Actual > Predicted → residual > 0
Purple dashed = negative residual (below line)
Actual < Predicted → residual < 0
Residual Plot — What to Look For
Good fit — Random scatter
Residuals are randomly scattered above and below the x-axis with no pattern. The linear model is appropriate.
(random, no trend)
Poor fit — Pattern visible
Residuals show a curve or systematic pattern. The linear model may not be the best fit — a nonlinear model might be better.
(curved pattern)
Worked Examples
The line of best fit is ŷ = 2x + 3. A data point is (4, 14). Calculate the residual.
Predicted: ŷ = 2(4) + 3 = 11
Residual = y − ŷ = 14 − 11 = 3
The line of best fit is ŷ = 5x + 10. A data point is (3, 20). Calculate the residual and interpret it.
Predicted: ŷ = 5(3) + 10 = 25
Residual = 20 − 25 = −5
Negative residual: the actual value (20) is below the predicted value (25). The model overestimates.
For the line ŷ = 3x + 1, calculate residuals for the data points (1, 5), (2, 7), (3, 8), (4, 14).
x=1: ŷ=4, residual=5−4=1
x=2: ŷ=7, residual=7−7=0
x=3: ŷ=10, residual=8−10=−2
x=4: ŷ=13, residual=14−13=1
A residual plot shows residuals scattered randomly above and below the x-axis. What does this tell us about the linear model?
Random scatter in a residual plot means there is no systematic pattern.
This indicates the linear model is a good fit for the data.
A residual plot shows a curved pattern (positive residuals at low x, negative in the middle, positive at high x). What does this suggest?
A curved pattern in the residual plot indicates the linear model is not the best fit.
The data may follow a nonlinear (curved) pattern.
A different model (e.g., quadratic) may be more appropriate.
Guided Practice
Guided Practice Video: Residuals
Review how to calculate and interpret residuals — the difference between actual and predicted values — and how residual plots are used to assess the fit of a linear model before completing the guided problems below.
Video by Sang Real Math
Watch on YouTube ↗The line of best fit is ŷ = 4x + 2. A data point is (5, 24). Calculate the residual.
Hint: Predicted: ŷ = 4(5) + 2. Residual = actual − predicted.
The line of best fit is ŷ = −2x + 30. A data point is (6, 15). Calculate the residual and interpret it.
Hint: Find ŷ first. Then residual = y − ŷ. Is the point above or below the line?
For ŷ = 3x + 5, calculate residuals for (2, 12), (4, 17), (6, 23).
Hint: Calculate ŷ for each x, then subtract from the actual y.
A residual plot shows residuals of +3, −1, +2, −3, +1, −2 for x = 1 through 6. Does the linear model appear to be a good fit? Explain.
Hint: Look for a pattern. Are the residuals randomly scattered or do they show a trend?
Error Analysis: A student calculates the residual for the point (3, 10) on the line ŷ = 2x + 5 as residual = 11 − 10 = 1. Identify the error.
Hint: What is the correct formula for residual? Which value is actual and which is predicted?
Key Vocabulary
Residual
The difference between the actual y-value and the predicted ŷ-value: residual = y − ŷ.
Predicted Value (ŷ)
The y-value calculated by substituting x into the equation of the line of best fit.
Actual Value (y)
The observed data value from the scatter plot.
Positive Residual
Actual > Predicted. The data point is above the line. The model underestimates.
Negative Residual
Actual < Predicted. The data point is below the line. The model overestimates.
Residual Plot
A scatter plot of residuals (y-axis) vs. x-values (x-axis). Used to evaluate model fit.
Random Scatter
Residuals with no visible pattern — indicates a linear model is appropriate.
Least Squares Line
The line of best fit that minimizes the sum of the squared residuals.
Interactive Practice — 5 Questions
The line of best fit is ŷ = 2x + 4. A data point is (3, 12). What is the residual?
A residual of −5 means:
Which formula correctly calculates a residual?
A residual plot shows residuals randomly scattered above and below zero. This means:
ŷ = 4x + 1. Data point: (5, 18). The residual is:
Independent Practice
Independent Practice
ŷ = 3x + 1. Data point: (4, 15). Calculate the residual. Is the point above or below the line?
ŷ = 2x + 8. Calculate residuals for: (1, 11), (3, 14), (5, 18). Which point is farthest from the line?
A residual is −4. Is the data point above or below the line of best fit? Does the model overestimate or underestimate?
A residual plot shows a U-shaped pattern. What does this suggest about the linear model? What type of model might be better?
ŷ = 4x + 3. A data point has residual = +5. If x = 2, what is the actual y-value? Show your work.
Common Mistakes
Calculating residual as predicted − actual instead of actual − predicted.
Residual = actual y − predicted ŷ. A positive residual means the point is above the line; negative means below.
Thinking a residual of zero means the model is perfect.
A residual of zero means the model predicted that one point exactly. The overall fit depends on all residuals together.
Confusing a residual plot with a scatter plot — plotting y vs. x instead of residuals vs. x.
A residual plot shows residuals (y − ŷ) on the y-axis and the x-values (or predicted values) on the x-axis.
Concluding a linear model is appropriate just because r is strong — without checking the residual plot.
Always check the residual plot. A random scatter of residuals confirms a linear model is appropriate. A curved pattern suggests otherwise.
Math Tips
Residual = actual − predicted = y − ŷ. Always subtract in this order.
Positive residual: the actual point is ABOVE the line (model underestimates).
Negative residual: the actual point is BELOW the line (model overestimates).
A good residual plot shows points randomly scattered above and below zero with no pattern. A curved or fan-shaped pattern means the linear model is not ideal.
The sum of all residuals for the least-squares line is always zero (or very close to it).