Machine Learning · Chapter 6 of 40

Bias vs Variance

BIAS: error from wrong assumptions (too-simple model → underfit). VARIANCE: error from sensitivity to training data (too-complex model → overfit).

Good models balance both — the bias-variance tradeoff.

Example 1 (python)
# High bias -> underfit (linear model on curved data)
# High variance -> overfit (deep tree on tiny data)

Diagnose by comparing train/test scores.

Example 2 (python)
# Reduce variance: more data, regularization, simpler model, ensembles

Techniques to lower variance.

Key points

  • Bias: systematic error.
  • Variance: sensitivity to noise.
  • Total error = bias² + variance + noise.
  • Aim to balance both.
💡 Note: Ensembles (random forests, boosting) reduce variance while keeping bias low.

📝 Quick Quiz

1. High bias leads to:

2. High variance leads to:

3. Ensembles reduce: