Residual plot practice problems with full solutions

By Jude Wallis · Updated

These 8 problems build one habit: compute a residual as observed minus predicted, read its sign, then let the shape of the residual plot decide whether a line belongs on the data. Problem 7 is the one worth getting right, where r is 0.986 and the linear model is still wrong.

AP Statistics: Unit 5 (topics 5.3 Linear Regression Models, 5.4 Residuals). Topic 5.4 Residuals sits in Unit 5, Regression Analysis, of the Fall 2026 AP Statistics course, worth 10 to 20 percent of the multiple-choice section, where you are asked to calculate the difference between observed and predicted values, interpret it, and describe the form of an association from a residual plot.

What these 8 problems build

A residual is what the line missed by: residual=yy^\text{residual} = y - \hat{y}, the observed response minus the predicted response, where y^\hat{y} (read "y-hat") is the value the regression line gives for that case. Every problem below runs on that one subtraction, then asks what the answer means.

Three readings come up again and again.

  • Sign. A positive residual puts the observed value above the line, so the model underpredicted that case. A negative residual means the model overpredicted it.
  • Size. The size of a residual, in the units of yy, is how far the line missed. Sign gives direction and size gives accuracy, and those are separate questions.
  • Shape. A residual plot graphs the residuals against xx or against y^\hat{y}. Random scatter around zero says a line is an appropriate model, and curvature says it is not.

One fact saves you on several of these problems: for a least-squares line the residuals always add to exactly zero, so a sum of zero is an arithmetic check and never evidence of a good fit. Problems 1 to 3 are single-residual calculations, 4 to 6 move to full sets of residuals and to reading a plot, and 7 and 8 are the AP-style items where a strong correlation and a zero sum both fail to rescue a wrong model.

Work each problem before opening the steps. For the underlying method read how to interpret residual plots, check any line or plot you build against the regression calculator, and see the course wording at topic 5.4 Residuals. The one-line definition sits in the residual plot glossary entry, and correlation and residuals practice adds the correlation rr and the coefficient of determination r2r^2 to the same skills.

Problem 1

A ferry company models crossing time in minutes, y^\hat{y}, from the wind speed on the strait in km/h, xx, using the least-squares line y^=22+0.4x\hat{y} = 22 + 0.4x. (a) A crossing made in a 15 km/h wind took 26 minutes. Find its residual. (b) A crossing made in a 30 km/h wind took 37 minutes. Find its residual. (c) On a residual plot of these crossings, which one plots above the horizontal line at zero?

Show the worked solution
  1. (a) Predict first. At x=15x = 15, y^=22+0.4(15)=22+6=28\hat{y} = 22 + 0.4(15) = 22 + 6 = 28 minutes.

  2. (a) Subtract predicted from observed. residual=yy^=2628=2\text{residual} = y - \hat{y} = 26 - 28 = -2 minutes, so that crossing finished 2 minutes sooner than the line predicted.

  3. (b) Predict at x=30x = 30. y^=22+0.4(30)=22+12=34\hat{y} = 22 + 0.4(30) = 22 + 12 = 34 minutes.

  4. (b) Subtract again. residual=3734=+3\text{residual} = 37 - 34 = +3 minutes, so that crossing ran 3 minutes longer than the line predicted.

  5. (c) A residual plot puts the residual itself on the vertical axis, so a point sits above zero exactly when its residual is positive. The 30 km/h crossing has a residual of +3+3 and plots 3 units above the zero line, while the 15 km/h crossing has a residual of 2-2 and plots 2 units below it.

(a) 2628=226 - 28 = -2 minutes. (b) 3734=+337 - 34 = +3 minutes. (c) The 30 km/h crossing, because its residual is positive.

Problem 2

A city compost program records, for each collection week, the number of households enrolled, xx, and the compost collected in kilograms, yy. The least-squares line is y^=40+3x\hat{y} = 40 + 3x. (a) A week with 25 households enrolled produced 130 kg. Find the residual and say what its sign means. (b) An earlier week with 12 households enrolled produced 70 kg. Find the residual and say what its sign means. (c) A program officer writes that the 25-household week shows the model is working, because its residual came out positive. What is wrong with that reasoning?

