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.

Not startedJump to quiz

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.

0123model complexityerror
Bias²VarianceNoise σ²Total expected error
As complexity rises, bias² falls and variance rises. Total error is U-shaped; the noise floor never moves.

Darts

Low varianceHigh variance
Low biasTight cluster on the bullseye (ideal)Scattered around the bullseye
High biasTight cluster, consistently off-centreScattered and off-centre (worst)

Simple vs flexible models

Simple (straight line)Flexible (degree-11 polynomial)
BiasHigh: can't represent curvatureLow
VarianceLow: stable across samplesHigh: chases noise
Typical failureUnderfittingOverfitting

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

Simple: high bias, low variance, underfits. Flexible: low bias, high variance, overfits.

"Variance" means...

Variance of the fitted model across training sets, not the variance of the data.

See every cheatsheet by category →

Check your understanding

Score 75% or more to master this lesson and earn XP. Answer first, then check.

Q1conceptWhich component of expected squared prediction error can no model reduce?
Q2conceptAs model complexity increases, what generally happens to bias and variance?
Q3interpretA linear model is fitted to 50 different training sets drawn from the same source. The fitted lines are almost identical, but all miss the true curve the same way. How would you describe it?
Q4applyYou double the training data for a very flexible model. What do you expect?
Q5conceptIn the bias–variance decomposition, what does "variance" refer to?