Statistics

Residuals and residual plots

What a residual is, the four residual-plot cases and what each one means, outliers and influential points, and the standard error s.

Cheat sheet · AP Stats · College · 6 sections

1Residuals

Residual

Observed minus predicted. Positive: the point is above the line.

ExampleLine , point (2, 4): , so

Residuals add to zero

ExampleData (1,2), (2,4), (3,5), (4,4), (5,5): residuals add to 0

Sum of squared errors

The least-squares line makes this as small as possible.

Example

Standard error of the residuals

The typical size of a prediction error, in y's units.

Example: predictions are typically off by about 0.9

r² from the residuals

Example:

2The four cases

0
Random scatter: line fits
0
Curved: not linear
0
Fan: spread grows
0
Outlier: one big residual
Each plot shows the residuals against x, with a dashed line at zero.

3What each residual plot means

PatternMeaningWhat to do
Random scatter around 0A line is a good modelUse the line
Curve (U or ∩ shape)The relationship is not linearTry a transformation (log, square root) or a curved model
Fan (spread grows or shrinks)Unequal spread: predictions are less reliable for some xTransform y, or be cautious with intervals
One large residualAn outlier in yCheck it for errors; report results with and without it

A high r² does not prove a line fits: a curved pattern can have r² above 0.9. The residual plot is the check.

4Influential points

influential point
Influential point: slope 0.70 without it, -0.02 with it
A point far from the others in x can drag the line toward itself. Its own residual may even be small.

5Unusual points

Outlier

A point with a large residual (far from the line in the y direction).

ExampleA residual of 3.2 when the others are within ±1

High leverage

A point with an x value far from .

Examplex values 1 to 6 and one at 9

Influential

A point whose removal changes the slope, intercept or r a lot. High-leverage points often are.

ExampleFit with and without the point; if the slope moves a lot, it is influential

6Checking a linear model

  1. Plot y against x: is the form roughly linear?
  2. Fit the least-squares line and compute the residuals.
  3. Plot the residuals against x (or against ŷ): look for random scatter around 0.
  4. Look for outliers and influential points, and refit without them to compare.
  5. Report the line, r², and s in context.

Related