Unit 5 · Topic 5.4 Beta

Residuals

A residual is actual minus predicted, y − y-hat : positive when the point is above the line, negative when below, in the units of y .

Practice 3: Analyze DataPractice 4: Interpret Results

Part 1 · Hook

Why this matters

A dealer fits a line to the ages and prices of 16 used cars. The line looks reasonable at a glance, but the newest and oldest cars sit above it and the middle-aged ones below. Each car's miss, actual minus predicted, is its residual, and plotting the residuals shows at once whether a line was the right choice.

Part 2 · Before you start

What this builds on

Part 3 · Prerequisite check

Quick check before you start

1. For y^=20−2x\hat{y} = 20 - 2x, what is the predicted value at x=3x = 3?

  1. 1414
  2. 2626
  3. 1818
  4. 66
Show the answer

20−2(3)=1420 - 2(3) = 14.

  • Correct: 1414:
  • 2626:
  • 1818:
  • 66:

2. What does the hat in y^\hat{y} mean?

  1. A predicted value
  2. An observed value
  3. An average of the xx values
  4. A residual
Show the answer

y^\hat{y} is a predicted value from the line.

  • Correct: A predicted value:
  • An observed value:
  • An average of the xx values:
  • A residual:

Part 4 · See it

See it first

Top: used car age against price with a regression line; the points bend away from it. Bottom: the residual plot, with residuals positive for the newest cars, negative in the middle and positive again for the oldest, a U shape.
Top: the car data and a regression line. Bottom: the residuals, which form a U shape, so a line is not the right model. LevlPrep original diagram.

Part 5 · Step by step

How it works, step by step

  1. A line predicts y^\hat{y} for each observed xxeach point misses by its residual, y−y^y - \hat{y}, the vertical gap from the line
  2. A point above the linehas a positive residual: the line underpredicts; below the line, negative: it overpredicts
  3. Plot each residual against xxthe residual plot removes the trend, so what is left is the pattern the line missed
  4. Random scatter around 0 means the line is fine; a curve means the data bend; a fan means the spread changesuse the residual plot to decide whether a linear model is appropriate

Part 6 · Key ideas

Key ideas

  • Residual =y−y^= y - \hat{y}, actual minus predicted, in the units of yy.
  • Positive residual: actual above the line (underpredicted). Negative: below the line (overpredicted).
  • A residual plot graphs residuals against xx (or against y^\hat{y}).
  • No pattern: a line is appropriate. A curved pattern: a line is not. A fan: predictions are less precise where the spread is larger.

Part 7 · Misconception

A common mistake

The wrong idea: If the residuals are both positive and negative, the line must fit well.

What actually happens: Every line has residuals of both signs. What matters is the pattern: a curve or fan in the residual plot means the line misses the data in a systematic way.

Part 8 · Check yourself

Check yourself

Exam-style questions. Anything you miss goes into your review queue.

Graph

Car age and price: the line and its residuals

The dealer's 16 used cars of one model (age in years, price in thousands of dollars) with the regression line price^\widehat{\text{price}}=29.56−1.905(age)= 29.56 - 1.905(\text{age}). The bottom panel is the residual plot. (Invented data.)
Top: used car age against price with a regression line; the points bend away from it. Bottom: the residual plot, with residuals positive for the newest cars, negative in the middle and positive again for the oldest, a U shape.
LevlPrep original diagram.

1. The 5-year-old car is listed at 17.6 thousand dollars. What is its residual, in thousands of dollars? Give two decimal places.

Type a number. A table answer and a calculator answer are both accepted.

Show the answer

y^\hat{y}=29.56−1.905(5)= 29.56 - 1.905(5)=20.04= 20.04, so the residual is 17.6−20.04=−2.4417.6 - 20.04 = -2.44.

  • Answer: -2.44

2. Interpret the residual of about −2.44-2.44 for the 5-year-old car.

  1. It sold for about 2,438 dollars below the line's prediction
  2. Its price is about 2,438 dollars more than the line predicts
  3. The car lost about 2,438 dollars of value each year
  4. The line is wrong for this car and should be refit without it
Show the answer

Residual =y−y^= y - \hat{y}; negative means the line overpredicts.

  • Correct: It sold for about 2,438 dollars below the line's prediction: Right: a negative residual means the actual value is below the predicted value.
  • Its price is about 2,438 dollars more than the line predicts: Negative means below the line: actual minus predicted is less than 0.
  • The car lost about 2,438 dollars of value each year: A residual is a gap between actual and predicted, not a yearly change.
  • The line is wrong for this car and should be refit without it: Every point has a residual; a moderate one is normal scatter.

3. What does the residual plot show about using a line for these data?

  1. A line is appropriate, because the residuals are both positive and negative
  2. A line is appropriate, because the residuals are small
  3. A line is not appropriate, because some residuals are negative
  4. A line is not appropriate: the residuals form a U-shaped curve
Show the answer

A good line leaves residuals scattered randomly around 0, with no pattern.

  • A line is appropriate, because the residuals are both positive and negative: Residuals of any line have both signs. What matters is whether they form a pattern.
  • A line is appropriate, because the residuals are small: Size alone does not settle it; the curved pattern shows a line is the wrong shape.
  • A line is not appropriate, because some residuals are negative: Negative residuals are expected. The problem is the curved pattern.
  • Correct: A line is not appropriate: the residuals form a U-shaped curve: Right: a pattern in the residuals means the relationship is curved, so a line misses it in a systematic way.

4. For which cars does the line underpredict the price?

  1. The newest cars, but not the oldest
  2. No cars, since the line is fit to the data
  3. The newest and the oldest cars
  4. The cars aged 4 to 7 years
Show the answer

Underpredict: positive residual, actual above predicted.

  • The newest cars, but not the oldest: The oldest cars also have positive residuals.
  • No cars, since the line is fit to the data: A fitted line still misses individual points both ways.
  • Correct: The newest and the oldest cars: Right: their residuals are positive, so the actual prices are above the line.
  • The cars aged 4 to 7 years: Those residuals are negative: the line overpredicts them.

5. A line predicts a student's exam score from homework average: y^=12.5+0.8x\hat{y} = 12.5 + 0.8x. A student with a homework average of 40 scored 47. Write the expression for the residual, then evaluate it.

Type the expression as on the exam, with the values substituted.

Show the answer

Residual =47−(12.5+0.8(40))= 47 - (12.5 + 0.8(40))=47−44.5= 47 - 44.5=2.5= 2.5 points.

  • Answer: 47−(12.5+0.8⋅40)47 - (12.5 + 0.8 \cdot 40)

6. A line overpredicts a value. What is the sign of its residual?

  1. Positive
  2. Zero
  3. It depends on the slope
  4. Negative
Show the answer

Below the line: negative residual.

  • Positive: Positive means the actual value is above the prediction, an underprediction.
  • Zero: Zero means the prediction is exact.
  • It depends on the slope: The sign depends only on whether the point is above or below the line.
  • Correct: Negative: Right: overpredicting means y^>y\hat{y} > y, so y−y^<0y - \hat{y} < 0.

Part 9 · Summary

Summary

A residual is actual minus predicted, y−y^y - \hat{y}: positive when the point is above the line, negative when below, in the units of yy. A residual plot shows the residuals against xx; random scatter around 0 means a line is appropriate, while a curve or a fan shows what the line misses.

Part 10 · Up next

What comes next

Part 11 · Connections

Connections