Lesson 5: Residuals and residual plots
Calculate and interpret a residual
SkillCalculating residuals
Worked example
For the café data, the least-squares line is
On a 30 °C day the café sold 82 iced coffees. Calculate the residual for this day and explain what it tells you.
Step 1: Find the predicted value
Step 2: Subtract predicted from actual
Residual is always actual minus predicted, so a point above the line has a positive residual.
Step 3: Interpret
The residual is positive, so the point is above the line: the café sold about 7 more iced coffees than the model predicted.
Answer
The residual is 6.96: the café sold about 7 more iced coffees than predicted, so the point lies above the line.
Try a similar one
A fresh question of the same kind, checked as you answer, with hints and a full solution.
Method
Substitute the explanatory value to find the predicted value.
Residual = actual − predicted.
Positive: above the line (under-predicted). Negative: below (over-predicted).
Watch out for
Calculating predicted − actual, which gives .