Skip to content

Residuals and Residual Plots

Analyze residual plots to assess the fit of a regression model.

Written and reviewed by the Study Mondo Education TeamLast updated
๐ŸŽฏโญ INTERACTIVE LESSON

Try the Interactive Version!

Learn step-by-step with practice exercises built right in.

Start Interactive Lesson โ†’

๐Ÿ“‰ Residuals and Residual Plots

What Is a Residual?

Residual: The difference between observed and predicted value

residual=observedโˆ’predicted=yโˆ’y^\text{residual} = \text{observed} - \text{predicted} = y - \hat{y}

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: Weight^=50+3.2โ‹…Height\hat{\text{Weight}} = 50 + 3.2 \cdot \text{Height}

One student: Height = 70 in, actual weight = 240 lbs

Weight^=50+3.2(70)=274\hat{\text{Weight}} = 50 + 3.2(70) = 274 lbs

Residual =240โˆ’274=โˆ’34= 240 - 274 = -34 lbs (actual weight below prediction)

If residual plot shows random scatter, linear model fits well.

Conditions for Linear Regression (LINER)

  1. Linear: Scatterplot shows linear trend
  2. Independent: Observations independent
  3. Normal: Residuals approximately normal
  4. Equal SD: Constant vertical spread (homoscedasticity)
  5. 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:

  1. Linear relationship is valid (no curved pattern)
  2. Constant variance (homoscedasticity)
  3. No systematic errors
  4. 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.

Explain using:

โš ๏ธ Common Mistakes: Residuals and Residual Plots

Avoid these 3 frequent errors

๐Ÿ“Œ Related Topics in Unit 2: Exploring Two-Variable Data

โ“ Frequently Asked Questions

What is Residuals and Residual Plots?โ–พ
Analyze residual plots to assess the fit of a regression model.
How can I study Residuals and Residual Plots effectively?โ–พ
Start by reading the study notes and working through the examples on this page. Then use the flashcards to test your recall. Practice with the 5 problems provided, checking solutions as you go. Regular review and active practice are key to retention.
Is this Residuals and Residual Plots study guide free?โ–พ
Yes โ€” all study notes, flashcards, and practice problems for Residuals and Residual Plots on Study Mondo are free to access. No account is needed.
What course covers Residuals and Residual Plots?โ–พ
Residuals and Residual Plots is part of the AP Statistics course on Study Mondo, specifically in the Unit 2: Exploring Two-Variable Data section. You can explore the full course for more related topics and practice resources.
Are there practice problems for Residuals and Residual Plots?โ–พ
Yes, this page includes 5 practice problems with detailed solutions. Each problem includes a step-by-step explanation to help you understand the approach.