AP Statistics · Unit 5 · Topic 5.4

    5.4 Residuals

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    A residual is the observed value minus the predicted value: residual=y−y^\text{residual} = y - \hat{y}. A positive residual means the point is above the line (the line under-predicted); a negative residual means it is below (over-predicted). A residual plot graphs residuals against x. If it shows random scatter with no pattern, a linear model is appropriate; a curved pattern means a line is not a good model.

    What you need to know

    • Calculate a residual and interpret it in context.
    • Construct and read a residual plot.
    • Use a residual plot to judge whether a linear model is appropriate.
    • Interpret the standard deviation of the residuals, s.

    Calculating and interpreting a residual

    residual=y−y^\text{residual} = y - \hat{y}

    Using the line from topic 5.3, a student who studied 4 hours scored 70. The predicted score is ŷ = 47.5 + 4.21(4) ≈ 64.4, so the residual is 70 − 64.4 = 5.6.

    Interpretation: this student scored about 5.6 points higher than the line predicts for a student who studied 4 hours. Another student who also studied 4 hours scored 61, a residual of about −3.4: 3.4 points lower than predicted.

    Residual plots

    A residual plot puts x (or ŷ) on the horizontal axis and the residuals on the vertical axis, with a reference line at 0. It magnifies the deviations from the line so patterns are easier to see.

    Residuals scatter above and below 0 with no clear pattern.

    Here the residuals are scattered randomly above and below 0, with no curve and no fanning out. Conclusion: a linear model is appropriate for the relationship between hours studied and score.

    • Random scatter around 0 → a line fits well.
    • A curve (for example, positive residuals at both ends and negative in the middle) → the relationship is not linear; a line is not the right model.
    • Residuals that spread out as x increases → predictions are less precise for larger x.

    The typical size of a residual

    s=∑(y−y^)2n−2s = \sqrt{\frac{\sum (y - \hat{y})^2}{n-2}}

    The standard deviation of the residuals, s, measures the typical prediction error. For the study data, s ≈ 3.3 points. Interpretation: when using the line to predict test score from hours studied, predictions are typically off by about 3.3 points.

    Smaller s means the points are closer to the line. Computer output usually shows s next to r² (often labelled 'S' or 'Root MSE'). The residuals from a least-squares line always add to 0, so the mean residual is 0 and s describes their spread.

    Key terms

    Residual
    Observed y minus predicted ŷ: the vertical distance from a point to the line.
    Residual plot
    A scatterplot of residuals against x (or ŷ), used to judge whether a linear model fits.
    Standard deviation of residuals s
    The typical size of prediction errors from the regression line.
    Appropriate linear model
    A line whose residual plot shows no pattern.

    Common mistakes

    • Computing ŷ − y.

      Residual = y − ŷ (observed minus predicted).

    • Judging linearity from r alone.

      Use the residual plot; a curved pattern can have a high r.

    • Interpreting s without context or units.

      Say 'predictions of [y] are typically off by about s [units]'.

    How this topic is tested

    • Show ŷ before the residual: 'ŷ = …, residual = y − ŷ = …'.
    • Describe a residual plot as 'no apparent pattern' or name the pattern.
    • Interpret s as a typical prediction error in y's units.

    Practice questions

    Original AP-style multiple-choice questions. Pick an answer to see the explanation.

    1. Question 1 · SP 3 · Analyze Data

      The line predicts a score of 68.6 for a student who scored 66. The residual is:

    2. Question 2 · SP 4 · Interpret Results

      A residual of +4.0 means:

    3. Question 3 · SP 4 · Interpret Results

      A residual plot shows a clear U-shaped curve. What does this suggest?

    4. Question 4 · SP 4 · Interpret Results

      Computer output gives S = 2.4 for a line predicting height (cm) from age. The best interpretation is:

    5. Question 5 · SP 3 · Analyze Data

      What is the sum of the residuals from a least-squares regression line?

    Free-response practice

    Write your answer first, then mark it against the scoring guide.

    Regression · 4 points

    A regression line predicting monthly electricity use (kWh) from household size is kWh-hat = 95 + 48(people). A household of 4 used 310 kWh. The residual plot shows random scatter around 0, and s = 22 kWh.

    1. (a) Calculate and interpret the residual for this household.
    2. (b) Is a linear model appropriate? Justify.
    3. (c) Interpret s.

    Connected topics

    Frequently asked questions

    Should the residual plot use x or ŷ?

    Either works for simple regression; the pattern looks the same, just stretched.

    Why n − 2 in s?

    Two quantities, a and b, were estimated from the data, so two degrees of freedom are used up.

    Is a large residual always a problem?

    Not necessarily; it shows an individual the line predicts poorly. Look at the overall pattern first.

    How this shows up on the exam42 multiple-choice questions and 4 free-response questions of 10 points. See what each one asks you to do.Full-length AP Statistics practice examsUnit 5 is one of 5 units on the exam. Two timed exams in the 2027 format (42 MCQ + 4 FRQ), with explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    Free Unit 5 cheat sheet

    Every topic in Unit 5: Regression Analysis on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Statistics practice material is ready. No spam, and we'll delete it if you ask.

    Free Unit 5 practice test: 25 questions with explanations

    All topics in Unit 5: Regression Analysis

    1. 5.1 Graphical Representations Between Two Quantitative Variables
    2. 5.2 Correlation
    3. 5.3 Linear Regression Models
    4. 5.4 Residuals
    5. 5.5 Least-Squares Regression

    Other units in AP Statistics

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.