Skip to content
Tech Interview Prep
Technical interview guide

Bias-Variance Tradeoff

Why model error splits into bias and variance, and why reducing one often increases the other.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v6
Editorial status
Reviewed

Scope: scikit-learn stable model-selection and ensemble guidance and Google ML Crash Course overfitting guidance accessed 2026-08-31..

Overview

Curated: · Written: · Reviewed:

Bias-Variance Tradeoff

In one line

Model error splits into bias (the average fit's distance from the truth), variance (how much the fit moves across training samples) and irreducible noise. Reach for it when a train and validation result needs diagnosing, and to decide whether the next move is more data, more regularization, more capacity or better features.

Key definitions

  • Bias: E[f_hat(x)] minus f(x); systematic error of the average fit, set by model family, features and objective.
  • Variance: E[(f_hat(x) - E[f_hat(x)])^2]; how much the fit changes when the training sample changes.
  • Irreducible noise (sigma^2): outcome variation the best predictor from these features cannot remove; the Bayes error for that representation.
  • Underfitting: high error on training and validation, small gap; bias-dominated.
  • Overfitting: low training error with a persistent train-validation gap; variance-dominated.
  • Learning curve: performance against training size, refitting the whole pipeline at each size.

Formulas and complexity

E[(y−f^(x))2]=Bias2+Variance+σ2E[(y - \hat{f}(x))^2] = \text{Bias}^2 + \text{Variance} + \sigma^2 Var(Tˉ)=ρσ2+1−ρBσ2\text{Var}(\bar{T}) = \rho\sigma^2 + \frac{1-\rho}{B}\sigma^2

The identity is exact for squared loss only. For AUC, log loss or 0-1 loss, treat it as a mental model: the terms move in the same directions but do not sum to the metric.

How it works

Training error falls as capacity rises, so it says nothing about generalization on its own. Compare train and validation at each training size. Curves that converge at high error are bias-limited; a persistent gap that narrows slowly is variance-limited. Curve shape picks the lever. Noisy labels inflate apparent variance, so check label consistency before calling a gap a variance problem.

yes no yes no yes no Train and validation error Both high? Bias: better features, representation or objective Persistent gap? Variance: more representative rows, regularize, bag Gap stays with more data? Split or leakage, or label noise Near the noise floor

When to use and when not to

LeverTerm it movesCost
More representative rowsVariance downCollection cost; no help if bias-limited
L1/L2, dropout, early stopping, pruningVariance downBias up past the useful range
Shallower trees, fewer featuresVariance downBias up
Better features or representationBias downEngineering cost; can raise variance
Bagging / random forestVariance downLatency, memory; weak when bias dominates
BoostingBias downOverfits noisy labels if rounds are unbounded
StackingVariance down (usually)Needs out-of-fold base predictions

Traps interviewers probe

  • Quoting training accuracy as evidence. Fix: report validation performance on data the tuning never touched, alongside the gap.
  • Adding rows to a bias-limited model. Curves converge at high error and extra rows change nothing. Fix: change features, representation or objective.
  • Reading a plateau as a climb. A +0.009 gain against a +/- 0.015 fold spread is noise. Fix: compare each increment with the spread across folds before funding more data.
  • Using a random subsample of time-ordered data for the learning curve. Later patterns leak into the smaller sets. Fix: subsample by event time and drop entities that cross the boundary.
  • Treating label noise as overfitting. Fix: check whether near-duplicate inputs carry consistent labels; relabel or drop the corrupted slice before adding regularization.

Interview tips

Open with the decomposition: "Expected squared error splits into bias squared, variance and irreducible noise, and I diagnose which term dominates from learning curves." Say which bias you mean if fairness is in the room, because estimation bias and fairness bias are different quantities.

Expect these follow-ups: Would more data help? Is 99% training accuracy good? The gap is small, so are we fine? Which lever moves which term and what does it cost? Does the curve support a bigger model or a simpler one?

30-second outline: "Bias is the average fit's distance from the truth, variance is how much the fit moves across samples, and noise is the floor. I'd plot train and validation against training size on a split that respects time and entities. If both are high and flat, it's bias and I change features. If there's a persistent gap that narrows slowly, it's variance and I add representative data or regularize. I'd check the labels before concluding either, and I'd confirm any gain against the fold spread."

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.