AP-STATS-2.7-2.9

U2.7 Residuals and Residual Plots

Learn to compute residuals (y − ŷ), build and read residual plots, and judge whether a linear model fits — plus spot influential and high-leverage points.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U2.7 Residuals and Residual Plots, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

You already know how to fit a least-squares regression line. But a line can be drawn through any cloud of points — the real question is whether a line is the right model. That's what residuals answer. A residual measures how far each actual data point falls from your prediction, and a residual plot magnifies those errors so patterns you can't see in a scatterplot jump out.

In this lesson you'll compute residuals as yy^y - \hat{y}, construct residual plots, and interpret them the way AP graders expect: is the pattern random scatter (linear model is appropriate) or does it curve, fan out, or contain unusual points? You'll also learn to distinguish influential points from high-leverage points — a distinction that shows up in both multiple-choice and FRQ questions.

What a Residual Is and How to Compute It

A residual is the difference between an observed response and the value the model predicts:residual=yy^\text{residual} = y - \hat{y}Here yy is the actual data value and y^\hat{y} is the predicted value from the regression equation. A positive residual means the model underpredicted (the point sits above the line); a negative residual means the model overpredicted (the point sits below the line). A residual of zero means the point lands exactly on the line.

To compute a residual: plug the explanatory value xx into the least-squares equation to get y^\hat{y}, then subtract that from the observed yy.

Suppose y^=3+2x\hat{y} = 3 + 2x and a data point is (4,12)(4, 12). Then y^=3+2(4)=11\hat{y} = 3 + 2(4) = 11, so the residual is 1211=112 - 11 = 1. The actual value is 1 unit higher than predicted.

A key property of least-squares regression: the residuals always sum to zero (and therefore have mean zero). That's a direct consequence of how the line is fit. On the exam, be careful with the order — it is always observed minus predicted, never the reverse. Reversing the subtraction flips every sign and is a common point-losing error.

Constructing and Reading a Residual Plot

A residual plot graphs the residuals on the vertical axis against the explanatory variable xx (or sometimes against y^\hat{y}) on the horizontal axis. A horizontal reference line at zero represents perfect prediction.

The purpose of a residual plot is to check the single most important condition for using a linear model: is the relationship actually linear? A scatterplot can look roughly linear even when a subtle curve is present. The residual plot strips away the linear trend so any leftover structure becomes obvious.

The interpretation rule is simple and testable:
Residual plot showsConclusion
Random scatter with no patternLinear model is appropriate
A curved (U-shaped) patternRelationship is nonlinear; line is not appropriate
Fanning / changing spreadVariability isn't constant; predictions less reliable
When you write your conclusion on the AP exam, name the evidence: "The residual plot shows no leftover pattern (random scatter around zero), so a linear model is appropriate." Or: "The residual plot shows a clear curved pattern, so a linear model is not appropriate for these data." Avoid vague phrases like "it looks fine" — always tie the verdict to the presence or absence of a pattern.

Departures from Linearity and Non-Constant Spread

Two departures from a good linear fit show up repeatedly on the exam.

First, curvature. If the residual plot bends — for example residuals are positive at the ends and negative in the middle, forming a U — the data have a nonlinear relationship the line failed to capture. Even a strong correlation like r=0.95r = 0.95 can hide curvature, which is exactly why you must check the residual plot rather than trust rr alone.

Second, non-constant variability (sometimes called changing spread). If the residuals form a fan or megaphone shape — small spread on one side, large spread on the other — the model's prediction error grows across the range of xx. The line may still be the correct form, but predictions are much less precise where the spread is wide.

A common misconception is that large residuals automatically mean the model is bad. Not so — one or two big residuals with otherwise random scatter is normal. What matters is a systematic pattern across the whole plot. Another misconception: a high r2r^2 guarantees linearity. It does not. Always let the residual plot, not the correlation, be the deciding evidence about whether the linear form is appropriate.

Influential Points and High-Leverage Points

Unusual points can distort a regression, and the AP exam expects you to tell two types apart.

A high-leverage point has an xx-value far from the mean of the other xx-values. Because leverage comes from horizontal distance, such a point has the potential to pull the line strongly.

An influential point is any point whose removal would noticeably change the slope, intercept, or correlation. High-leverage points are often influential, but influence is about the actual effect on the fit.
FeatureHigh-leverage pointInfluential point
Defined byExtreme xx-valueIts removal changes the model a lot
EffectPotential to affect the lineActually affects slope/intercept/rr
RelationshipMay or may not be influentialOften (not always) has high leverage
An outlier in regression is a point with a large residual — it lies far from the line vertically. An outlier sitting near the center of the xx-values usually has little influence on the slope, while a point with extreme xx can swing the slope even with a modest residual. On the exam, justify claims: "Removing this point would increase the slope substantially, so it is influential," rather than just labeling it.

