Skip to content

Bias-Variance Trade-off

Prediction error splits into bias (too simple to capture the pattern) and variance (too sensitive to the particular training sample). Reducing one often raises the other.

Also bias and variance · model complexity · double descent

Fig. / How it works
TOO SIMPLE: HIGH BIASJUST RIGHTTOO WIGGLY: HIGH VARIANCE
Domain 01
Foundations
Role · kind
Core ideasConcept
Level
Intermediate

Throwing darts. High bias: all your darts land close together but far from the bullseye. High variance: they are centered on the bullseye but scattered all over the board. You want tight and centered.

Where it fits

FoundationsFoundationsOverfittingOverfittingBaggingBaggingBias-Variance Trade-off
+All relationships as a list

See it on the full map

How it works

Why does a model make mistakes on new data? Three reasons:

  1. Bias: the model is too simple to represent the real pattern. A straight line cannot follow a curve, no matter how much data you give it. This is underfitting.
  2. Variance: the model is so flexible that it changes a lot depending on which training examples it happened to see. It fits the noise. This is overfitting.
  3. Noise: randomness in the data itself that no model can predict.

As you make a model more complex (a higher-degree polynomial, a deeper tree), bias goes down and variance goes up. Total test error first falls, then rises: the famous U-curve.

Ways to move along the trade-off:

A modern twist

Very large neural networks have far more parameters than training examples, yet often generalize well. Researchers observed double descent: past the point where the model can fit the training data perfectly, test error can start falling again. The bias-variance picture is still useful, but it is not the whole story for deep learning.

The math

For a target y=f(x)+εy = f(x) + \varepsilon with noise variance σ2\sigma^2 and a predictor f^\hat f trained on a random dataset,

E[(y−f^(x))2]=(f(x)−E[f^(x)])2⏟bias2+Var[f^(x)]⏟variance+σ2.\mathbb{E}\big[(y - \hat f(x))^2\big] = \underbrace{\big(f(x) - \mathbb{E}[\hat f(x)]\big)^2}_{\text{bias}^2} + \underbrace{\mathrm{Var}[\hat f(x)]}_{\text{variance}} + \sigma^2.

Everyday use cases

  • Case 01

    Choosing model complexity

    Picking the depth of a decision tree or the degree of a polynomial is a direct bias-variance decision.

  • Case 02

    Why ensembles work

    Random forests average many high-variance trees; the average keeps their low bias but cancels much of the variance.

Strengths, weaknesses and when to use it

Strengths

  • Gives a clear mental model for why both too-simple and too-complex models fail.

Weaknesses

  • The clean decomposition holds exactly only for squared error, and modern deep learning complicates the simple U-curve.

When to use itWhen diagnosing a model. High training error points to bias; a big train/test gap points to variance.

Compare with

Check yourself

  1. Q01

    A depth-1 decision tree has high training and test error. Which is it suffering from?

    Show answer

    A: High bias

  2. Q02

    Which technique mainly reduces variance?

    Show answer

    B: Averaging many models (bagging)

Go deeper

Learn first

Next topics