Show the worked solution
  1. (a) Predict at x=25x = 25. y^=40+3(25)=40+75=115\hat{y} = 40 + 3(25) = 40 + 75 = 115 kg.

  2. (a) Take observed minus predicted. 130115=+15130 - 115 = +15 kg. The residual is positive, so the observed weight sits above the line and the model underpredicted that week by 15 kg.

  3. (b) Predict at x=12x = 12. y^=40+3(12)=40+36=76\hat{y} = 40 + 3(12) = 40 + 36 = 76 kg.

  4. (b) Subtract. 7076=670 - 76 = -6 kg. The residual is negative, so the model overpredicted that week by 6 kg.

  5. (c) Separate sign from size. The sign of a residual reports only which side of the line a case fell on. Accuracy is the size of the miss, and by that measure the 25-household week is the worse of the two fits: the line was off by 15 kg there against 6 kg for the 12-household week.

  6. (c) Say what the positive residual does mean. The program collected 15 kg more than the line predicted for 25 households, which may be welcome news about that week's collection. It is not a statement about how well the model describes the program.

(a) 130115=+15130 - 115 = +15 kg, positive, so the model underpredicted by 15 kg. (b) 7076=670 - 76 = -6 kg, negative, so the model overpredicted by 6 kg. (c) The sign gives the direction of the miss, not the quality of the fit, and the +15+15 kg week is the one the line fits worse.

Problem 3

A hatchery models a young trout's length in centimeters, y^\hat{y}, from its age in months, xx, with the least-squares line y^=6+1.5x\hat{y} = 6 + 1.5x. (a) One trout is 8 months old and has a residual of 2.5-2.5 cm. How long is it, and what does the residual say about that fish? (b) A second trout measures 24 cm and has a residual of +1.5+1.5 cm. How old is it? (c) A third trout has a residual of exactly 00. What does that tell you about that fish, and what does it not tell you about the model?

Show the worked solution
  1. (a) Predict at x=8x = 8. y^=6+1.5(8)=6+12=18\hat{y} = 6 + 1.5(8) = 6 + 12 = 18 cm.

  2. (a) Rearrange the residual formula. From residual=yy^\text{residual} = y - \hat{y} you get y=y^+residual=18+(2.5)=15.5y = \hat{y} + \text{residual} = 18 + (-2.5) = 15.5 cm. The negative residual means the line overpredicted this fish by 2.5 cm, so it is shorter than the hatchery's model expects at 8 months.

  3. (b) Work backwards to the prediction. y^=yresidual=241.5=22.5\hat{y} = y - \text{residual} = 24 - 1.5 = 22.5 cm, so the line predicted 22.5 cm for this fish.

  4. (b) Solve for the age that produces that prediction. 6+1.5x=22.56 + 1.5x = 22.5 gives 1.5x=16.51.5x = 16.5, so x=16.51.5=11x = \frac{16.5}{1.5} = 11 months. Check it: 6+1.5(11)=6+16.5=22.56 + 1.5(11) = 6 + 16.5 = 22.5 cm.

  5. (c) Read the zero. A residual of 00 means y=y^y = \hat{y}, so that fish lies exactly on the regression line and the prediction matched its measured length.

  6. (c) Say what it does not settle. One point on the line is a single lucky hit, not a verdict on the model. Whether a line is the right shape depends on the pattern of all the residuals together, which is what a residual plot shows.

(a) 18+(2.5)=15.518 + (-2.5) = 15.5 cm, and the line overpredicted this fish by 2.5 cm. (b) The prediction was 241.5=22.524 - 1.5 = 22.5 cm, so 6+1.5x=22.56 + 1.5x = 22.5 and x=11x = 11 months. (c) That fish sits exactly on the line, so the prediction matched its length; it says nothing about how well the model fits the other fish.

Problem 4