Key terms

Residual.
The difference between an observed and predicted response, computed as yy^y - \hat{y}; positive means the model underpredicted, negative means it overpredicted.
Predicted value (y^\hat{y}).
The response value produced by the regression equation for a given xx.
Residual plot.
A scatterplot of residuals versus the explanatory variable (or y^\hat{y}), used to check whether a linear model is appropriate.
Random scatter.
A residual plot with no leftover pattern around zero, indicating the linear model fits well.
High-leverage point.
A point with an xx-value far from the mean of the other xx-values, giving it the potential to strongly affect the regression line.
Influential point.
A point whose removal would substantially change the slope, intercept, or correlation of the regression.
Regression outlier.
A point with an unusually large residual, lying far from the regression line in the vertical direction.

Worked example

A least-squares regression line predicting a plant's height (cm) from days since planting is y^=2.5+1.8x\hat{y} = 2.5 + 1.8x. On day 10 the plant was measured at 24 cm. (a) Compute the residual. (b) The full residual plot shows residuals that are negative for small and large xx but positive in the middle. What does this indicate about the linear model?
Part (a): First find the predicted height at x=10x = 10. Substitute into the equation:y^=2.5+1.8(10)=2.5+18=20.5 cm\hat{y} = 2.5 + 1.8(10) = 2.5 + 18 = 20.5 \text{ cm}Now apply the residual formula, observed minus predicted:residual=yy^=2420.5=3.5 cm\text{residual} = y - \hat{y} = 24 - 20.5 = 3.5 \text{ cm}The residual is positive, so the model underpredicted the plant's height by 3.5 cm on day 10 — the actual point lies above the line.

Part (b): Residuals that are negative at the extremes and positive in the middle form a curved (U-shaped) pattern in the residual plot. This is a systematic pattern, not random scatter. It tells us the true relationship is nonlinear, so a linear model is not appropriate for these data even if the correlation is high. A better model would follow the curve — for example a transformation of the data, which you'll study later in the unit.

Practice questions

A residual plot for a set of data displays a clear fan shape, with residuals tightly clustered near zero for small xx but widely spread for large xx. What is the most appropriate conclusion?
  1. The relationship is nonlinear, so a linear model should not be used
  2. The variability of the response is not constant across values of xx
  3. There is an influential point pulling the slope upward
  4. The correlation must be negative

Answer: The variability of the response is not constant across values of xx

A fan or megaphone shape indicates changing spread of the residuals — the prediction error grows as xx increases. A curved pattern (not a fan) would signal nonlinearity, so the first choice is wrong. Nothing about a fan shape indicates a single influential point or the sign of the correlation. The key idea: fan shape = non-constant variability.
A regression line is y^=120.5x\hat{y} = 12 - 0.5x. For the data point (8,5)(8, 5), compute the residual and state whether the model over- or underpredicted.

Answer: The residual is 3-3; the model overpredicted.

Predict first: y^=120.5(8)=124=8\hat{y} = 12 - 0.5(8) = 12 - 4 = 8. Then residual =yy^=58=3= y - \hat{y} = 5 - 8 = -3. Because the residual is negative, the predicted value (8) was larger than the observed value (5), so the model overpredicted, and the point lies below the line.
A scatterplot of two variables has r=0.97r = 0.97. A student concludes a linear model is appropriate based on this strong correlation. Explain why this reasoning is incomplete and what the student should examine.

Answer: A high correlation does not confirm linearity; the student should examine the residual plot for a pattern.

Correlation measures the strength of a linear association but can be high even when the true relationship is curved. The definitive check is the residual plot: if it shows random scatter around zero, the linear model is appropriate; if it shows a curved pattern, the model is not appropriate despite the high rr. The student must inspect the residual plot before concluding.

FAQ

Is a residual observed minus predicted or predicted minus observed?
Always observed minus predicted: yy^y - \hat{y}. Reversing the order flips every sign, so a point above the line would wrongly show a negative residual. Memorize the correct order to avoid losing points.
What does a good residual plot look like?
A good residual plot shows random scatter of points above and below the zero line with no pattern — no curve, no fan shape, no clusters. Random scatter is your evidence that a linear model is appropriate.
What's the difference between a high-leverage point and an influential point?
A high-leverage point has an extreme xx-value, giving it the potential to affect the line. An influential point is one whose removal actually changes the slope, intercept, or correlation noticeably. High-leverage points are often influential, but not always.
Can a linear model have a high correlation but still be inappropriate?
Yes. Correlation only measures linear strength and can be high even when data follow a curve. That is exactly why you check the residual plot — a curved residual pattern tells you the linear model is wrong despite a high rr or r2r^2.

Learn this with a teacher, not a page

The Crimsora tutor teaches U2.7 Residuals and Residual Plots live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.