- Home
- /
- Math
- /
- Statistics & Probability
- /
- Residuals
Residuals
Also known as: residual, prediction error
Grade 9-12
View on concept mapThe difference between an observed value and its predicted value from a regression model: \text{residual} = y - \hat{y} (observed minus predicted). Residuals are how you check whether your model is appropriate.
This concept is covered in depth in our data analysis and residuals tutorial, with worked examples, practice problems, and common mistakes.
Definition
The difference between an observed value and its predicted value from a regression model: \text{residual} = y - \hat{y} (observed minus predicted).
π‘ Intuition
A residual is how much the model got wrong for a specific data point. Positive residual means the actual value was higher than predicted; negative means it was lower. If you plot all residuals, the pattern (or lack thereof) tells you whether the model is appropriate.
π― Core Idea
A residual plot (residuals vs predicted values or vs x) is the diagnostic tool for regression. Random scatter = good model. Curved pattern = linear model is wrong. Fan shape = non-constant variance.
Example
Formula
Notation
e_i is the residual for the i-th observation. The sum of all residuals from a LSRL is always zero: \sum e_i = 0.
π Why It Matters
Residuals are how you check whether your model is appropriate. The regression equation alone doesn't tell you if the model fits wellβthe residual plot does.
π Hint When Stuck
For each data point, compute residual = actual y minus predicted \hat{y}. Plot residuals versus x or versus \hat{y}. A good model shows random scatter; patterns indicate the model is missing something.
Formal View
See Also
Compare With Similar Concepts
π§ Common Stuck Point
Students compute residuals correctly but don't know how to read residual plots. The key: look for patterns. No pattern = good. Any systematic pattern = problem.
β οΈ Common Mistakes
- Computing residuals as \hat{y} - y instead of y - \hat{y}βthe convention is observed minus predicted.
- Ignoring the residual plot and only looking at r^2βa high r^2 can still come with a terrible model if the relationship is curved.
- Expecting residuals to all be close to zeroβsome large residuals are normal; look for patterns, not individual values.
Go Deeper
Frequently Asked Questions
What is Residuals in Math?
The difference between an observed value and its predicted value from a regression model: \text{residual} = y - \hat{y} (observed minus predicted).
What is the Residuals formula?
When do you use Residuals?
For each data point, compute residual = actual y minus predicted \hat{y}. Plot residuals versus x or versus \hat{y}. A good model shows random scatter; patterns indicate the model is missing something.
Prerequisites
Next Steps
Cross-Subject Connections
How Residuals Connects to Other Ideas
To understand residuals, you should first be comfortable with linear regression lsrl. Once you have a solid grasp of residuals, you can move on to r squared and regression inference.
Want the Full Guide?
This concept is explained step by step in our complete guide:
Data Representation, Variability, and Sampling Guide β