Residual plot

By Jude Wallis · Published

A residual plot graphs the residuals against the explanatory variable or predicted values, used to check whether a line fits the data well.

A residual plot puts yy^y - \hat{y} on the vertical axis against either xx or y^\hat{y} on the horizontal axis, with a reference line at 0. Both horizontal choices are standard: plotting against y^\hat{y} rescales the horizontal axis, and reverses it when the slope is negative. You read the plot for shape, not for size: a bend says a straight line is the wrong model for the trend, and a fan says the scatter is not constant across the data.

Six students study 1, 2, 3, 4, 5 and 6 hours and score 60, 72, 65, 78, 71 and 86. Their least-squares line is y^=58+4x\hat{y} = 58 + 4x, so the residuals plotted above x=1x = 1 through x=6x = 6 are -2, 6, -5, 4, -7 and 4. They land on both sides of zero, they do not bend, and they do not widen from left to right. With six points that is about as much as such a plot can support, so read it beside the scatterplot rather than on its own.

Here is the sentence to retire: "the residual plot has no upward trend, so hours and score are not associated." A residual plot from a least-squares fit can never show a linear trend. The correlation between the residuals and xx is exactly 0 by construction, for these six points and for every other data set, because the line already absorbed the straight-line part of the pattern. The plot answers whether the line has the right shape, not whether the variables are related.

A flat, patternless residual plot is also not proof that the model is correct. It only means nothing obvious is left over, and a small sample can hide a real curve. Curvature is still evidence that a linear model does not belong on the data, and the Fall 2026 course has no topic on transforming data to achieve linearity, so the expected response to a bend is to say a line is not appropriate rather than to re-express the variables.

Where this comes up

15 pages on the site use this term.

More regression and correlation terms, or browse the full statistics glossary.