Residual
By Jude Wallis · Published
A residual is the difference between an observed y-value and the value the regression line predicts for it: observed minus predicted.
A residual belongs to one data point and one fitted line, and the order of the subtraction is fixed: , observed minus predicted, where (read y-hat) is the height of the line above that point's . The sign is where the meaning lives. A positive residual puts the observation above the line, so the model underpredicted it, and a negative residual puts it below, so the model overpredicted.
Six students study 1, 2, 3, 4, 5 and 6 hours and score 60, 72, 65, 78, 71 and 86. The least-squares line for them is . For the student who studied 5 hours the line gives , and that student scored 71, so the residual is . The line overpredicted that score by 7 points. Doing the same at every gives residuals of -2, 6, -5, 4, -7 and 4.
The error that costs points is the reversed subtraction. "The residual is 7, so the line missed by 7" keeps the size and throws the direction away, and computing predicted minus observed flips the sign of every residual in the table, turning each overprediction into an underprediction. Say observed minus predicted every time, and read a negative residual as the line sitting above the data point.
Two things bound what a single residual can tell you. It is measured against one particular line, so change the line and every residual changes with it. And for a least-squares line fitted with an intercept the residuals add to exactly zero: here . Their mean is zero for a good fit and for a hopeless one alike, which is why fit gets judged from the squared residuals and from the shape of the residual plot, never from their average.
Residuals are topic 5.4 in Unit 5, Regression Analysis, of the Fall 2026 AP Statistics course.
Where this comes up
- AP Stats 5.4: Residuals and Residual PlotsAP topic
- How to interpret a residual plot (AP Stats)Guide
- Residual vs error: predicted vs true lineComparison
- Residual plot practice problems with full solutionsPractice
- Why do we square the residuals in regression?Guide
- Correlation and residual plot practice problemsPractice
- How to predict y from x with a regression lineGuide
- Computer regression output practice problemsPractice
30 pages on the site use this term.
More regression and correlation terms, or browse the full statistics glossary.