Residuals Examples in Statistics

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Residuals.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Statistics.

Concept Recap

A residual is the difference between an observed data value and the value predicted by a statistical model, calculated as residual=yobservedypredicted\text{residual} = y_{\text{observed}} - y_{\text{predicted}}. Positive residuals mean the model underestimated; negative residuals mean it overestimated.

If your model predicts 80 but the actual value is 85, the residual is +5. Residuals are 'leftovers' - what the model couldn't explain. Patterns in residuals reveal model problems.

Read the full concept explanation →

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Residuals asks whether the same cases connect two variables or groups in a pattern that can be described carefully.

Common stuck point: Students often know a procedure related to residuals but skip the recognition step: Am I studying a relationship between variables, and have I separated association from causation? That leads to a calculation or graph that looks reasonable but answers a different question.

Sense of Study hint: Ask: Am I studying a relationship between variables, and have I separated association from causation?

Worked Examples

Example 1

medium
Regression line y^=0.5x+2\hat{y} = 0.5x + 2. For the point (10,9)(10, 9), compute the residual and explain its meaning.

Answer

residual =+2= +2; the actual yy is 22 units above the line at x=10x = 10.

First step

1
Predict y^=0.5(10)+2=7\hat{y} = 0.5(10) + 2 = 7.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan — every worked solution, all subjects

Example 2

medium
Predict using y^=3x+2\hat{y} = 3x + 2 for (5,20)(5, 20). State the residual and whether the model over- or under-predicted.

Example 3

hard
Four points have residuals +5,4,+2,r4+5, -4, +2, r_4. Their sum is 00. Find r4r_4 and explain.

Example 4

hard
Two regressions: residual SE s=1.0s = 1.0 vs s=5.0s = 5.0 for the same response variable. Which has tighter predictions, and why?

Example 5

challenge
An influential observation has very high leverage (extreme xx) and a small residual on the fitted line. Why is it still influential, despite the small residual?

Example 6

medium
Using y^=0.5x+2\hat{y} = 0.5x + 2, complete the residual table for (2,3),(4,5),(6,4),(8,7)(2,3),(4,5),(6,4),(8,7).

Example 7

hard
Using y^=x+2\hat{y} = x + 2, compute SSR for (1,4),(2,3),(3,6),(4,5)(1,4),(2,3),(3,6),(4,5).

Example 8

hard
A point has residual +10+10 and lies far from the rest of the data. Why is it called influential?

Example 9

hard
A regression model predicts y^=30\hat{y} = 30 for a data point, but the actual value is y=35y = 35. Calculate the residual and interpret it.

Example 10

hard
A residual plot shows a clear U-shaped pattern. What does this indicate about the regression model?

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Observed value 50, predicted value 47. Find the residual.

Example 2

easy
Observed 30, predicted 35. Find the residual.

Example 3

easy
A residual of +8+8 means the model did what?

Example 4

easy
A residual of 4-4 means the model did what?

Example 5

easy
Predicted y^=12\hat{y}=12 and observed y=12y=12. Find the residual.

Example 6

easy
Using y^=2x+1\hat{y}=2x+1, find the residual at the point (3,10)(3, 10).

Example 7

easy
A residual is the difference between which two values?

Example 8

easy
Using y^=3x2\hat{y}=3x-2, find the residual at (4,8)(4, 8).

Example 9

medium
For y^=x+2\hat{y}=x+2, find the residuals at (1,4)(1,4) and (5,5)(5,5), then state which point the line fits worse.

Example 10

medium
Why does the sum of all residuals from a least-squares line equal zero?

Example 11

medium
Residual plot of a linear fit shows a clear funnel shape (spread grows with x). What does this reveal?

Example 12

medium
Using y^=2x+3\hat{y}=2x+3, the points are (1,6),(2,8),(3,9)(1,6),(2,8),(3,9). Find the largest residual.

Example 13

medium
How is a residual different from the model's 'error' term?

Example 14

medium
A residual plot scatters randomly around zero with no pattern. What does this suggest about the linear model?

Example 15

medium
For y^=x+10\hat{y}=-x+10, find the residual at (2,5)(2, 5) and state over- or under-estimate.

Example 16

medium
Two models fit the same point (4,20)(4, 20). Model A predicts 18, Model B predicts 23. Which model fits this point better?

Example 17

medium
For y^=4x1\hat{y}=4x-1, find the residual at (2,6)(2, 6) and state whether the point lies above or below the line.

Example 18

challenge
Dataset (1,3),(2,5),(3,4)(1,3),(2,5),(3,4) fit by y^=x+2\hat{y}=x+2. Compute the sum of squared residuals (SSR).

Example 19

