A residual is the actual value minus the value a regression line predicts, : positive means the point lies above the line, negative means it lies below. A residual plot with no pattern says a linear model is appropriate. The standard deviation of the residuals, , gives the typical size of a prediction error, and gives the fraction of the variation in that the line accounts for.
Quick check
A line predicts quiz score from hours of study as . What does it predict for 3 hours?Show answerHide answer
, because .
A point lies above a regression line. Is its actual greater or less than the predicted ?Show answerHide answer
Greater. Above the line means the actual value is bigger than what the line predicts at that .
Know these already? Jump to the practice questions
What you'll be able to do
- Calculate a residual and interpret its sign and size in context.
- Justify from a residual plot whether a linear model is appropriate.
- Calculate and interpret as a typical prediction error.
- Interpret in context.
Key terms
Residual
For one data point, residual : the actual value of the response minus the value the regression line predicts.
- In plain English
- How far the point sits above (positive) or below (negative) the line.
- Don't write
- "residual "; that flips every sign.
Standard deviation of the residuals ()
The typical distance between the actual values of and the values the regression line predicts.
- In plain English
- How far off the line's predictions usually are.
- Don't write
- " is the standard deviation of "; it measures spread around the line, not around .
Coefficient of determination ()
The fraction of the variation in the response that is accounted for by the least-squares line with the explanatory variable.
- In plain English
- How much better the line predicts than using for everyone.
- Don't write
- "the percent of predictions that are correct".
What does a residual tell you?
Learn this (it is not on the formula sheet):
Substitute the point's into the regression equation to get , then subtract it from the actual . A positive residual means the point is above the line, so the line underestimated. A negative residual means the point is below the line, so the line overestimated.
Interpret a residual with the variables, the units and the direction. If predicts reaction time (milliseconds) from hours of sleep, an adult who slept 6 hours is predicted milliseconds. If that adult's time was 340 milliseconds, the residual is : a reaction time 15 milliseconds slower than predicted for 6 hours of sleep.
The residuals from a least-squares line always add to .
Key idea
Residual = actual − predicted, so positive means the line underestimated and negative means it overestimated.
Check yourself
Show answerHide answer
, because . The residual is negative, so the point is below the line.
How does a residual plot show whether a line fits?
A residual plot graphs each residual against (or ), with a horizontal line at . It lays the line flat, so any pattern left over is something the line failed to capture.
- No pattern: the residuals scatter randomly above and below . A linear model is appropriate.
- A curve: a run of positive residuals, then negative, then positive (or the reverse). The relationship is curved, so a linear model is not appropriate. The note on Influential Points and Transforming to Linearity shows how to straighten it.
- A fan: the residuals spread out more as increases, so predictions are less precise for large .
A high does not rule out a curve.
Examiner's eye
Marks are lost for "the residuals are random" with no conclusion. Say there is no apparent pattern, so a linear model is appropriate for these two variables.
Check yourself
Show answerHide answer
No. The residuals follow an upside-down U, so the relationship is curved and a straight line misses it in a systematic way.
What does tell you?
Learn this (Novark does not confirm it on the formula sheet):
You divide by because the line uses two estimated values, the slope and the intercept.
Interpret it as: the actual [response] is typically about [units] away from the value predicted by the line using [explanatory variable]. It is also the yardstick for one residual: a residual much bigger than in size is an unusually large error.
Check yourself
Show answerHide answer
Actual commute times are typically about 4.2 minutes away from the times predicted by the regression line.
What does tell you?
Learn this: is the square of the correlation , and it also equals
The bottom sum is the variation in if you ignored and predicted for everyone. The top sum is the variation still left after using the line. So is the fraction of the variation that the line removes. If and , then .
Interpret it as: about 84 percent of the variation in [response] is accounted for by the linear model relating [response] to [explanatory variable]. has no units, and it says nothing about whether a line is the right shape.
Key idea
gives the typical prediction error in the units of ; gives the fraction of the variation in that the line explains.
Check yourself
Show answerHide answer
. About 49 percent of the variation in hours of sleep is accounted for by the linear model relating sleep to screen time.
Worked example 1: Reading the residuals
Question: A hypothetical test measured the stopping distance (feet) of one car at five speeds (miles per hour): , , , and . The least-squares line is , with . Calculate the five residuals and decide whether a linear model is appropriate.
What tells you the method
"appropriate" means judge the pattern in the residuals, not the size of .
Step 1: Predict at each speed.
, , , and feet.
WhySubstitute each into the equation, for example .
Step 2: Subtract.
Residuals: , , , and .
WhyEach residual is actual minus predicted.
Step 3: Read the pattern.
The signs go : the U shape in the figure "Residual plot for the stopping-distance data". The line overestimates at middle speeds and underestimates at both ends.
WhyA curve in the residuals means a straight line has the wrong form for these data.
Check it
, as least-squares residuals must add to .
Answer
The residuals are , , , and feet. They form a curved pattern, so a linear model is not appropriate for stopping distance and speed, even though .
Worked example 2: Interpreting and
Question: For 20 hypothetical trees of one species, a regression of height (meters) on trunk diameter (centimeters) gives , and meters. (a) Interpret . (b) Calculate and interpret . (c) A tree with diameter 30 centimeters is 14.9 meters tall. Calculate its residual and judge whether it is unusually large.
What tells you the method
"interpret " and "interpret " each have a fixed form; "residual" means actual minus predicted.
Step 1: Interpret .
Actual heights are typically about 1.6 meters from the heights the line predicts from trunk diameter.
Whyis the typical size of a residual, in the units of .
Step 2: Calculate .
, so about 77.4 percent of the variation in height is explained by the linear model with trunk diameter.
WhySquaring gives the fraction of variation explained.
Step 3: Find the residual.
meters, so the residual is meters.
WhyActual minus predicted; the tree is shorter than predicted.
Step 4: Compare with .
The residual's size, meters, is less than meters.
Whyis the yardstick for an ordinary prediction error.
Check it
For , squaring makes the value smaller, and .
Answer
(a) Heights are typically about 1.6 meters from their predicted values. (b) : about 77.4 percent of the variation in height is explained by the linear model with diameter. (c) The residual is meters, smaller than in size, so it is not unusually large.
Your turn
Question: A hypothetical line predicts jigsaw finishing time (minutes) from number of pieces. For puzzles the residuals are , , , , and minutes. Calculate to two decimal places and interpret it.
Step 1:
Square and add: .
Step 2: Your go: divide by , take the square root and interpret.
Show the full solutionHide the solution
minutes, to two decimal places.
Actual finishing times are typically about 1.21 minutes away from the times predicted by the line using number of pieces.
Answer: minutes: actual times are typically about 1.21 minutes from the predicted times.
Traps
Trap
Thinking a high means a linear model is appropriate.
It seems right because the line explains most of the variation. But a curved relationship can still have near 1, like the stopping-distance data (). Only the residual plot shows whether the form is right.
Check yourself
Show answerHide answer
No. The curve in the residuals shows the form is wrong, whatever the size of .
Trap
Thinking residual = predicted − actual.
It seems right because you work out the predicted value first. But a residual is actual minus predicted, , so a point above the line has a positive residual.
Check yourself
Show answerHide answer
, because . The point lies below the line.
What's examined
Residuals, residual plots, and are tested on the AP® Statistics exam (Two-variable data: Exploring Two-Variable Data), in both the multiple-choice and free-response sections. Expect Calculate, Interpret and Justify, with every answer in context. A graphing calculator gives residuals and ; the credit is for interpreting them with both variables and the units.
Practice questions
- Recall A point has a negative residual from a least-squares line. Which statement must be true?
- A) The actual value is greater than the predicted value.
- B) The correlation between and is negative.
- C) The point lies below the regression line.
- D) A linear model is not appropriate.
Show answer
Answer: C) The point lies below the regression line.
Marking points:
- Residual , so the actual value is less than predicted and the point is below the line.
- A reverses the sign. B confuses the sign of one residual with the direction of the association. D judges the model from one point instead of the pattern in the residual plot.
- Apply For a hypothetical lemonade stand, predicts the number of cups sold from the day's high temperature (°F). On an 80 °F day the stand sold 91 cups. Calculate the residual for that day.
Show answer
Answer: The residual is cups: the stand sold 9 fewer cups than predicted.
Marking points:
- cups.
- Residual cups.
- Apply A least-squares line has , and its residual plot shows a clear U-shaped pattern. Which conclusion is correct?
- A) A linear model is not appropriate, because the residuals show a curved pattern.
- B) A linear model is appropriate, because is close to 1.
- C) A linear model is appropriate, because some residuals are positive and some are negative.
- D) A linear model is not appropriate, because is less than 1.
Show answer
Answer: A) A linear model is not appropriate, because the residuals show a curved pattern.
Marking points:
- A systematic curve in the residuals means the relationship is not linear.
- B trusts , which cannot detect curvature. C is true of every least-squares line, since residuals add to 0. D reaches the right conclusion for the wrong reason: real data almost never give .
- Apply In a hypothetical sample of used cars of one model, the correlation between age (years) and price is . Which is the correct interpretation of ?
- A) About 90 percent of the variation in price is explained by the linear model with age.
- B) About 81 percent of the cars lie on the regression line.
- C) The line predicts about 81 percent of the prices correctly.
- D) About 81 percent of the variation in price is explained by the linear model with age.
Show answer
Answer: D) About 81 percent of the variation in price is explained by the linear model with age.
Marking points:
- , the fraction of variation in price explained by the line.
- A uses without squaring it. B treats as the share of points on the line. C treats it as the share of correct predictions.
- Exam-style For 25 hypothetical tomato plants, a regression of yield (kilograms per plant) on daily hours of sunlight gives , and kilograms. (a) Calculate and interpret . (b) A plant that got 8 hours of sunlight a day yielded 4.1 kilograms. Calculate its residual. (c) Using , decide whether this residual is unusually large.
Show answer
Answer: (a) : about 56.3 percent of the variation in yield is accounted for by the linear model relating yield to hours of sunlight. (b) The residual is kilograms. (c) It is not unusually large, because .
Marking points:
- , interpreted as variation in yield explained, in context.
- kilograms, so the residual is kilograms.
- The residual's size is less than the typical prediction error , so this plant's yield is not unusually far from its prediction.
- Recall A hypothetical regression predicting 100-meter sprint time (seconds) from leg length (centimeters) has seconds. Which is the best interpretation of ?
- A) The sprint times have a standard deviation of 0.4 seconds.
- B) Actual times are typically about 0.4 seconds from the times the line predicts from leg length.
- C) Time changes by 0.4 seconds per extra centimeter of leg length.
- D) About 40 percent of the variation in time is explained by leg length.
Show answer
Answer: B) Actual times are typically about 0.4 seconds from the times the line predicts from leg length.
Marking points:
- is the typical size of a residual, in the units of .
- A describes spread around the mean time, not around the line. C describes a slope. D describes .
Key points
Recall, then reveal
Say the main points from memory first, then check them.
Show key pointsHide key points
- Work out a residual as ; a positive one sits above the line (underestimate) and a negative one below (overestimate).
- A residual plot with no apparent pattern supports a linear model; a curve means the form is wrong, however high is.
- is the typical prediction error, in the units of .
- is the fraction of the variation in accounted for by the linear model with ; it has no units.