Bootstrap — build many training sets by ==sampling n points with replacement== from the original n-point dataset. This manufactures diversity from one dataset.
Aggregating — combine the B trained models into one output: average for regression, majority vote for classification.
Recall Solution L1.2
Variance only. From Step 1 of the parent derivation, expectation is linear, so
E[fˉ(x)]=B1∑bE[f^b(x)]=B1⋅Bμ=μ.
The ensemble mean equals a single model's mean μ, so bias is untouched. All the benefit lives in the variance term.
Recall Solution L1.3
B1−ρσ2 — the B-dependent term; it →0 as B→∞ (adding trees).
ρσ2 — the floor; it has no B in it, so more trees can never remove it. To lower the floor you must lower ρ.
Plug in ρ=0:
Var(fˉ)=0⋅9+91−0⋅9=0+1=1.
The variance dropped by a factor of exactly B=9 (9→1). This is the best case — no correlation floor to stop it.
Recall Solution L2.2
Var(fˉ)=0.4⋅9+91−0.4⋅9=3.6+0.6=4.2.
The floor is ρσ2=0.4⋅9=3.6. Even with infinite trees you stop at 3.6, not 0. Correlation caps the win.
Recall Solution L2.3
P(absent)=(1−51)5=(0.8)5=0.32768.
The limiting value is e−1≈0.3679. Even at the tiny size n=5 we are already close to 37%; the convergence is fast.
Recall Solution L2.4
Ensemble is correct if 2 or 3 are right — a binomial with n=3, p=0.8:
P=(23)(0.8)2(0.2)1+(33)(0.8)3=3(0.64)(0.2)+0.512=0.384+0.512=0.896.
Accuracy rose 0.80→0.896 — the classic majority-vote lift, valid only because the votes were independent.
Floor =ρσ2=0.5⋅4=2. We need
B1−ρσ2≤0.10⋅2=0.2.
Left side =B0.5⋅4=B2. So B2≤0.2⇒B≥10.Minimum B=10. Notice the requirement depends only on ρ and the tolerance, not on σ2 (it cancels).
Recall Solution L3.2
Var=2+B2 (from the term B1−ρσ2=B0.5⋅4=B2).
B
Var(fˉ)
1
2+2=4
5
2+0.4=2.4
20
2+0.1=2.1
∞
2
Look at the curve: the drop from B=1→5 is huge (4→2.4), from 5→20 modest, and past 20 almost flat. Message: returns diminish fast — pick B where the curve flattens (where OOB error plateaus), not arbitrarily large.
Recall Solution L3.3
If the three votes are identical, the majority is whatever the single classifier said. The ensemble accuracy collapses back to p=0.80 — no gain at all.
Lesson: the entire majority-vote benefit came from independence (diversity). Correlation ρ→1 makes the ensemble a copy of one model — exactly the ρσ2→σ2 floor in the variance formula. This is the analysis-level twin of L2.4.
Team A:Var=0.6⋅1+10001−0.6⋅1=0.6+0.0004=0.6004.Team B:Var=0.2⋅1+501−0.2⋅1=0.2+0.016=0.216.Team B wins by0.6004−0.216=0.3844 — nearly 3× lower variance with 20× fewer trees.
Synthesis: lowering the floor ρσ2 dominates piling on trees. This is precisely why Random Forests add feature subsampling on top of bagging — to attack ρ, not B.
Recall Solution L4.2
A given point is OOB for a fraction ≈e−1=0.368 of trees. So
OOB trees for xi≈0.368×100≈37 trees.
Because those ≈37 trees never trained on xi, their prediction on it is like a test prediction. Averaging them and repeating for every point gives the Out-of-Bag Error — a validation estimate that needs no held-out set. See also Bootstrap (statistics).
Recall Solution L4.3
Var(fˉ)=0.97⋅2+2001−0.97⋅2=1.94+0.0003=1.9403.
Best case (B→∞) =ρσ2=0.97⋅2=1.94. A single model had σ2=2, so bagging cut variance from 2 to only 1.94 — a 3 % reduction for 200× the compute.
Comment: stable learners barely change across resamples (ρ≈1), so bagging is nearly useless here. This is the quantitative form of the parent's "don't bag stable models" mistake.
The single-model variance is σ2 (set B=1: ρσ2+(1−ρ)σ2=σ2 ✓). The floor is ρσ2. Halfway between them is
Vhalf=2σ2+ρσ2=2(1+ρ)σ2.
Set the ensemble equal to this and solve for B:
ρσ2+B1−ρσ2=21+ρσ2.
Divide by σ2 and subtract ρ:
B1−ρ=21+ρ−ρ=21−ρ.
Therefore B1=21, i.e. B=2.
Insight:independent of ρ, the very first extra tree (B=1→2) already carries you halfway from a single model to the floor. Bagging's biggest single gain is the second tree; everything after is cleanup.
Recall Solution L5.2
Ensemble correct ⟺ at least m+1 of the 2m+1 are correct:
Pens=∑k=m+12m+1(k2m+1)pk(1−p)2m+1−k.
For 2m+1=5 (m=2), p=0.7, need k≥3:
P=(35)(0.7)3(0.3)2+(45)(0.7)4(0.3)1+(55)(0.7)5=10(0.343)(0.09)+5(0.2401)(0.3)+(0.16807)=0.3087+0.36015+0.16807=0.83692.
This matches the parent's ≈0.837. As 2m+1→∞ with p>0.5, the sum →1 (Condorcet's Jury Theorem) — but again only for independent votes.
Recall Solution L5.3
As B→∞ the correlated ensemble reaches variance ρσ2. An independent ensemble of Beff models has variance Beffσ2 (set ρ=0 in the formula). Match them:
ρσ2=Beffσ2⟹Beff=ρ1.
For ρ=0.25: Beff=4. So an infinite forest with pairwise correlation 0.25 behaves like just 4 independent trees. Correlation is a hard ceiling on how much diversity you actually own — the deep reason Random Forests fight to lower ρ.