Educerie · AP · Statistics
AP Statistics 5.4
Residuals
How can we describe the relationship between two quantitative variables, and how well can one be used to predict the other?
What you will learn
- Understand that a residual is the observed response minus the predicted response for the same x
- Know that a positive residual means the model underpredicts and a negative residual means it overpredicts
- Understand that a residual plot graphs residuals against predicted values or explanatory values
- Know that random scatter supports a linear model and that curvature suggests a linear model is not the most appropriate
You must be able to
- Calculate a residual from an equation, an x-value and an observed value
- Interpret a positive or negative residual in context
- Find an observed value from a residual and a regression equation
- Read a residual plot and decide whether a linear model is appropriate
- Describe the pattern in a residual plot, such as an arch or random scatter
- Explain why a high r does not replace a residual plot
In the exam. Section I asks you to calculate a residual, to go from a residual and an equation back to an observed value, to say what a positive or negative residual means, or to read a residual plot. A residual is usually one question of the regression set of three. In Section II, a free-response question can ask you to calculate and interpret a residual in context, or to say from a residual plot whether a linear model is appropriate.
1Calculating a residual
For each individual in the data, the line gives a predicted value , and the individual has an observed value . The residual is the gap between them.
Look at the used-car model from 5.3: , with the age in years and the asking price in thousands of dollars. Figure 1 shows the 12 cars and the line. The vertical segment from each dot to the line is that car's residual.
Worked example 1. A car aged 3 years has an asking price of 18.9 thousand dollars.
The residual is about thousand dollars, or about 560 dollars. It is positive, so the dot is above the line.
Worked example 2. A car aged 5 years has an asking price of 13.9 thousand dollars.
The residual is about thousand dollars. It is negative, so the dot is below the line. Figure 1 marks this car, and one at age 1 whose residual is .
The order matters. The residual is observed minus predicted, never the other way round. Reversing it flips the sign, and a flipped sign flips your interpretation. The units of a residual are the units of .
2Interpreting a residual
A residual says how the real value compares with the model's prediction for that individual.
- Positive residual. The observed value is above the predicted value. The model underpredicts (underestimates) the response.
- Negative residual. The observed value is below the predicted value. The model overpredicts (overestimates) the response.
- Zero residual. The dot lies on the line.
Worked interpretation. For the 5-year-old car in example 2: the asking price of this car, 13.9 thousand dollars, was about 1.1 thousand dollars lower than the 15.0 thousand dollars the model predicts for a 5-year-old car. The model overpredicts the price of this car.
Good wording names the individual, the variable, the size, the direction and the model's prediction. "The residual is negative" alone is not an interpretation. Do not say a negative residual is a "bad" car or a "mistake" by the owner. It is a statement about the model.
3Working backwards
The exam may give you the residual and the equation, and ask for the observed value. Rearrange the definition.
Worked example. For a car aged 4 years the residual is thousand dollars. Find the observed asking price.
The asking price is about 17.5 thousand dollars. A positive residual means the observed value is above the prediction, so you add it. A negative residual is subtracted.
4Residual plots
Residual plot = a scatterplot of the residuals (on the vertical axis) against the predicted response values, or against the explanatory variable values (on the horizontal axis).
Either version is accepted. This note uses the explanatory variable. A horizontal line at 0 marks the line of the model: dots above it have positive residuals.
A residual plot takes away the slope. The line is turned flat, so any pattern that the line misses stands out. That makes it better than the scatterplot for judging whether a line is a good shape.
What to look for.
- Random scatter, with no pattern, around the 0 line. This supports the linear form. A simple linear regression model is appropriate for the data.
- Curvature: an arch, a bowl or any clear bend. This suggests the linear model is not the most appropriate. The association has a non-linear form.
Figure 2 is the residual plot for the used cars.
The residuals of the cars have no pattern. They are positive and negative in no order, and they are about the same size at every age. A linear model is appropriate.
Figure 3 is a different data set.
Example (invented): a seedling is measured each week for 10 weeks. The scatterplot rises quickly and then levels off, and the fitted line is . The residual plot is not random. The residuals are negative for the first two weeks, positive for weeks 3 to 7 and negative again after that. The arch means the line is too high at both ends and too low in the middle. A linear model is not the most appropriate here.
5Putting it together
A scatterplot, and a residual plot answer three questions.
| Tool | Question it answers |
|---|---|
| Scatterplot | Does the pattern look linear? |
| Correlation | How strong is the linear association? |
| Residual plot | Does the line fit without a leftover pattern? |
alone cannot show that a line is right. In the seedling data, is high (0.89, 5.2), but the residual plot shows curvature. The residual plot is the final check.
Apparent randomness supports a linear model. It does not prove it. Say "supports", "suggests" or "is appropriate", and not "proves".
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.