A caterer records the number of guests, xx, and the kilograms of food waste, yy, at five events: (10,4)(10, 4), (20,10)(20, 10), (30,11)(30, 11), (40,12)(40, 12), (50,18)(50, 18). The least-squares line is y^=2+0.3x\hat{y} = 2 + 0.3x. (a) Compute all five residuals. (b) Show that they add to zero and explain why that had to happen. (c) Which events did the line overpredict, and by how much? (d) Describe the residual plot and say whether a linear model is appropriate here.

Show the worked solution
  1. (a) Predict at each guest count from y^=2+0.3x\hat{y} = 2 + 0.3x, then subtract predicted from observed.

    Guests xxObserved yyPredicted y^\hat{y}Residual yy^y - \hat{y}
    10451-1
    20108+2+2
    30111100
    4012142-2
    501817+1+1
  2. (a) Check two rows by hand. At x=20x = 20, y^=2+0.3(20)=2+6=8\hat{y} = 2 + 0.3(20) = 2 + 6 = 8 kg and the residual is 108=+210 - 8 = +2 kg. At x=40x = 40, y^=2+0.3(40)=2+12=14\hat{y} = 2 + 0.3(40) = 2 + 12 = 14 kg and the residual is 1214=212 - 14 = -2 kg.

  3. (b) Add them. (1)+2+0+(2)+1=0(-1) + 2 + 0 + (-2) + 1 = 0 kg.

  4. (b) Explain the zero. A least-squares line always passes through the point of averages (xˉ,yˉ)(\bar{x}, \bar{y}), read as x-bar and y-bar. Here xˉ=1505=30\bar{x} = \frac{150}{5} = 30 guests and yˉ=555=11\bar{y} = \frac{55}{5} = 11 kg, and 2+0.3(30)=112 + 0.3(30) = 11, so the line does pass through it. That forces the residuals to sum to zero for any data set, which makes the sum an arithmetic check on your subtraction rather than evidence about the fit.

  5. (c) Pick out the negative residuals, since negative means the prediction sat above the observation. The 10-guest event was overpredicted by 1 kg and the 40-guest event by 2 kg.

  6. (d) Describe the plot. Plotted against guests, the residuals run 1,+2,0,2,+1-1, +2, 0, -2, +1 kg: they fall on both sides of zero across the whole range, they do not bend into a curve or an arch, and their sizes do not grow as the events get larger.

  7. (d) State the verdict. That apparent randomness is what confirms a linear form, so a line is an appropriate model for these events. Five points is thin evidence for any statement about shape, so treat it as no reason to doubt the line rather than as proof.

(a) Residuals 1,+2,0,2,+1-1, +2, 0, -2, +1 kg. (b) They sum to 00, which least squares forces because the line passes through (xˉ,yˉ)=(30,11)(\bar{x}, \bar{y}) = (30, 11). (c) The 10-guest event was overpredicted by 1 kg and the 40-guest event by 2 kg. (d) The residuals scatter on both sides of zero with no curve and no widening, so a line is appropriate, though five points is thin evidence.

Problem 5

Three studies each fit a least-squares line and produce a residual plot of the residuals against the explanatory variable.

  • Plot A, a print shop, finishing time against the number of copies in a job: the residuals fall on both sides of zero across the whole range of xx, and the vertical spread stays about the same, roughly 6-6 to +6+6 minutes, at every xx. Nothing bends.
  • Plot B, a reservoir, water released against the rainfall two days earlier: every residual at the low end of xx is negative, every residual in the middle of the range is positive, and every residual at the high end is negative again, tracing a smooth arch.
  • Plot C, a warehouse, order picking time against the number of items in the order: for the smallest orders the residuals sit within 22 minutes of zero, and for the largest orders they run from about 15-15 to +15+15 minutes. The residuals stay centered on zero all the way across and nothing bends.

(a) For each plot, say whether a linear model is appropriate. (b) What does plot B tell you about where the line misses? (c) A student says plot C proves the line is the wrong shape. Correct that. (d) In which of the three plots do the residuals add to zero?

