Residual Diagnostics and Diagnostic Plots
A set of standard plots of a regression's leftover errors (residuals) that reveal whether the model's core assumptions — the right functional shape, constant error spread, and roughly normal errors — actually hold, the way a doctor reads symptoms rather than trusting a patient's self-report.
Prerequisites: The Classical Linear Regression Assumptions, R-squared and Goodness of Fit
A regression's R-squared and coefficient p-values can look perfectly respectable while the model is quietly broken underneath — missing a curve in the relationship, systematically wrong for a subset of the data, or producing errors that balloon in size for large predictions. None of those problems show up in the summary statistics; they show up in the pattern of what's left over after the model's predictions are subtracted from the actual values — the residuals. Residual diagnostics is the practice of plotting those leftovers in a few standard ways to catch problems the headline numbers hide.
An analogy: reading symptoms, not the vital signs summary
A doctor doesn't just check whether a patient's heart rate is "in range" and call it a day — they look at the pattern of symptoms over time, because a normal-looking single number can mask a problem that only shows up as a trend or a cluster. Residuals work the same way: a good R-squared is like a single healthy-looking vital sign, but plotting the residuals is like tracking symptoms over the whole exam. A residual plot with a curve in it says "you're missing a bend in the relationship, like a doctor spotting a rash that a blood-pressure reading alone would never reveal." A residual plot that fans out says "your errors get worse under certain conditions" — information no single summary statistic captures.
The mechanics, one symbol at a time
Let be the model's fitted value for observation and the actual value; the residual is . The two standard diagnostic plots are:
which should show a random, structureless cloud centered on zero if the model's functional form is correct and the error spread is constant. In plain English: if the model is right, being wrong shouldn't depend systematically on what the model predicted — the leftover errors shouldn't have a pattern. The second standard plot is a Q-Q plot (quantile-quantile), which compares the sorted residuals against the values a normal distribution would produce at the same percentiles; points falling close to a straight diagonal line indicate residuals close to normally distributed, which matters for the validity of small-sample t-tests and confidence intervals on the coefficients.
Worked example 1: spotting a missing curve
A quant regresses option implied volatility on strike price using a straight line. The fit looks reasonable — R-squared of 0.71 — but plotting residuals against fitted values shows a clear U-shape: residuals are positive for both very low and very high strikes, and negative in the middle. That U-shape is the residual plot flagging the well-known volatility smile: implied vol isn't linear in strike, it curves, and a straight-line fit is systematically wrong at the extremes even though the overall R-squared looked fine. The fix is adding a squared strike term (see Polynomial and Spline Regression), after which the residual-vs-fitted plot flattens into a structureless cloud.
Worked example 2: spotting growing error spread
A separate regression predicts monthly trading P&L from position size across 200 trades. The residuals-vs-fitted plot shows a cone shape: near zero predicted P&L the residuals cluster tightly between −$200 and $200, but for large predicted P&L the residuals fan out to between −$2,000 and $2,000. This fanning is heteroskedasticity — the error spread isn't constant, it grows with the size of the prediction. The ordinary standard errors on the coefficients are computed assuming constant spread, so they'll be wrong (typically understated) here; the practical fix is switching to heteroskedasticity-robust standard errors (see Heteroskedasticity-Robust Standard Errors) rather than trusting the default ones.
Drag points to change the fit and watch the residuals (the vertical gaps between points and the line) update live — this is the residuals-vs-fitted logic made interactive: a good fit leaves gaps with no visible pattern.
What this means in practice
Residual diagnostics are the standard first check after fitting any regression, before trusting its coefficients, standard errors, or out-of-sample predictions: plotting residuals against fitted values catches missing nonlinearity and non-constant error spread, and a Q-Q plot catches non-normal errors that would invalidate small-sample inference. Skipping straight to R-squared and p-values is how systematically broken models — a mispriced vol curve, understated risk on large positions — get shipped looking statistically clean.
Residuals — the leftover gap between actual and predicted values — carry information the summary statistics don't: plotting them against fitted values or in a Q-Q plot reveals missing curvature, growing error spread, and non-normality, all of which can be invisible in R-squared or p-values alone.
The classic mistake is checking R-squared and the coefficient p-values, seeing they look fine, and skipping the residual plots entirely. A model can have a respectably high R-squared while still badly violating the assumptions that make its standard errors and confidence intervals trustworthy — a U-shaped or fanning residual pattern is often invisible in the headline statistics and only shows up once you actually plot the leftovers.
Related concepts
Practice in interviews
Further reading
- Draper & Smith, Applied Regression Analysis, ch. 2
- Fox, Applied Regression Analysis and Generalized Linear Models, ch. 8