What is the bias–variance tradeoff?

Foundations, Bias and variance
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you understand why models that are too simple and models that are too flexible both generalise badly, and how changing model complexity trades one source of error for another.

Key idea

Expected test error = bias² + variance + irreducible noise. The irreducible noise is randomness in the labels that no model can predict. More flexible models usually have lower bias but higher variance, so in the classical picture, test error plotted against model complexity is U-shaped.

Steps

  1. Define bias. It is the error from wrong assumptions: even the fitted model averaged over many training sets is far from the truth.
  2. Define variance. It is how much the fitted model changes from one training set to another.
  3. Say that more flexible models lower bias and raise variance. Sketch the U-shaped test-error curve, because it shows the tradeoff at a glance.
  4. Give a concrete example: a degree-1 vs a degree-15 polynomial, or the number of neighbours k in k-NN (k-nearest neighbours), where k=1 has high variance.
  5. Name the levers. Regularisation (penalising complexity) and more data reduce variance. Ensembling, such as bagging (averaging models trained on resampled data), also reduces variance. Richer features reduce bias.

Common mistakes

How long your answer should be

3–5 sentences, plus one sketch or example.

Read this

Previous in Foundations: none
Next in Foundations: Why must you never tune hyperparameters on the test set?