🧮 Brain Teaser

The Infinite Ensemble That Doesn't Help

Suppose you have infinitely many classifiers h1,h2,h3,h_1, h_2, h_3, \ldots, each independently making a binary prediction hi(x){1,+1}h_i(x) \in \{-1, +1\} for a fixed input xx. Each classifier is identically distributed with:

P(hi(x)=y)=p,P(hi(x)y)=1pP(h_i(x) = y^*) = p, \quad P(h_i(x) \neq y^*) = 1 - p

where yy^* is the true label, and p>12p > \frac{1}{2}.

You form the majority vote classifier over all nn classifiers. By the Law of Large Numbers, as nn \to \infty, the majority vote is correct with probability approaching 1. Great!

Now consider a twist: the classifiers are not independent, but instead all share a common "mistake variable." Specifically:

hi(x)={ywith probability pywith probability 1ph_i(x) = \begin{cases} y^* & \text{with probability } p \\ -y^* & \text{with probability } 1-p \end{cases}

but all classifiers make the same mistake: if h1h_1 is wrong, then h2,h3,h_2, h_3, \ldots are all wrong too (they are perfectly correlated).

Question: What is the error rate of the majority vote ensemble in this case, for any nn?

Now generalize: suppose each classifier has error εi\varepsilon_i decomposed as:

error of hi=bias2+variance\text{error of } h_i = \text{bias}^2 + \text{variance}

Averaging nn such classifiers, what happens to the bias and variance components as nn \to \infty? What does this tell you about when ensembling helps?

ensemble methodsbias-variance tradeoffbaggingcorrelationvariance reduction

Answer: The Infinite Ensemble That Doesn't Help

Key Idea / Intuition

When classifiers are perfectly correlated, majority voting does nothing — they all vote the same way, so the ensemble error equals the individual error. Averaging only reduces the variance (the idiosyncratic, independent noise) not the bias (the shared, systematic error). This is the fundamental insight behind when bagging and ensemble methods actually help: they attack variance, not bias. If your models all fail in the same systematic way, throwing more of them together is useless.


Formal Proof / Solution

Part 1: Perfectly Correlated Classifiers

Since all classifiers are perfectly correlated, they all agree:

h1(x)=h2(x)==hn(x) almost surely.h_1(x) = h_2(x) = \cdots = h_n(x) \text{ almost surely.}

The majority vote is simply h1(x)h_1(x). Therefore:

P(majority vote is wrong)=P(h1(x)y)=1p.P(\text{majority vote is wrong}) = P(h_1(x) \neq y^*) = 1 - p.

The error rate is exactly 1p1-p for any nn, even nn \to \infty. More classifiers provide zero benefit.


Part 2: Bias-Variance Decomposition Under Averaging

Consider a regression setting. Let each model f^i(x)\hat{f}_i(x) have:

E[f^i(x)]=μ(x),Var(f^i(x))=σ2\mathbb{E}[\hat{f}_i(x)] = \mu(x), \quad \text{Var}(\hat{f}_i(x)) = \sigma^2

Decompose the error of a single model:

MSE=(μ(x)f(x))2bias2+σ2variance\text{MSE} = \underbrace{(\mu(x) - f^*(x))^2}_{\text{bias}^2} + \underbrace{\sigma^2}_{\text{variance}}

Now form the average ensemble fˉ(x)=1ni=1nf^i(x)\bar{f}(x) = \frac{1}{n}\sum_{i=1}^n \hat{f}_i(x).

Bias of the average:

E[fˉ(x)]=1ni=1nE[f^i(x)]=μ(x)\mathbb{E}[\bar{f}(x)] = \frac{1}{n}\sum_{i=1}^n \mathbb{E}[\hat{f}_i(x)] = \mu(x)

so the bias is unchanged: bias2(fˉ)=(μ(x)f(x))2\text{bias}^2(\bar{f}) = (\mu(x) - f^*(x))^2.

Variance of the average (with pairwise correlation ρ\rho):

Var(fˉ)=1n2Var ⁣(if^i)=1n2(nσ2+n(n1)ρσ2)=σ2n+(n1)nρσ2\text{Var}(\bar{f}) = \frac{1}{n^2}\text{Var}\!\left(\sum_i \hat{f}_i\right) = \frac{1}{n^2}\left(n\sigma^2 + n(n-1)\rho\sigma^2\right) = \frac{\sigma^2}{n} + \frac{(n-1)}{n}\rho\sigma^2

As nn \to \infty:

Var(fˉ)    ρσ2\text{Var}(\bar{f}) \;\longrightarrow\; \rho\,\sigma^2

| Correlation ρ\rho | Variance of ensemble | What happens | |---|---|---| | ρ=0\rho = 0 (independent) | 0\to 0 | Full variance reduction | | 0<ρ<10 < \rho < 1 | ρσ2>0\to \rho\sigma^2 > 0 | Partial reduction | | ρ=1\rho = 1 (perfectly correlated) | =σ2= \sigma^2 | No reduction at all |


The Punchline

MSE(fˉ)=(μf)2bias2, unchanged+ρσ2residual variance\boxed{\text{MSE}(\bar{f}) = \underbrace{(\mu - f^*)^2}_{\text{bias}^2,\ \text{unchanged}} + \underbrace{\rho\,\sigma^2}_{\text{residual variance}}}

Ensembling helps only when:

  1. The models have low bias (they are "roughly right on average"), and
  2. The models have low correlation (they make different mistakes).

This is exactly why bagging works well for high-variance, low-bias models like deep decision trees: each tree on a bootstrap sample is different enough (ρ\rho small) that the variance collapses. But for a misspecified linear model, no amount of bagging fixes the bias — you're averaging the same systematic error forever.

Random Forests take this further by decorrelating trees via random feature subsets, explicitly reducing ρ\rho to push residual variance toward zero.

Source: The Elements of Statistical Learning, Ch. 8 (Model Averaging and Bagging)

Type: ML/StatsSource: The Elements of Statistical Learning, Ch. 8 (Model Averaging and Bagging)Edit on GitHub ↗