Prob and StatsTwo-Variable DataS-ID.B.6b

Residuals and Residual Plots

A good linear fit leaves residuals with no pattern.

Not started Jump to practice

In Algebra 1 you used residuals to judge a line of fit. With the least-squares line they become a powerful check: a plot of the residuals shows whether a line was the right model at all.

Key idea

The residual of a point is $e = y - \hat{y}$ (actual minus predicted). A residual plot graphs the residuals against x. If a line is a good model, the residuals look like random scatter around 0 with about the same spread everywhere. A curve or a fan shape means the line is missing something.

Why it works

The least-squares line already removes the straight-line trend, so whatever is left over is what the line could not explain. If that leftover still has a pattern, such as positive at both ends and negative in the middle, the data bend and a straight line systematically misses. A random cloud means there is nothing systematic left for a line to fix.

Worked example: One residual

The line is $\hat{y} = 57 + 3x$. A student who studied 8 hours scored 85. Find the residual.
  1. Predicted: $\hat{y} = 57 + 3(8) = 81$.
  2. Residual: $85 - 81 = 4$.
  3. Positive: the point lies 4 points above the line.

Answer: $e = 4$

Residuals from the least-squares line ŷ = −22 + 11x fitted to y = x². They are positive at both ends and negative in the middle: a clear curve.

Worked example: Reading a residual plot

For $x = 1, \ldots, 10$ and $y = x^2$, the line has $r \approx 0.97$. Its residual plot is shown above. Is a line a good model?
  1. The residuals form a U: positive, then negative, then positive again.
  2. That pattern means the line is too high in the middle and too low at the ends: the data curve.
  3. So despite the high $r$, a curved model would fit better.

Answer: No. The U-shaped residual plot shows the form is curved.

The same data with the line and its residuals (green above, red below). Drag points to see how the residuals change.

Common mistake

Taking a high $r$ as proof that a linear model is right. $r$ measures how close the points are to some line; it does not say a line is the right shape. Check the residual plot: any curve or fan means "not linear" no matter how big $r$ is.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax, Introductory Statistics 2e, section 12.3 The Regression Equation
  • OpenStax, Introductory Statistics 2e, section 12.6 Outliers
  • Common Core State Standards for Mathematics, S-ID.B.6b (Informally assess the fit of a function by plotting and analyzing residuals)
@teddyrookbook GitHub