“What is the bias–variance trade-off, and how would you use it?”
Bias describes systematic error in the average predictor across possible training samples. Variance describes how much the fitted predictor changes when the training sample changes. These are properties of a learning procedure under a data-generating setup, not labels you can read exactly from one training run.
01. State the assumptions behind the decomposition
For regression with squared-error loss, write y = f(x) + noise, with zero-mean noise. At a fixed x, expected prediction error can be decomposed into:
The expectation includes repeated training samples and the outcome noise under the usual independence assumptions. Other losses and classification settings do not inherit this exact expression unchanged.
The word “bias” here is statistical bias. It is distinct from unfair treatment of demographic groups, although a model can have both kinds of problems.
02. Compare two learning procedures
Suppose the target value at a chosen x is 10. Across many hypothetical training samples, model A has mean prediction 8 and prediction variance 1. Model B has mean prediction 10 and variance 6. Let irreducible noise variance be 2.
| Model | Bias² | Variance | Noise | Total |
|---|---|---|---|---|
| A | (8 − 10)² = 4 | 1 | 2 | 7 |
| B | 0 | 6 | 2 | 8 |
The unbiased procedure has higher total error in this invented example. Reducing one component does not automatically improve the total.
03. Connect the idea to interventions
A very rigid model may systematically miss structure. A highly flexible model may react strongly to noise in limited data. Complexity controls and regularization change these tendencies, but the relationship is not a universal monotonic rule for every modern model.
Bagging averages predictions from models fit on resampled data. If their errors are not perfectly correlated, averaging can reduce variance. It does not automatically remove systematic bias shared by every component.
For M equally variable predictors with pairwise error correlation ρ and variance σ², the variance of their average is σ²[ρ + (1 − ρ)/M]. With σ² = 4, ρ = 0.5, and M = 10, that is 2.2. Adding more highly correlated models yields diminishing returns.
04. Use evidence rather than slogans
High training and validation error can suggest underfitting, but can also reflect poor optimization or noisy labels. A large generalization gap can suggest variance, but mismatched splits and leakage require separate checks.
Use learning curves, repeated splits consistent with deployment, and controlled model comparisons. If performance improves substantially with more representative data, collecting data may be more useful than redesigning the architecture.
Do not claim that one observed training–validation gap numerically equals variance. You do not know the true function or repeated-sample distribution from that plot alone.
05. Answer the follow-up
“Can a model have high bias and high variance?”
Yes. It can systematically miss the relevant structure while reacting strongly to irrelevant features or limited data. The terms are not mutually exclusive model categories.
State the squared-error assumptions, calculate the example, and propose a diagnostic before deciding to simplify or enlarge a model.
Sources & further reading
scikit-learn: single estimator versus bagging illustrates the decomposition. Numerical examples here are invented.
From one tree to an ensemble ↗
Compare bagging and boosting in practical model selection.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.