Contents
- 01Introduction
- 02Setting and notation
- 03Intuition
- 04The decomposition and its proof
- 05A warm-up you can do by hand
- 06The experiment
- 07Models where every term has a formula
- 08Diagnosing bias and variance in practice
- 09Fixing high bias and high variance
- 10Beyond the classical picture
- 11Interview questions and model answers
- 12Summary
- References
11Interview questions and model answers
Q1Explain the bias–variance tradeoff.
Expected squared test error at a point equals bias^2 plus variance plus irreducible noise. Bias is error from overly simple assumptions (underfitting); variance is error from sensitivity to the particular training sample (overfitting). Increasing flexibility usually lowers bias and raises variance, so test error is U-shaped in model complexity. Finish with practice: diagnose by comparing training and validation error, then add capacity for bias, or data and regularization for variance.
Q2Is it always a tradeoff?
No. More training data reduces variance without increasing bias (for least squares the average variance is \sigma^2p/n), and a better model family or more informative features can reduce both terms. The trade is between the two terms at a fixed amount of data and a given family of models.
Q3Derive the decomposition.
Write y-\fhat=\varepsilon+(f-\fbar)+(\fbar-\fhat), square, and take expectations over training sets and noise. The three cross terms vanish because \E\varepsilon=0, the test noise is independent of the training set, and \E_{\D}[\fhat]=\fbar; what remains is \sigma^2+(f-\fbar)^2+\E_{\D}[(\fhat-\fbar)^2] (Section 4).
Q4How do regularization strength, k in k-NN and tree depth affect bias and variance?
A larger \lambda, a larger k or a shallower tree each add bias and remove variance. For k-NN, \mathrm{Err}=\sigma^2+\text{bias}^2+\sigma^2/k; for ridge with an orthonormal design, the optimal penalty is \lambda^\star=\sigma^2/\beta^2 (Section 7).
Q5Why do bagging and random forests reduce variance but not bias?
Averaging B predictions with pairwise correlation \rho gives variance \rho\sigma_f^2+(1-\rho)\sigma_f^2/B, while the mean prediction is unchanged. Random forests lower \rho with random feature subsets. Boosting, in contrast, mainly reduces bias.
Q6Why is training error a bad estimate of test error?
Because the fit has adapted to the noise of its own training points. For least squares with p parameters, expected training error is \sigma^2(1-p/n) while the error on new responses is \sigma^2(1+p/n) (Proposition 1).
Q7How would you tell whether to collect more data?
Plot learning curves. If training and validation error have converged to a high value, more data will not help (bias); if there is a large gap that is still closing, more data will help (variance).
Q8Can you measure bias and variance on a real dataset?
Variance, approximately: refit on bootstrap samples (Efron and Tibshirani, 1993) and measure how much the predictions move. Bias, not directly, because f is never observed. In practice you use validation error, cross-validation and learning curves.
Q9Does the decomposition hold for classification?
Not additively for zero–one loss; see Kohavi and Wolpert (1996) and Domingos (2000), in whose framework variance can even reduce the error at points with high bias. It holds exactly for squared loss, including the Brier score of predicted probabilities.
Q10How can huge neural networks fit random labels yet generalize on real data?
Mention double descent (Belkin et al., 2019; Nakkiran et al., 2020): past the interpolation threshold test error can decrease again, because the training algorithm prefers simple interpolating solutions, and the measured variance of wide networks often falls with width (Neal et al., 2018; Yang et al., 2020). The decomposition still holds; the classical U is not the whole story.