Statistics and linear algebra
Interpret linear regression and residuals
A least-squares line summarizes a linear association by minimizing squared vertical residuals. Residuals show what the model misses at each observed input.
- Author
- VibeMath Editorial TeamOriginal AI-assisted lesson content edited for clarity, accessibility, and product-truth accuracy.
- Math reviewer
- VibeMath Math ReviewIndependent equation, example, substitution, units, scope, and accessibility checks; not a claim of individual human credentials.
- Last reviewed
What you will learn
- Use a regression equation to calculate a predicted response.
- Compute residual as observed response minus predicted response.
- Interpret residual sign and pattern while distinguishing association from causation.
Build the idea
A regression line gives one predicted response for each explanatory-variable value. Its slope describes the model's average predicted change, not a guaranteed change for every observation.
A residual is the vertical gap from the fitted line to an observed point. Positive residuals lie above the prediction, while negative residuals lie below it.
A useful linear model leaves residuals without a clear curved pattern. Structure in the residual plot suggests that a different functional form or missing variable may explain more of the data.
Vertical residual arrows around a fitted line
Draw a scatterplot and a line through its center. At each x-coordinate, a vertical arrow runs from the line's predicted point to the observed point and records a signed residual.
Worked example
Problem
A fitted model predicts quiz score by study hours with y hat equals fifty-eight plus six x. For a student who studied four hours and scored seventy-nine, find and interpret the residual.
Strategy
Substitute four into the fitted equation, subtract the prediction from the observed score, and interpret the sign in context without making a causal claim.
Step 1
Insert four study hours into the regression equation. The fitted score is fifty-eight plus twenty-four, or eighty-two.
Read as: Predicted y equals fifty-eight plus six times four, which equals eighty-two. Step 2
Subtract the predicted score from the observed score. Seventy-nine minus eighty-two gives negative three.
Read as: The residual equals seventy-nine minus eighty-two, which equals negative three. Step 3
The negative sign means the observed score is three points below the model's prediction at four study hours.
Read as: The absolute residual distance is three score points.
Answer and verification
The model predicts eighty-two, and the residual is negative three points; the observed score is three points below prediction.
Observed value equals predicted value plus residual: eighty-two plus negative three returns seventy-nine, confirming the sign convention.
Common mistakes
Computing predicted minus observed and then using the standard residual interpretation.
Use observed minus predicted consistently; reversing the order reverses every residual sign.
Claiming that six extra score points are caused by each additional study hour.
The slope describes fitted association in the observed data. Causal language needs an appropriate study design and assumptions.
Try it yourself
For y hat equals twelve minus one point five x, find the prediction and residual when x equals six and observed y equals five.
Show hint
The prediction is twelve minus nine; subtract that predicted value from the observation.
Show answer
The prediction is three and the residual is positive two, so the observation is two units above the line.
Accessible lesson transcript
This reviewed reading order covers the lesson explanation, equations, example, and checks without claiming that a video exists.
- Part 1
Lesson overview
A least-squares line summarizes a linear association by minimizing squared vertical residuals. Residuals show what the model misses at each observed input. A regression line gives one predicted response for each explanatory-variable value. Its slope describes the model's average predicted change, not a guaranteed change for every observation. Use a regression equation to calculate a predicted response.
- Part 2
Visual model and equations
A residual is the vertical gap from the fitted line to an observed point. Positive residuals lie above the prediction, while negative residuals lie below it. Draw a scatterplot and a line through its center. At each x-coordinate, a vertical arrow runs from the line's predicted point to the observed point and records a signed residual. Predicted y equals b zero plus b one times x. The residual e equals observed y minus predicted y.
- Part 3
Worked example
A fitted model predicts quiz score by study hours with y hat equals fifty-eight plus six x. For a student who studied four hours and scored seventy-nine, find and interpret the residual. Substitute four into the fitted equation, subtract the prediction from the observed score, and interpret the sign in context without making a causal claim. Insert four study hours into the regression equation. The fitted score is fifty-eight plus twenty-four, or eighty-two. Subtract the predicted score from the observed score. Seventy-nine minus eighty-two gives negative three. The negative sign means the observed score is three points below the model's prediction at four study hours. The model predicts eighty-two, and the residual is negative three points; the observed score is three points below prediction. Observed value equals predicted value plus residual: eighty-two plus negative three returns seventy-nine, confirming the sign convention.
- Part 4
Checks, practice, and scope
A useful linear model leaves residuals without a clear curved pattern. Structure in the residual plot suggests that a different functional form or missing variable may explain more of the data. Computing predicted minus observed and then using the standard residual interpretation. Use observed minus predicted consistently; reversing the order reverses every residual sign. Claiming that six extra score points are caused by each additional study hour. The slope describes fitted association in the observed data. Causal language needs an appropriate study design and assumptions. For y hat equals twelve minus one point five x, find the prediction and residual when x equals six and observed y equals five. The prediction is twelve minus nine; subtract that predicted value from the observation. The prediction is three and the residual is positive two, so the observation is two units above the line. Regression predictions come from substituting inputs into the fitted equation. Residuals are observed minus predicted and retain the response variable's units. Residual patterns diagnose model shape, while regression alone does not establish causation. This lesson interprets a supplied simple linear model and does not derive least-squares coefficients or inference formulas. Extrapolation beyond the observed x-range and predictions for different populations may be unreliable.
Scope and limitations
- This lesson interprets a supplied simple linear model and does not derive least-squares coefficients or inference formulas.
- Extrapolation beyond the observed x-range and predictions for different populations may be unreliable.