Show the worked solution
  1. (a) Plot A. The residuals scatter randomly around zero with constant spread and no bend, so nothing systematic is left over. Apparent randomness in a residual plot confirms a linear form, so a line is an appropriate model.

  2. (a) Plot B. The sign of a residual here is decided by where you sit in the range: negative at the bottom, positive in the middle, negative at the top. That is curvature, not scatter, and curvature says the linear model is not the appropriate model for these data.

  3. (a) Plot C. Nothing bends, so the plot gives no evidence against a straight-line form. What it does show is that the spread of the residuals grows with order size, so a line is still a defensible description of the form while its predictions are far less precise for large orders.

  4. (b) Read the arch as a set of directions. Negative residuals mean the observations sit below the line, so the model overpredicts at both the low and the high ends of rainfall. Positive residuals in the middle mean it underpredicts there. A model that bends the same way the data do would remove that pattern.

  5. (c) Correct the student. A fan is about spread, not about shape. Curvature is the signal that the form is wrong, and plot C has none: it has unequal spread, which changes how much you trust a prediction rather than whether the line has the right form. The AP course names apparent randomness and curvature as the two things to read off a residual plot, so on the exam the defensible statement about plot C is about the reliability of predictions at large xx.

  6. (d) All three. Least squares forces the residuals of a fitted line to add to zero no matter what the plot looks like, so the sum cannot tell plot A, plot B, and plot C apart. Only the pattern can.

(a) A: appropriate, random scatter with constant spread. B: not appropriate, the arch is curvature. C: the form is not contradicted, but the spread grows, so predictions for large orders are much less precise. (b) The line overpredicts at both ends of the rainfall range and underpredicts in the middle. (c) A fan reports changing spread, not a wrong form; curvature is the signal for a wrong form and plot C has none. (d) All three, because least squares forces the residuals to sum to zero.

Problem 6

A parks department fits maintenance hours per season, y^\hat{y}, to trail length in kilometers, xx, for six sections and gets y^=4+2.5x\hat{y} = 4 + 2.5x. Its residual plot shows one point per section.

SectionLength xx (km)Residual (hours)
Cedar21-1
Birch4+1+1
Fern6+5+5
Granite86-6
Heron102-2
Juniper12+3+3

(a) Which section does the line fit worst, and by how much? (b) What does the sign of that section's residual say about it? (c) Which section did the line underpredict by the most? (d) How many maintenance hours did the worst-fit section actually take? (e) Does the plot give you a reason to abandon the linear model?

Show the worked solution
  1. (a) Compare the sizes of the residuals, ignoring sign, because a miss of 6-6 hours is the same size of error as a miss of +6+6. The sizes are 1,1,5,6,2,31, 1, 5, 6, 2, 3 hours, so Granite has the largest at 6 hours.

  2. (b) Read the sign. Granite's residual is negative, so its observed hours sit below the line: the model overpredicted Granite by 6 hours, and that section took 6 fewer hours than its length would suggest.

  3. (c) Take the largest positive residual, since positive means the model underpredicted. Fern, at +5+5 hours, needed 5 more hours than the line predicted.

  4. (d) Predict for Granite at x=8x = 8. y^=4+2.5(8)=4+20=24\hat{y} = 4 + 2.5(8) = 4 + 20 = 24 hours.

  5. (d) Add the residual to the prediction. y=y^+residual=24+(6)=18y = \hat{y} + \text{residual} = 24 + (-6) = 18 hours, so Granite actually took 18 hours.

  6. (e) Look for a pattern rather than for a large point. Across lengths of 2 to 12 km the residuals run 1,+1,+5,6,2,+3-1, +1, +5, -6, -2, +3: they change sign irregularly, they trace no arch or U, and their sizes do not widen as the sections get longer. Their sum is (1)+1+5+(6)+(2)+3=0(-1) + 1 + 5 + (-6) + (-2) + 3 = 0, as least squares requires.

  7. (e) Give the verdict. Nothing in the plot says the form is wrong, so there is no reason to abandon the line. The Granite miss of 6 hours is a single point to go and ask about, since something about that section made it cheaper to maintain than its length predicts.

(a) Granite, missed by 6 hours. (b) The residual is negative, so the line overpredicted Granite: it took 6 fewer hours than predicted. (c) Fern, underpredicted by 5 hours. (d) Predicted 4+2.5(8)=244 + 2.5(8) = 24 hours, so observed =246=18= 24 - 6 = 18 hours. (e) No. The residuals show no curve and no widening, so the form looks fine; Granite is one point worth investigating, not a reason to drop the model.

