Residuals and Residual Plots
Analyze residual plots to assess the fit of a regression model.
Try the Interactive Version!
Learn step-by-step with practice exercises built right in.
📉 Residuals and Residual Plots
What Is a Residual?
Residual: The difference between observed and predicted value
Interpretation:
- Positive residual: actual value above regression line
- Negative residual: actual value below regression line
- Small residuals: good fit; large residuals: poor fit
Reading Residual Plots
A residual plot graphs residuals on y-axis vs. predicted values (or x-values) on x-axis.
✅ Good Residual Plot (Random Scatter)
- Residuals scattered randomly around 0
- No clear pattern
- Equal vertical spread (homoscedasticity)
- Conclusion: Linear model is appropriate
❌ Pattern in Residual Plot (Non-linearity)
- Residuals form a U-shape or inverted U
- Or systematic curve
- Conclusion: Relationship is NOT linear; try transformation
❌ Increasing Spread (Heteroscedasticity)
- Residuals spread wider as x increases
- Conclusion: Variance is not constant; may need transformation or weighted regression
Worked Example
Data: Height vs. Weight (n = 30 students)
Regression line:
One student: Height = 70 in, actual weight = 240 lbs
lbs
Residual lbs (actual weight below prediction)
If residual plot shows random scatter, linear model fits well.
Conditions for Linear Regression (LINER)
- Linear: Scatterplot shows linear trend
- Independent: Observations independent
- Normal: Residuals approximately normal
- Equal SD: Constant vertical spread (homoscedasticity)
- Random: Random sample
Residual plots help check conditions 1, 3, 4.
Common Mistakes
❌ Confusing residuals with errors (same thing, different context) ❌ Ignoring patterns; thinking a small curve is "close enough" ❌ Not checking residuals before making predictions ❌ Using residuals to predict; they should center on 0
AP Exam Tip
Say "The residual plot shows random scatter with no pattern, so a linear model is appropriate." Or "The residual plot shows a curved pattern, indicating the relationship is non-linear."
📚 Practice Problems
1Problem 1easy
❓ Question:
For regression ŷ = 10 + 2x, calculate the residual for the point (5, 25).
💡 Show Solution
Step 1: Identify actual value Point (5, 25): x = 5, y = 25 (actual)
Step 2: Calculate predicted value ŷ = 10 + 2(5) = 10 + 10 = 20
Step 3: Calculate residual Residual = y - ŷ Residual = 25 - 20 = 5
Step 4: Interpret The residual is POSITIVE (+5), meaning:
- Actual value is ABOVE predicted value
- Point is 5 units above the regression line
- Model UNDERESTIMATES by 5 units
Answer: Residual = 5 (point is above the line)
2Problem 2medium
❓ Question:
A residual plot shows points scattered randomly around zero with no pattern. What does this indicate?
💡 Show Solution
Step 1: Understand what random scatter means Good residual plot characteristics: ✓ Points scattered RANDOMLY ✓ No curved, U-shaped, or other patterns ✓ Roughly equal spread at all x values ✓ Centered around residual = 0
Step 2: What this indicates The linear model is APPROPRIATE:
- Linear relationship is valid (no curved pattern)
- Constant variance (homoscedasticity)
- No systematic errors
- Independence assumption met
Step 3: What to do ✓ Can proceed with predictions ✓ Can trust confidence intervals ✓ Linear regression is validated
Answer: Random scatter indicates the linear model is APPROPRIATE. The relationship is truly linear, variance is constant, and there are no systematic errors.
3Problem 3medium
❓ Question:
A residual plot shows a curved (U-shaped) pattern. What does this suggest and what should you do?
💡 Show Solution
Step 1: Identify the problem U-shaped or curved residual plot means: Linear model is INAPPROPRIATE
The relationship is actually nonlinear (curved).
Step 2: Why this is a problem
- Linear model makes systematic errors
- Underestimates in middle, overestimates at extremes (or vice versa)
- Predictions will be biased
- Violates linearity assumption
Step 3: Solutions Option 1: Transform the data
- Try log(y) vs x, or √y vs x
- Replot residuals - should become random
Option 2: Use nonlinear regression
- Quadratic: y = a + bx + cx²
- Exponential: y = ae^(bx)
Step 4: Check new model After transformation, residual plot should show random scatter.
Answer: Curved residuals indicate NONLINEAR relationship. Transform variables (log, square root) or use nonlinear regression. Recheck residuals after adjustment.
4Problem 4medium
❓ Question:
For points (1,3), (2,5), (3,6) with regression ŷ = 2 + 1.5x, verify residuals sum to zero.
💡 Show Solution
Step 1: Calculate predicted values Point 1: ŷ₁ = 2 + 1.5(1) = 3.5 Point 2: ŷ₂ = 2 + 1.5(2) = 5 Point 3: ŷ₃ = 2 + 1.5(3) = 6.5
Step 2: Calculate residuals Residual = y - ŷ
Point 1: e₁ = 3 - 3.5 = -0.5 Point 2: e₂ = 5 - 5 = 0 Point 3: e₃ = 6 - 6.5 = -0.5
Step 3: Sum residuals Σ(residuals) = -0.5 + 0 + (-0.5) = -1.0
This is close to zero (small rounding error).
Step 4: Why residuals sum to zero Mathematical property: For least-squares regression, Σ(y - ŷ) = 0 ALWAYS
- Guaranteed by the formulas
- Positive and negative errors balance
- Line goes through "middle" of data
Answer: Residuals sum to approximately 0. For true least-squares line, they ALWAYS sum exactly to zero.
5Problem 5hard
❓ Question:
A residual plot shows increasing spread (fan shape) as x increases. What does this violate and what are the implications?
💡 Show Solution
Step 1: Identify the violation Fan-shaped residuals violate: CONSTANT VARIANCE (homoscedasticity)
The spread increases with x (heteroscedasticity).
Step 2: Implications for predictions
- Predictions less reliable at high x (wide spread)
- Predictions more reliable at low x (tight spread)
- Standard errors are WRONG
- Confidence intervals misleading
Step 3: Implications for inference
- t-tests may be invalid
- p-values unreliable
- Hypothesis tests have wrong error rates
- Can't trust significance levels
Note: Estimates (slope, intercept) are still unbiased, but uncertainty measures are wrong.
Step 4: Solutions
- Transform y (try log(y) or √y)
- Use weighted least squares
- Use robust standard errors
- Report with caution
Answer: Violates CONSTANT VARIANCE assumption. Standard errors and confidence intervals unreliable. Solutions: transform y, use weighted least squares, or robust standard errors.
⚠️ Common Mistakes: Residuals and Residual Plots
Avoid these 3 frequent errors
Practice with Flashcards
Rate this topic's cards with spaced repetition. Cards join your deck when you finish a topic's lesson and take its exit quiz.
Browse All Topics
Explore more AP Statistics topics