Notes

Bias-Variance Decomposition in Ensembles

Ensembles feel a bit like asking a panel of judges instead of trusting one person: you’re hoping their combined decision is steadier and more accurate. The bias-variance decomposition in ensembles is the lens that explains exactly why that steadiness happens (or doesn’t) in supervised prediction.

The core idea: error splits into bias, variance, and noise

For regression, the expected prediction error at a point can be broken into:

  • Bias: how far the average model prediction is from the true function (systematic error).
  • Variance: how much predictions change if you retrain on a different sample of the same size (instability).
  • Irreducible noise: randomness in the data you can’t model away (measurement error, unobserved factors).

Ensembles mainly target variance, and certain ensembles also reduce bias.

What averaging does in an ensemble

In bagging (e.g., RandomForestRegressor), you train many high-variance learners (like deep decision trees) on bootstrap samples and average them. Averaging cancels out uncorrelated “wiggles,” so variance drops. The key is diversity: if all trees make similar errors (highly correlated), variance won’t shrink much. Random forests push diversity further by also subsampling features at each split, lowering correlation and improving variance reduction.

How this shows up in practice

  • House price prediction: a single deep tree overfits (low bias, high variance); a random forest keeps low bias but greatly lowers variance.
  • Fraud detection: boosting (e.g., Gradient Boosting, XGBoost) adds learners sequentially to fix systematic mistakes, often reducing bias while controlling variance via shrinkage and regularization.
  • Customer churn: if your base models are too simple (high bias), bagging won’t help much—boosting or richer features are needed.

Bias-Variance Decomposition in Ensembles is the analysis of an ensemble’s expected prediction error as the sum of bias (systematic error from underfitting), variance (error from sensitivity to training data), and irreducible noise, accounting for how combining models changes these terms. It matters because ensemble design (e.g., bagging vs. boosting) is justified by how it trades bias against variance—bagging mainly reduces variance via averaging, while boosting mainly reduces bias by correcting residual errors.

Imagine asking a group of friends to guess the number of jellybeans in a jar. If they all make the same kind of mistake, the group’s average guess will still be off in a consistent direction. That’s bias: a built-in “lean” toward the wrong answer. If their guesses are all over the place, that’s variance: results that change a lot depending on who you ask.

Bias-Variance Decomposition in Ensembles is a way to think about prediction errors when you combine many models. Ensembles often reduce variance by averaging many imperfect opinions, and some (like boosting) can also reduce bias, helping predictions become both steadier and closer to the truth.