ASCENTLEARNING
Join a weekly class
Skip to learning content
Year 12 · Statistics and regression · 18 min

Residuals

Use residuals to diagnose prediction errors and the form of a fitted model.

01 / LEARN

The idea, step by step

Observed minus predicted

A residual is e=y-ŷ. A positive residual means the observed response is above the model prediction, so the model underestimates that observation. A negative residual means the model overestimates. Residual units are the same as response units.

Use the fitted response at the same x as the observation. A residual is not y divided by ŷ, nor the difference between two adjacent responses.

e=y−y^.

Look for structure in a residual plot

Plot residuals vertically against the explanatory variable or fitted values, with a horizontal zero line. A useful linear model tends to leave a patternless cloud around zero. A curved pattern suggests that the model has missed curvature; a widening spread suggests unequal variability.

Residual checks assess model suitability. For a least-squares line with an intercept fitted to those observations, residuals sum to zero before rounding, but individual residuals are usually not zero.

A common trap

A positive residual means the model prediction was too high.

Instead: A positive observed-minus-predicted residual means the model predicted too low.

02 / WORKED EXAMPLES

See the thinking

Example 1

A signed error

For the model ŷ=5+2x, an observation is (4,16). Find and interpret its residual.

  1. At x=4, ŷ=5+8=13.
  2. e=16-13=3.
  3. The observed response is 3 units above the prediction.
Residual +3; the model underestimates this observation.
Example 2

A missed curve

Residuals at x=1,2,3,4,5 are 2,-1,-2,-1,2. What pattern is present?

Paired measurements
xResidual
12
2-1
3-2
4-1
52
  1. The residuals are positive at both ends and negative in the middle.
  2. They form a U-shaped pattern rather than random scatter.
  3. A curved model should be investigated.
The linear model misses a curved relationship.

Check your understanding

Observed y=12 and predicted y=15. Find the residual.

Show answer

-3.

Subtract predicted from observed: 12-15=-3.

03 / WORKSHEET

Your turn

6 questions · 18 marks · Work at your own pace.

Read the questions online
  1. For ŷ=3+4x and the observation (2,13), find the residual.
    3 marks
  2. For ŷ=20-0.5x and the observation (6,15), find the residual.
    3 marks
  3. A residual is -4 kg. Interpret its sign and unit.
    3 marks
  4. Residuals are -0.4,0.6,-0.2,0.1,-0.1. Find their sum. Does a zero sum alone prove a good fit?
    3 marks
  5. Residual spread grows as x increases. What feature needs investigation?
    3 marks
  6. A line was chosen by eye, not fitted by least squares. Must its residuals sum to zero?
    3 marks
Read the worked solutions

Equivalent correct methods earn the corresponding marks. Include units where asked.

  1. For ŷ=3+4x and the observation (2,13), find the residual.
    3 marks

    Predicted response is 3+8=11.

    Residual=13-11=2.

    2.
  2. For ŷ=20-0.5x and the observation (6,15), find the residual.
    3 marks

    Predicted response is 17.

    Residual=15-17=-2.

    -2.
  3. A residual is -4 kg. Interpret its sign and unit.
    3 marks

    Residuals retain response units.

    The observation is 4 kg below the prediction, so the model overestimates mass by 4 kg.
  4. Residuals are -0.4,0.6,-0.2,0.1,-0.1. Find their sum. Does a zero sum alone prove a good fit?
    3 marks

    Add the signed residuals.

    A zero sum can coexist with curvature or other unsuitable patterns.

    Sum=0; no.
  5. Residual spread grows as x increases. What feature needs investigation?
    3 marks

    The fit may have non-constant error spread.

    A single typical prediction error may not describe the whole range.

    The variability of errors may increase with x.
  6. A line was chosen by eye, not fitted by least squares. Must its residuals sum to zero?
    3 marks

    A freely chosen line is not constrained by that fitting condition.

    No. The zero-sum property applies to the least-squares intercept fit to the same data.
Checking saved progress…

Continue learning

Exponential regression

Next lesson
Curriculum reference & lesson scope

SACE Board of South Australia

Stage 2 General Mathematics: statistical models. Original lessons and assessment practice; not an official SACE assessment.

Official curriculum source ↗
Back to Statistics and regression

Save your next step.

Create a free account to save your learning progress. Lessons and downloads stay free, with or without an account.

Create free account