Residual Plots (College Board AP® Statistics): Study Guide

Mark Curtis

Written by: Mark Curtis

Reviewed by: Dan Finlay

Updated on

Residual plots

What is a residual plot?

  • Recall that a residual is the vertical difference between a data point and the regression line

  • A residual plot is a graph that shows all the residuals from a scatterplot

    • The vertical axis shows the value of the residual

    • The horizontal axis shows the explanatory variable values or predicted response values

Two graphs: left shows temperature rising linearly with cricket chirps per minute and fitted line ŷ = 50.8 + 0.217x; right shows residuals scattered around zero.
Comparison of a scatterplot and a residual plot

What is a residual plot used for?

  • When using the least-squares regression line, a residual plot gives a good indication as to whether the data points follow a linear model or not

    • If the residuals are randomly scattered above and below 0, with no clear pattern, a linear model is appropriate

    • If the residuals show a pattern, e.g. a curve, a linear model is not appropriate

      • In this case, a nonlinear (curved) model may be more appropriate

Two residual plots: left shows random scatter about zero, suggesting a suitable linear model; right shows curved pattern, indicating a linear model is unsuitable.
Example of using residual plots to assess the suitability of a linear model

Examiner Tips and Tricks

A clear pattern in the residual plot shows that a linear model is not appropriate. The scatterplot can also suggest nonlinearity, but the residual plot makes this clearer because it removes the linear trend.

Worked Example

A scatterplot is shown below. The equation of the least-squares regression line is y^=2.4+2.8x, where y^ is the predicted y-value. By constructing a residual plot, determine whether or not a linear model is appropriate for the data.

A scatterplot with points shown and a dashed regression line on a grid.

Answer:

First calculate the residuals (by finding the vertical difference of each data point above or below the regression line, y−y^)

To find the y^-values from the regression line, it is more accurate to substitute the x-values into the equation of the line y^=2.4+2.8x, rather than read off their values from the graph

The residual at x=0 is 4−(2.4+2.8×0)=1.6

The residual at x=1 is 2−(2.4+2.8×1)=−3.2 etc.

x

0

1

2

3

4

y

4

2

8

14

12

y^

2.4

5.2

8

10.8

13.6

Residual

1.6

−3.2

0

3.2

−1.6

Scatterplot with the regression line ŷ = 2.4 + 2.8x, showing the residuals (+1.6), (−3.2), (0), (+3.2) and (−1.6).

Then construct a residual plot by plotting the values of the residuals on the vertical axis and the x-values on the horizontal axis

A residual plot of residuals on the vertical axis against x-values on the horizontal axis.

If the residuals are randomly scattered above and below 0, with no clear pattern, then a linear model is a good fit

The residuals appear to be randomly scattered above and below 0, with no clear pattern, which suggests a linear model is appropriate for the data (although with only 5 points, this conclusion is limited)

Examiner Tips and Tricks

The more data points a residual plot has, the more reliable any conclusion about linearity. With only a handful of points, even a nonlinear relationship can look like random scatter by chance.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Mark Curtis

Author: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.