Model Selection & Fat Tails
Why a more flexible model always fits the data you have — and often predicts worse on the data you don't.
Fitting versus memorizing
Give a flexible enough model twenty noisy points and it can thread a curve through every single one, residuals all zero. It looks like a triumph. It is usually a disaster.
The data you fit is one noisy draw from some underlying process: a smooth signal plus random scatter. A curve that hits every point has fit the signal and the scatter. But the scatter is different next time — a fresh sample has its noise in different places — so a model tuned to this sample's noise predicts the next sample worse. This is overfitting: mistaking accidental features of one dataset for structure in the world.
The whole discipline of model selection is about telling those two apart when all you can see is the training data.
Prediction error has two competing sources.
- Bias — error from a model too rigid to capture the real pattern (a straight line through a curved trend). High bias means underfitting.
- Variance — how much the fitted model jumps around when the training sample changes. A very flexible model swings wildly from one dataset to the next. High variance means overfitting.
Simple models: high bias, low variance. Complex models: low bias, high variance. You cannot drive both to zero at once — the best model lives at the balance point, not at either extreme.
Why training error only ever falls
Here is the trap in one sentence: adding parameters can never increase training error. A degree-4 polynomial contains every degree-3 polynomial as a special case (set the top coefficient to zero), so the best degree-4 fit is at least as good on the training data as the best degree-3 fit. Training error is therefore non-increasing in complexity — it slides toward zero whether or not the extra flexibility is real.
That is exactly why training error cannot be your judge. It rewards complexity unconditionally. To see whether flexibility is genuine, you must test the model on data it did not fit.
Watch the U-curve form
The sim below generates about twenty noisy points from a fixed smooth truth, plus a separate held-out validation set drawn from the same truth (shown as hollow circles). Slide the polynomial degree from 0 up to 7 and fit least squares at each degree.
Watch two things at once. In the top panel the fitted curve goes from too stiff (a flat or straight line missing the trend) to sensible to visibly frantic — wiggling to touch training points and overshooting between them. In the bottom panel the two error curves tell the story numerically: the training MSE falls monotonically, while the validation MSE traces a U — down, a minimum at some moderate degree, then up as overfitting sets in. Hit Regenerate data a few times: the exact minimum wanders, which is itself the point — the best degree is a property of signal-plus-noise, not a fixed constant.
Notice that at high degree the training MSE is near its smallest while the validation MSE is climbing back up. If you had only the training number you would happily pick the most complex model — and predict worst. The gap between the falling training curve and the rising validation curve largely reflects the variance term of the decomposition, made visible: the more the flexible model would swing from one training sample to the next, the more its rosy training score overstates how it does on fresh data. The honest estimate of how a model will do on new data comes from data it never touched.
Paying for complexity without a validation set
Holding out data works, but it costs data and it is noisy for small samples. An alternative is to score a model by its fit minus an explicit penalty for its size. Two classic scores do exactly this, using the maximized log-likelihood \(\ln\hat L\), the number of free parameters \(k\), and the sample size \(n\):
Fat tails: when the mean itself goes missing
All of this quietly assumes the noise has a finite mean and variance — that averages settle down. For fat-tailed data, where extreme values are far more common than a bell curve allows, that assumption can fail outright. The textbook warning is the Cauchy distribution, whose tails fall off like \(1/x^2\):
Sample from a Cauchy and keep averaging more draws and the sample mean does not converge — the average of Cauchy draws is itself Cauchy, just as wild with a million points as with one. The Central Limit Theorem and the law of large numbers simply do not apply, because they require a finite variance the Cauchy lacks. Real fat-tailed data (some financial returns, network traffic, city sizes) can behave the same way: a single record-breaking observation moves the mean by more than thousands of ordinary ones. Defenses: plot the data before trusting any summary, prefer robust statistics (median and interquartile range over mean and standard deviation), and be wary of variance-based tools — including AIC's Gaussian-likelihood assumptions — on data whose tails you have not checked.
- AIC for A: \(2k - 2\ln\hat L = 2(3) - 2(-140) = 6 + 280 = 286\).
- AIC for B: \(2(6) - 2(-135) = 12 + 270 = 282\). Lower is better, so AIC picks the richer Model B (282 < 286): its 5-point likelihood gain outweighs a penalty of only 2 per extra parameter.
- BIC uses \(\ln n = \ln 100 \approx 4.605\) per parameter. BIC for A: \(3(4.605) + 280 = 13.82 + 280 = 293.82\).
- BIC for B: \(6(4.605) + 270 = 27.63 + 270 = 297.63\). Now the heavier per-parameter charge tips the balance the other way.
Check your understanding
- Training error is non-increasing in complexity, so it always rewards more parameters and can never, on its own, tell you when a model is overfitting.
- Out-of-sample error is U-shaped: bias falls then variance rises, and expected test error = bias² + variance + irreducible noise σ².
- A held-out validation set (as in the sim) estimates true prediction error; its minimum, not the training minimum, marks the right complexity.
- AIC = 2k − 2 ln L̂ and BIC = k ln n − 2 ln L̂ reward fit and charge for parameters; BIC's ln n penalty is stricter than AIC's flat 2, so they can disagree.
- Fat-tailed data (e.g. Cauchy, tails ~1/x²) can have an undefined mean and infinite variance, breaking the CLT and averages — plot the data and prefer robust statistics like the median.