Reading diagnostic plots
Match Q–Q, residual, scale-location and influence patterns with the problem each one signals.
You will be able to
- Read a Q–Q plot for skew and heavy tails
- Recognize curvature and a fan in residuals
- Tell a high-leverage point from an influential one
Read first
Why plots for models?
ReadA fitted model gives numbers whether or not its assumptions hold. Diagnostic plots show what's left over, and what's left over tells you whether to trust the numbers.
The rule: residuals should look like noise. Any pattern is something the model missed.
Read a Q–Q plot
ExploreChange the skew and the tail weight, and see the pattern each one makes.
AExplorable · Build a Q–Q plot
How do skewness and heavy tails show up in a normal Q–Q plot?
Before plotting: what pattern will the points make?
Below 1: heavier tails.
Commit your prediction above to see the result
Make your prediction to see the result.
- Points follow the line: compatible with normality.
- A curve bending one way: skew.
- An S with both ends leaving the line: heavy or light tails.
The residual panel
PredictPredict first
A plot of residuals against fitted values spreads out like a fan from left to right. What does that suggest?
Reveal
The answer: Unequal variance
Unequal variance: the errors grow with the prediction. Coefficients can stay reasonable, but the usual standard errors are off. See how far below.
DExplorable · The heteroscedastic fan
When the spread grows with x, how far can you trust the usual standard error?
How often does the classical 95% interval cover the true slope?
The noise SD is 0.25 + fan × x.
Commit your prediction above to see the result
Make your prediction to see the result.
Name that failure
ExploreEach case hides one kind of failure. Read the residual plots, name the problem, then reveal the case.
DExplorable · Read the residuals
What does each kind of model failure look like in the residuals?
What is wrong with this regression?
Case
Residuals against fitted
Normal Q–Q
| Breusch–Pagan p | RESET p | Shapiro–Wilk p | Durbin–Watson |
|---|---|---|---|
| < .001 | .995 | .061 | 2.28 |
Commit your prediction above to see the result
Make your prediction to see the result.
View data
| fitted | residual | standardized residual | leverage | Cook's D |
|---|---|---|---|---|
| 12.788 | −0.4492 | −0.1891 | 0.0096 | 0.0002 |
| 15.384 | −0.7285 | −0.3081 | 0.0182 | 0.0009 |
| 13.707 | 3.652 | 1.539 | 0.0117 | 0.0141 |
| 9.821 | −1.617 | −0.6807 | 0.0097 | 0.0023 |
| 10.648 | 0.7863 | 0.3309 | 0.0086 | 0.0005 |
| 24.382 | −7.982 | −3.546 | 0.1104 | 0.7799 |
| 13.728 | −3.056 | −1.288 | 0.0118 | 0.0099 |
| 16.205 | −4.582 | −1.942 | 0.0226 | 0.0436 |
| 9.260 | 0.8656 | 0.3647 | 0.0109 | 0.0007 |
| 12.489 | −0.7608 | −0.3203 | 0.0091 | 0.0005 |
| 15.581 | −0.7684 | −0.3251 | 0.0192 | 0.0010 |
| 15.251 | 2.032 | 0.8591 | 0.0176 | 0.0066 |
| 12.125 | −0.3039 | −0.1279 | 0.0087 | 7.191e-5 |
| 5.350 | −1.110 | −0.4723 | 0.0297 | 0.0034 |
| 10.469 | 3.399 | 1.431 | 0.0088 | 0.0091 |
| 10.939 | 0.6618 | 0.2785 | 0.0084 | 0.0003 |
| 14.370 | 2.234 | 0.9427 | 0.0139 | 0.0063 |
| 11.564 | −2.412 | −1.015 | 0.0084 | 0.0043 |
| 5.958 | −0.6530 | −0.2772 | 0.0256 | 0.0010 |
| 14.829 | 1.706 | 0.7205 | 0.0157 | 0.0041 |
| 15.482 | 1.764 | 0.7460 | 0.0187 | 0.0053 |
| 6.349 | 0.5397 | 0.2288 | 0.0232 | 0.0006 |
| 15.013 | −0.0453 | −0.0191 | 0.0165 | 3.070e-6 |
| 4.981 | −0.4213 | −0.1795 | 0.0324 | 0.0005 |
| 12.184 | 4.527 | 1.905 | 0.0088 | 0.0161 |
| 12.018 | −3.285 | −1.382 | 0.0086 | 0.0083 |
| 14.164 | −1.411 | −0.5952 | 0.0132 | 0.0024 |
| 8.380 | 0.0629 | 0.0265 | 0.0135 | 4.828e-6 |
| 14.876 | 3.750 | 1.584 | 0.0159 | 0.0202 |
| 4.954 | −0.3416 | −0.1455 | 0.0326 | 0.0004 |
| 15.054 | −4.071 | −1.720 | 0.0166 | 0.0251 |
| 7.476 | −0.3687 | −0.1558 | 0.0172 | 0.0002 |
| 5.605 | −0.9619 | −0.4088 | 0.0279 | 0.0024 |
| 7.028 | 1.211 | 0.5123 | 0.0194 | 0.0026 |
| 12.875 | −0.7572 | −0.3189 | 0.0098 | 0.0005 |
| 14.177 | 2.426 | 1.023 | 0.0132 | 0.0070 |
| 16.177 | 5.455 | 2.312 | 0.0224 | 0.0613 |
| 14.243 | 0.2034 | 0.0858 | 0.0134 | 5.011e-5 |
| 13.268 | −1.406 | −0.5923 | 0.0106 | 0.0019 |
| 15.245 | −5.051 | −2.136 | 0.0175 | 0.0407 |
| 13.682 | −1.392 | −0.5869 | 0.0117 | 0.0020 |
| 15.876 | 1.005 | 0.4256 | 0.0207 | 0.0019 |
| 5.227 | −0.8659 | −0.3685 | 0.0306 | 0.0021 |
| 16.107 | −3.348 | −1.419 | 0.0220 | 0.0226 |
| 14.136 | 1.472 | 0.6210 | 0.0131 | 0.0026 |
| 15.079 | 2.476 | 1.046 | 0.0168 | 0.0093 |
| 9.117 | 2.056 | 0.8666 | 0.0113 | 0.0043 |
| 9.339 | −1.011 | −0.4258 | 0.0107 | 0.0010 |
| 6.670 | 0.9295 | 0.3937 | 0.0213 | 0.0017 |
| 13.785 | 2.024 | 0.8532 | 0.0120 | 0.0044 |
| 6.553 | 1.111 | 0.4707 | 0.0220 | 0.0025 |
| 8.914 | 0.3789 | 0.1597 | 0.0118 | 0.0002 |
| 11.694 | −3.395 | −1.429 | 0.0084 | 0.0087 |
| 12.316 | 3.111 | 1.310 | 0.0089 | 0.0077 |
| 7.490 | 1.180 | 0.4986 | 0.0171 | 0.0022 |
| 7.775 | −2.189 | −0.9244 | 0.0159 | 0.0069 |
| 8.283 | 0.7903 | 0.3335 | 0.0139 | 0.0008 |
| 8.646 | 0.2792 | 0.1177 | 0.0126 | 8.867e-5 |
| 11.644 | 6.034 | 2.539 | 0.0084 | 0.0273 |
| 8.342 | −2.315 | −0.9767 | 0.0137 | 0.0066 |
First 60 of 120 rows.
Leverage and influence
ReadA point far out on the x-axis has high leverage: it could move the line. It's influential only if it does.
Move the point around and watch leverage, the residual and Cook's distance change.
DExplorable · Leverage and influence
Which single points can move a regression line, and which cannot?
Will this point change the slope a lot?
Commit your prediction above to see the result
Make your prediction to see the result.
Cook's distance by row in Charts shows which rows matter most.
On a real result
In the appRun linear regression in Analyze on a dataset of your own. Its result card shows diagnostic charts and assumption checks, each with a remedy if it fails.
Read the plots before the checks. Tests of assumptions have the same sample-size problems as normality tests.
Check your understanding
CheckpointCheck yourself
Residuals against fitted values form a U shape. What does that suggest?
Show the answer
Answer: a
A systematic curve means the straight-line model leaves structure behind. Try a transformation or a spline.
Check yourself
A point has high leverage, and it lies exactly on the line fitted to the other points. Is it influential?
Show the answer
Answer: b
Influence is leverage combined with a large residual. Cook's distance measures the combination.
Check yourself
A Q–Q plot of residuals curves upward on the right, and sits on the line on the left. What's the likely problem?
Show the answer
Answer: a
The largest residuals are larger than a normal distribution would predict. A transformation of the outcome may help.
Recap
Recap- Residuals should look like noise.
- A curve means missing shape, a fan means unequal variance, and an S means tail problems.
- Leverage is potential; influence is what actually moves the fit.
Concepts in this lesson