Understand the idea
Once a model makes a prediction for each row, the residual is simply how far off that prediction was for that one row: the leftover the model did not explain. A positive residual means the model predicted too low; a negative residual means it predicted too high.
Residuals are the single most useful diagnostic tool in regression, because most of the assumptions a model relies on are really assumptions about the residuals, not about the raw data: they should look patternless when plotted against the fitted values or against each predictor (no curve, no funnel shape, no drift over time), and their overall shape should be close to bell-shaped for the smaller-sample inference to be trustworthy.
A single unusually large residual points to one row the model fits badly, worth a look, since it might be a data-entry error, a genuinely unusual case, or a sign that the model is missing an important predictor for that kind of row.
A studentized residual divides a residual by an estimate of its own spread, so residuals from different parts of the data can be compared on one scale. Standardized residuals follow the same idea; textbooks differ on exactly which estimate of spread each name uses.
Practitioner explanation
e_i = y_i - y-hat_i is the RAW residual; STANDARDIZED residuals (divided by an estimate of their own standard error, which varies by leverage) and STUDENTIZED residuals (refit without observation i) are preferred for outlier screening because raw residuals near high-leverage points are mechanically shrunk toward zero, understating how unusual those points really are.
Residual diagnostics collectively check most of the classical regression assumptions at once: a funnel shape in the residual-vs-fitted plot signals heteroscedasticity, a curve signals a linearity failure, a wave or run signals autocorrelation, and a Q-Q plot of the residuals (never of the raw response) checks normality. This is precisely why 'check the residuals' is the single most load-bearing piece of regression practice.
KernelStats' regression card lists, for each row it flags as influential, the fitted value, raw residual, externally studentized residual, Cook's distance, DFFITS and leverage, and plots residual-vs-fitted and a Q-Q plot automatically, so the diagnostics that would otherwise require several separate manual steps are produced with the fit itself.
When to use it
Consider it when
As the first diagnostic to inspect after fitting any regression or ANOVA model, before trusting its p-values or intervals.
Use caution when
Do not use the raw response variable's own histogram in place of a residual plot to check normality or check for outliers in a fitted model: the relevant shape is what remains AFTER the model's systematic part is removed.
Formulas and symbols
Residual
y_i is the observed value, y-hat_i the model's fitted value for that row.
Common misconceptions
Misconception
The normality assumption in regression is about the response variable, not the residuals.
Correction
The assumption concerns the residuals, what is left after the model's explained part is removed, not the raw response, which can be any shape (even bimodal) if the predictors explain that shape.
Read more: Misconception: the normality assumption applies to the raw data, not the residuals
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §4.4.3 Data analysis for linear regression models (residual analysis), NIST/SEMATECH (2012), §4.4.3.
