Lesson 2.5 · 9 min read · about 50 min to master at a very slow pace
The Bias–Variance Trade-off
Expected prediction error splits into bias², variance and irreducible noise. Why flexible models trade bias for variance, illustrated with the thought experiment of many training sets.
The thought experiment
Imagine drawing many different training sets from the same population and fitting the same type of model to each. At one input you'd get a spread of predictions . Three things determine how wrong they are:
- Bias: how far the average prediction (over all those training sets) is from the truth. Systematic error from an overly simple model.
- Variance: how much the prediction jumps around from one training set to another.
- Irreducible noise: randomness in itself (, with variance ) that no model can predict.
Squared-error decomposition at a fixed input
Bias² and variance are the reducible error. can't be reduced by any choice of model.
Darts
| Low variance | High variance | |
|---|---|---|
| Low bias | Tight cluster on the bullseye (ideal) | Scattered around the bullseye |
| High bias | Tight cluster, consistently off-centre | Scattered and off-centre (worst) |
Simple vs flexible models
| Simple (straight line) | Flexible (degree-11 polynomial) | |
|---|---|---|
| Bias | High: can't represent curvature | Low |
| Variance | Low: stable across samples | High: chases noise |
| Typical failure | Underfitting | Overfitting |
Practical implications
- With limited or noisy data, a simpler model is often better.
- A flexible model can capture a genuinely complex relationship, but needs enough data and careful validation.
- Regularisation (Section 5) adds a little bias to remove a lot of variance. More data reduces variance; it does nothing to .
Common slips
"Variance" here means variance of the fitted model across training sets, not the variance of the data. And the goal is the lowest total error, not minimising bias or variance separately.
Cheatsheet
Bias–variance decomposition
Simple vs flexible
"Variance" means...
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.