Residuals Examples: 65 Problems with Answers

Worked examples of Residuals to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

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

Answer

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

First step

1.
Predict y^=0.5(10)+2=7.

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

SetupKey insightWhy it worksCommon pitfallConnection

Free: full solutions on 3 topics a day. No card.

Every topic, every day: the Family plan

Example 2

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

Example 3

hard
Four points have residuals +5,−4,+2,r4. Their sum is 0. Find r4 and explain.

Example 4

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

Example 5

challenge
An influential observation has very high leverage (extreme x) 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, complete the residual table for (2,3),(4,5),(6,4),(8,7).

Example 7

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

Example 8

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

Example 9

hard
A regression model predicts y^=30 for a data point, but the actual value is y=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 each one, 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 means the model did what?

Example 4

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

Example 5

easy
Predicted y^=12 and observed y=12. Find the residual.

Example 6

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

Example 7

easy
A residual is the difference between which two values?

Example 8

easy
Using y^=3x−2, find the residual at (4,8).

Example 9

medium
For y^=x+2, find the residuals at (1,4) and (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, the points are (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, find the residual at (2,5) and state over- or under-estimate.

Example 16

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

Example 17

medium
For y^=4x−1, find the residual at (2,6) and state whether the point lies above or below the line.

Example 18

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

Example 19

challenge
A line gives residuals +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 on (1,3),(2,6),(3,7), find the point with the largest squared residual and its contribution to SSR.

Example 21

easy
Observed y=22, predicted y^=18. Find the residual.

Example 22

easy
Observed y=6, predicted y^=11. Find the residual.

Example 23

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

Example 24

easy
Regression line y^=−x+10. Observed (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. Find x.

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 x increases). What is this pattern called?

Example 29

medium
Regression line: y^=4x−1. Three observed points are (1,5),(2,6),(3,12). Find each residual.

Example 30

medium
If the largest residual is +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) is −8. What is the predicted value y^ at x=10?

Example 34

hard
Sum of squared residuals is 80 for n=10 points (regression with 1 predictor). Estimate the residual standard error s.

Example 35

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

Example 36

medium
For a dataset, the sum of squared residuals is 144 with n=10. The total sum of squares is 400. Compute R2.

Example 37

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

Example 38

easy
Observed value 25, predicted value 19. Find the residual.

Example 39

easy
Observed 7, predicted 11. Find the residual.

Example 40

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

Example 41

easy
Using y^=3x−5, find the residual at (2,0).

Example 42

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

Example 43

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

Example 44

medium
A residual plot shows residuals randomly scattered around 0. 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^=4x−1, find the residual at (3,9).

Example 47

medium
For y^=−x+8, find the residual at (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, residuals at (1,5) and (2,4) are computed. Which point has the larger absolute residual?

Example 50

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

Example 51

medium
A line predicts y^=50 at x=10. The observed y is 46. Find the residual.

Example 52

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

Example 53

challenge
For the line y^=2x+1 applied to (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 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.

What to focus on

Core idea: A residual is what the model got wrong for one point, y−y^; residuals that scatter randomly around zero mean the model captured the pattern, while any shape in them means it missed something.

Common stuck point: Students often know a procedure related to residuals but skip the recognition step: Do you need how far one actual value sits above or below the value a fitted model predicted for it? That leads to a calculation or graph that looks reasonable but answers a different question.

Ask yourself: Do you need how far one actual value sits above or below the value a fitted model predicted for it?

Concept recap

A residual is the difference between an observed data value and the value predicted by a statistical model, calculated as residual=yobserved−ypredicted. Positive residuals mean the model underestimated; negative residuals mean it overestimated.

When a tailor tries a suit on a customer, the wrinkles that remain are its residuals: where the fabric bunches or pulls shows where the pattern does not match the body. Small random wrinkles are fine, but the same pull along one seam every time means the pattern itself needs changing.

Read the full lesson on Residuals

Residuals is covered with related ideas in the guide Data Representation, Variability, and Sampling Guide.

Related concepts

Background knowledge

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

linear regression