Residuals
Learn what a residual is, how to compute residuals in a table, and how a residual plot shows whether a line fits the data.
Advanced25 min18 problems
Definition
A residual is the vertical distance between a data point and the regression line. It tells you how far the line's prediction missed the real value:
- is the observed value (what really happened)
- is the predicted value from the line (read "y-hat")
- is the residual, always observed minus predicted
The sign of a residual tells you where the point lies:
- : the point is above the line (the line predicted too little)
- : the point is below the line (the line predicted too much)
- : the point is exactly on the line
A residual has the same unit as . For the least-squares regression line, the residuals always add up to zero: .
Try it now
Which formula gives the residual of a data point?
Interactive Visual
Scatter Plot
Study hours and test scores with residuals
ŷ = 5x + 50
r = 0.963 · strong positive correlation
Tap a point to see its coordinates.
Scatter Plot
Residual plot: random scatter (linear model fits)
residual = 0
Tap a point to see its coordinates.
Scatter Plot
Residual plot: U-shaped curve (linear model does not fit)
residual = 0
Tap a point to see its coordinates.
Interactive Sandbox
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsProblem 1 of 18
Easy
A data point lies below the regression line. What is the sign of its residual?
Glossary
- Residual
- Observed value minus predicted value:
- Observed value
- The real value of a data point, measured or collected
- Predicted value
- The value that the regression line gives for a certain
- Residual plot
- A graph of against the residuals, with a horizontal line at
- Sum of squared residuals (SSR)
- The sum ; the least-squares line makes it as small as possible
- Least-squares line
- The regression line with the smallest sum of squared residuals
Formula Card
Residual
Observed minus predicted; positive above the line, negative below
Sum of residuals
Always true for the least-squares regression line
Sum of squared residuals
The least-squares line makes this as small as possible (also written $SS_{\text{res}}$)