Residual plots
A residual is the signed difference between an observed response and the response predicted by a fitted line. A residual plot uses explanatory values horizontally and residuals vertically to assess whether the departures have a clear pattern
- Find the predicted response Substitute the explanatory value into the fitted line before calculating the residual \(\displaystyle \widehat{y}=12+5\times4=32\)
- Subtract in the correct order Calculate the residual as the actual response minus the predicted response \(\displaystyle e=35-32=3\)
- Keep the residual sign A point below the fitted line has a negative residual, while a point above it has a positive residual \(\displaystyle y<\widehat{y}\Rightarrow e<0,\quad y>\widehat{y}\Rightarrow e>0\)
- Use the residual-plot axes Put the explanatory variable horizontally and the signed residual vertically, with zero as the reference line \(\displaystyle (x,e)=\left(4,3\right),\quad e=0\text{ is the reference line}\)
Worked example
A fitted model predicts an assessment score y from preparation time x. The fitted line is shown below. For x=6, the actual score is 39. Calculate the predicted score and residual, give the residual-plot coordinate, and state what irregular scatter around zero suggests
- \(\displaystyle \widehat{y}=18+4\times6=42\)Substitute the preparation time into the fitted model
- \(\displaystyle e=y-\widehat{y}=39-42=-3\)Subtract the predicted score from the actual score and keep the sign
- \(\displaystyle (x,e)=\left(6,-3\right)\)Plot the explanatory value horizontally and the signed residual vertically
- \(\displaystyle \text{irregular scatter about }e=0\Rightarrow\text{linear model supported}\)Irregular residual scatter around zero supports using a linear model for the data
Common mistakes
Difficulty levels
Questions about this topic
How is a residual calculated?+
Calculate the actual response minus the response predicted by the fitted line: e = y - ŷ
What axes does a residual plot use?+
The explanatory variable is on the horizontal axis and the signed residual is on the vertical axis. A horizontal reference line is drawn at residual zero
What does a pattern in a residual plot show?+
Irregular scatter around zero supports a linear model. A curve, changing spread or other systematic pattern calls the linear model into question
Do zero mean residuals prove a suitable linear model?+
No. For an unrounded least-squares fit with an intercept, the residuals sum to zero even when the plot is curved. Assess the pattern and scope separately
Does changing spread prove that the mean is curved?+
No. It concerns the size of errors across inputs. A residual plot can have a roughly straight mean relationship with changing error spread
Can I use a calculator?+
A calculator is allowed unless a question is marked no calculator
Which year level and chapter is this?+
Year 12, VCE Units 3 & 4, General Mathematics, chapter 3: Linear regression