Problem 7

A driving school measures the braking distance in meters, yy, of one car from five speeds in km/h, xx, on the same dry surface: (30,5)(30, 5), (40,9)(40, 9), (50,15)(50, 15), (60,23)(60, 23), (70,33)(70, 33). Technology reports the least-squares line y^=18+0.7x\hat{y} = -18 + 0.7x with r=0.986r = 0.986. (a) Compute the five residuals. (b) Describe the residual plot. (c) The instructor argues that r=0.986r = 0.986 is proof the linear model fits well. Decide whether that argument holds, and justify your answer from the residual plot. (d) Find what the line predicts at 90 km/h, then use the pattern in the data to say whether that prediction is too high or too low.

Show the worked solution
  1. (a) Predict at each speed, then subtract predicted from observed.

    Speed xxObserved yyPredicted y^=18+0.7x\hat{y} = -18 + 0.7xResidual yy^y - \hat{y}
    3053+2+2
    409101-1
    5015172-2
    6023241-1
    703331+2+2
  2. (a) Check two rows and the sum. At x=30x = 30, y^=18+0.7(30)=18+21=3\hat{y} = -18 + 0.7(30) = -18 + 21 = 3 m, so the residual is 53=+25 - 3 = +2 m. At x=60x = 60, y^=18+0.7(60)=18+42=24\hat{y} = -18 + 0.7(60) = -18 + 42 = 24 m, so the residual is 2324=123 - 24 = -1 m. The five residuals sum to 2+(1)+(2)+(1)+2=02 + (-1) + (-2) + (-1) + 2 = 0, as least squares requires.

  3. (b) Describe the shape. Against speed the residuals go +2,1,2,1,+2+2, -1, -2, -1, +2: positive at both ends and negative through the middle, a clear U. That is a systematic pattern, not scatter, and it means the line underpredicts the fastest and slowest stops and overpredicts the ones in the middle.

  4. (c) Say what rr actually measures. The correlation rr reports how tightly the points cluster around a straight line and the direction of that trend. It cannot report whether a straight line is the right shape, because it has no way to compare a line against a curve.

  5. (c) Confirm the number, then rule against the instructor. Squaring gives r2=0.9862=0.972r^2 = 0.986^2 = 0.972, which you can verify from the residuals: the sum of the squared residuals is 22+(1)2+(2)2+(1)2+22=4+1+4+1+4=142^2 + (-1)^2 + (-2)^2 + (-1)^2 + 2^2 = 4 + 1 + 4 + 1 + 4 = 14, the total sum of squares about yˉ=17\bar{y} = 17 m is 144+64+4+36+256=504144 + 64 + 4 + 36 + 256 = 504, and 114504=0.9721 - \frac{14}{504} = 0.972. So the line does remove about 97 percent of the variation in braking distance, and the U-shaped residual plot still shows the leftover misses are systematic. The residual plot decides the form, so the instructor's argument does not hold and a curved model would fit better.

  6. (d) Use the line first. y^=18+0.7(90)=18+63=45\hat{y} = -18 + 0.7(90) = -18 + 63 = 45 m.

  7. (d) Now read the data's own pattern. Across equal 10 km/h steps the observed distances rise by 95=49 - 5 = 4, 159=615 - 9 = 6, 2315=823 - 15 = 8, and 3323=1033 - 23 = 10 m, so each step adds 2 m more than the step before. Continuing that pattern gives 33+12=4533 + 12 = 45 m at 80 km/h and 45+14=5945 + 14 = 59 m at 90 km/h.

  8. (d) State the conclusion. The line's 45 m at 90 km/h is far too low, roughly 14 m short, because the true relationship curves upward and the line cannot follow it. The prediction is also an extrapolation past the fastest speed tested, so the honest answer is that this line should not be used at 90 km/h at all.