challenge
A line gives residuals +4,1,3+4, -1, -3 at three points. Verify these come from a least-squares fit, and find the missing fourth residual if the four must sum to zero.

Example 20

challenge
For y^=2x+1\hat{y}=2x+1 on (1,3),(2,6),(3,7)(1,3),(2,6),(3,7), find the point with the largest squared residual and its contribution to SSR.

Example 21

easy
Observed y=22y = 22, predicted y^=18\hat{y} = 18. Find the residual.

Example 22

easy
Observed y=6y = 6, predicted y^=11\hat{y} = 11. Find the residual.

Example 23

easy
Regression line: y^=2x+3\hat{y} = 2x + 3. Observed point (4,13)(4, 13). Find the residual.

Example 24

easy
Regression line y^=x+10\hat{y} = -x + 10. Observed (3,5)(3, 5). Find the residual.

Example 25

medium
The sum of residuals for the least-squares regression line is always what number?

Example 26

medium
For five data points the residuals are +2,3,+1,1,+x+2, -3, +1, -1, +x. Find xx.

Example 27

medium
A residual plot shows a clear curved (U-shaped) pattern. What does this tell you about the regression?

Example 28

medium
A residual plot shows residuals fanning out (increasing spread as xx increases). What is this pattern called?

Example 29

medium
Regression line: y^=4x1\hat{y} = 4x - 1. Three observed points are (1,5),(2,6),(3,12)(1, 5), (2, 6), (3, 12). Find each residual.

Example 30

medium
If the largest residual is +12+12, what does this point look like on a scatterplot?

Example 31

medium
Why do we square residuals when fitting the least-squares line?

Example 32

hard
A residual plot shows residuals scattered randomly with no pattern. What does this suggest?

Example 33

hard
The residual at (x,y)=(10,50)(x, y) = (10, 50) is 8-8. What is the predicted value y^\hat{y} at x=10x = 10?

Example 34

hard
Sum of squared residuals is 8080 for n=10n = 10 points (regression with 11 predictor). Estimate the residual standard error ss.

Example 35

medium
y^=0.8x+4\hat{y} = 0.8x + 4. Observed (20,22)(20, 22). Find the residual.

Example 36

medium
For a dataset, the sum of squared residuals is 144144 with n=10n = 10. The total sum of squares is 400400. Compute R2R^2.

Example 37

easy
If a point lies exactly on the regression line, what is its residual?

Example 38

easy
Observed value 2525, predicted value 1919. Find the residual.

Example 39

easy
Observed 77, predicted 1111. Find the residual.

Example 40

easy
Using y^=2x+1\hat{y} = 2x + 1, find the residual at (5,12)(5, 12).

Example 41

easy
Using y^=3x5\hat{y} = 3x - 5, find the residual at (2,0)(2, 0).

Example 42

easy
Using y^=x+4\hat{y} = x + 4, find the residual at (6,12)(6, 12).

Example 43

medium
For y^=2x+3\hat{y} = 2x + 3, find residuals at (1,6),(2,8),(3,10)(1, 6), (2, 8), (3, 10) and identify the worst-fit point.

Example 44

medium
A residual plot shows residuals randomly scattered around 00. What does this suggest?

Example 45

medium
A residual plot shows a clear curved arc. What does this suggest about the linear model?

Example 46

medium
Using y^=4x1\hat{y} = 4x - 1, find the residual at (3,9)(3, 9).

Example 47

medium
For y^=x+8\hat{y} = -x + 8, find the residual at (2,7)(2, 7).

Example 48

hard
A residual plot shows a funnel widening to the right. What problem does this indicate?

Example 49

hard
For y^=3x\hat{y} = 3x, residuals at (1,5)(1, 5) and (2,4)(2, 4) are computed. Which point has the larger absolute residual?

Example 50

hard
For y^=2x+1\hat{y} = 2x + 1, three points are (1,3),(2,4),(3,8)(1,3),(2,4),(3,8). Which point has the largest residual?

Example 51

medium
A line predicts y^=50\hat{y}=50 at x=10x=10. The observed yy is 4646. Find the residual.

Example 52

hard
Two regression models give SSR values of 200200 and 9090 on the same data. Which fits better, and why?

Example 53

challenge
For the line y^=2x+1\hat{y} = 2x + 1 applied to (1,4),(2,5),(3,8)(1,4),(2,5),(3,8), compute the sum of residuals and explain why it is not zero.

Example 54

hard
Given y^=20+4x\hat{y} = 20 + 4x and actual data points (2, 30), (3, 33), (4, 35), find the residual for each point.

Example 55

hard
A model predicts values 18, 22, and 26 for three points, while the actual values are 20, 21, and 30. Find the residuals and identify which point has the largest underprediction.

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

linear regression