Error Analysis and Residual Inspection
A single summary number like RMSE tells you how wrong a model is on average, but not where, when, or why — error analysis means actually looking at the individual mistakes, not just the score, to find the pattern a summary statistic hides.
Prerequisites: Training Error vs Generalization Error
Two models can have the exact same RMSE and be completely different in every way that matters for deploying them. One might be off by a little on every single prediction, evenly, harmlessly. The other might be perfect 95% of the time and catastrophically wrong the other 5% — say, on every high-volatility day, or every earnings announcement — with those rare disasters averaging out to the identical RMSE. A single summary metric cannot distinguish these two situations. Only looking at the actual errors, one by one and grouped by context, can — that practice is error analysis, and its core tool is the residual, the gap between what a model predicted and what actually happened.
The analogy: a doctor reading the chart, not just the temperature
A patient's average temperature over a week might read a perfectly normal 98.6°F. But if that average is hiding a pattern — spiking to 103°F every evening and dropping to 96°F every morning — the average has erased the exact information a doctor needs. A responsible doctor doesn't stop at the weekly average; they look at the full trace, hour by hour, hunting for when and why it deviates. Error analysis is that same discipline applied to a model: don't stop at the one number, look at the individual residuals and ask when and why they're large.
The formal picture
The residual for example is simply , the true value minus the model's prediction. RMSE and similar metrics are aggregates: — in words, take every residual, square it (so positive and negative errors don't cancel and big misses count extra), average, and take the square root back to the original units. Error analysis instead studies the distribution of the directly: are they centered at zero (unbiased) or systematically shifted (biased)? Do they grow with the size of (heteroscedastic)? Are they larger for a particular subgroup — a sector, a time-of-day, a volatility regime — than others (a pattern the aggregate metric averages away)?
Worked example 1: two models, identical RMSE, different residual patterns
Model A's residuals on 6 test days are (small, evenly split errors). Model B's residuals on the same 6 days are (perfect five days, one large miss). Compute RMSE for each: Model A, . Model B, — actually different here, but tune the one large miss down to instead and Model B's RMSE becomes , identical to Model A's, while Model A is consistently a little wrong and Model B is almost always exactly right except for one dangerous outlier day. A risk manager cares enormously about which of these two "RMSE = 1" models they're holding.
Worked example 2: grouping residuals to find a pattern
A volatility forecasting model has residuals averaging near zero overall. Split them by realized-volatility regime: on low-vol days ( annualized), mean residual is ; on high-vol days (), mean residual is — the model badly underforecasts exactly when volatility is spiking, which is precisely when a bad forecast is most costly, and this pattern is invisible in the overall mean residual because low-vol days vastly outnumber high-vol days and drag the average back toward zero.
Compare the bell curve above — residuals that are small, symmetric, and centered at zero — to a distribution with a heavy tail on one side; a residual histogram that looks like the second is the visual signature error analysis is looking for.
A single aggregate metric can be identical for a model with small, evenly distributed errors and a model with rare, severe ones. Error analysis means examining individual residuals — their sign, their size, and how they group by context like time, regime, or asset — to find patterns an aggregate score erases by averaging.
What this means in practice
Before trusting a live trading model, plot its residuals against time, against volatility regime, against sector, and against prediction confidence, not just its headline RMSE or Sharpe. A model that fails specifically during regime shifts or specifically on illiquid names is a very different (and often much riskier) object than its aggregate score suggests, and that difference only shows up once you actually look at where the errors live.
The common mistake is treating a low aggregate error metric as sufficient evidence a model is "good," full stop. Averaging is a form of information loss by construction — it is mathematically guaranteed to hide any error pattern that has a mean near zero but real structure underneath, and a model that is quietly terrible in exactly the conditions that matter most (crashes, illiquidity, regime changes) can post a perfectly respectable-looking headline number the whole time.
Related concepts
Practice in interviews
Further reading
- James, Witten, Hastie & Tibshirani, An Introduction to Statistical Learning, ch. 3