(a) Residuals +2,1,2,1,+2+2, -1, -2, -1, +2 m, summing to 00. (b) A clear U: positive at both ends, negative through the middle. (c) The argument fails. r=0.986r = 0.986 measures scatter about a line, not whether a line is the right form, and the U shows the misses are systematic, so a curved model fits better. (d) The line gives 45 m, and the data's second differences of 2 m point to about 59 m, so the line's prediction is far too low as well as an extrapolation.

Problem 8

A park runs six clean-up events and records the number of volunteers, xx, and the litter collected in kilograms, yy: (4,19)(4, 19), (6,29)(6, 29), (8,36)(8, 36), (10,42)(10, 42), (12,47)(12, 47), (14,49)(14, 49). The least-squares line is y^=10+3x\hat{y} = 10 + 3x. (a) Compute the six residuals and their sum. (b) A coordinator says the sum shows the line fits the data well. Respond. (c) Describe the residual plot and say whether a linear model is appropriate, justifying your answer. (d) A seventh event with 16 volunteers collected an amount that fell 9 kg below the line's prediction. Find that amount and say how it fits your answer to part (c).

Show the worked solution
  1. (a) Predict at each volunteer count, then subtract predicted from observed.

    Volunteers xxObserved yyPredicted y^=10+3x\hat{y} = 10 + 3xResidual yy^y - \hat{y}
    419223-3
    62928+1+1
    83634+2+2
    104240+2+2
    124746+1+1
    1449523-3
  2. (a) Check two rows and add. At x=4x = 4, y^=10+3(4)=22\hat{y} = 10 + 3(4) = 22 kg and the residual is 1922=319 - 22 = -3 kg. At x=12x = 12, y^=10+3(12)=46\hat{y} = 10 + 3(12) = 46 kg and the residual is 4746=+147 - 46 = +1 kg. The sum is (3)+1+2+2+1+(3)=0(-3) + 1 + 2 + 2 + 1 + (-3) = 0 kg.

  3. (b) Answer the coordinator. The sum had to be zero. A least-squares line passes through (xˉ,yˉ)(\bar{x}, \bar{y}), and here xˉ=546=9\bar{x} = \frac{54}{6} = 9 volunteers and yˉ=2226=37\bar{y} = \frac{222}{6} = 37 kg, with 10+3(9)=3710 + 3(9) = 37. Every least-squares fit produces residuals that sum to zero, including a terrible one, so the sum checks your subtraction and says nothing about the fit.

  4. (c) Describe the plot. Against volunteers, the residuals run 3,+1,+2,+2,+1,3-3, +1, +2, +2, +1, -3 kg: negative at both ends, positive through the middle, tracing a smooth arch rather than scatter.

  5. (c) Give the verdict and the reason. Curvature in a residual plot means the linear model is not the appropriate model, so a line should not be used here. The data say the same thing directly: each extra pair of volunteers added 10,7,6,510, 7, 6, 5, and then 22 kg, so the returns shrink as the crew grows, which is what happens when a fixed amount of litter is being picked up by more and more people.

  6. (d) Predict at x=16x = 16. y^=10+3(16)=10+48=58\hat{y} = 10 + 3(16) = 10 + 48 = 58 kg, and falling 9 kg below that prediction is a residual of 9-9 kg.

  7. (d) Recover the observation. y=y^+residual=58+(9)=49y = \hat{y} + \text{residual} = 58 + (-9) = 49 kg, the same amount the 14-volunteer event collected. That is exactly what the arch predicted: the collection has flattened out, the line keeps climbing at 3 kg per volunteer, and the gap between them grows the further past the data you push it.

(a) Residuals 3,+1,+2,+2,+1,3-3, +1, +2, +2, +1, -3 kg, summing to 00. (b) The sum is zero for every least-squares fit, since the line passes through (xˉ,yˉ)=(9,37)(\bar{x}, \bar{y}) = (9, 37), so it is an arithmetic check and not evidence of a good fit. (c) The residuals trace an arch, negative at both ends and positive in the middle, and that curvature means a linear model is not appropriate; the collected amounts rise by 10, 7, 6, 5, then 2 kg, showing shrinking returns. (d) Predicted 5858 kg, so the event collected 589=4958 - 9 = 49 kg, matching the flattening the arch already showed.