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
- Define bias. It is the error from wrong assumptions: even the fitted model averaged over many training sets is far from the truth.
- Define variance. It is how much the fitted model changes from one training set to another.
- 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.
- Give a concrete example: a degree-1 vs a degree-15 polynomial, or the number of neighbours in k-NN (k-nearest neighbours), where has high variance.
- 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
- Saying “bias = training error, variance = test error”. Both are properties of the estimator across many possible training sets.
- Forgetting the irreducible noise term.
- Claiming the U-curve always holds. Heavily over-parameterised models can break it; this is called double descent.
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?