Bootstrap: Measuring Variance Versus Shrinking It
Statistics & ExperimentsModel answerLast updated
Explain whether resampling can make an estimator more precise, separating bootstrap standard errors from bagging, with one example where it fails and one where it helps.
A colleague asks you: "Can the bootstrap help reduce variance?"
Give a precise answer that separates two different things people often blur together:
- Using the bootstrap to measure how variable an estimator is (standard error, confidence interval).
- Using resampling-based ideas to build an estimator that actually has lower variance.
Your answer should include:
- A concrete example where bootstrap resampling does not lower variance, with an explanation of why.
- A concrete example where bootstrap-style resampling does produce a lower-variance estimator or predictor, with an explanation of why.
- A short note on what limits the achievable gain, and any caveats (for example, effects on bias).
Hints
Hint 1
Ask what the quantity being reported is. Is it the original estimator, or a new estimator defined as an average over resamples? Does resampling the same data add information?
Hint 2
Try the sample mean: what is the average of the bootstrap means as the number of resamples grows? Then try a discontinuous estimator such as an indicator that the mean exceeds a cutoff, evaluated at the cutoff.
Hint 3
For the gain from averaging B correlated fits, use Var = rho*sigma^2 + (1-rho)*sigma^2/B. Think about which term survives as B grows, and why random forests try to reduce rho.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Short answer
Not by itself. The standard bootstrap estimates the sampling variability of an estimator. Resampling the observed data adds no new information, so it cannot make that estimator more precise.
With a twist. If you redefine the estimator as the average of the original estimator over bootstrap resamples (bagging), you get a different, smoothed estimator that can have lower variance. This only helps when the base estimator is nonlinear and unstable.
Three separate ideas are worth naming:
- Bootstrap for inference estimates Var(θ̂), the standard error or an interval, and leaves θ̂ unchanged.
- Bagging replaces θ̂ with θ̂_bag = E*[θ̂*], which can have lower variance.
- Monte Carlo refinements (balanced or antithetic resampling) reduce the simulation noise of the bootstrap's own output, not the sampling variance of θ̂.
1) Bootstrap measures variance, it does not change it
Given data x₁,…,xₙ and an estimator θ̂ = T(x):
- Draw B samples of size n with replacement from the empirical distribution.
- Compute θ̂_b = T(x_b) for each.
- Report SE_boot = sd(θ̂₁,…,θ̂_B).
This is a plug-in estimate of Var_F(θ̂). The reported estimator is still θ̂, whose variance is determined by n and the true distribution F. Increasing B only reduces the Monte Carlo error of SE_boot, not the variability of θ̂.
For the mean, the bootstrap variance has a closed form: Var*(x̄*) = σ̂²_plug-in / n, which is the textbook s²/n up to the n versus n−1 divisor. The bootstrap reproduces the standard error rather than shrinking it.
2) Example where it does not help: averaging bootstrap means
Suppose someone reports θ̂_B = (1/B) Σ x̄*_b.
- Conditional on the data, E*[x̄*] = x̄, so as B → ∞, θ̂_B → x̄ exactly.
- For finite B, the extra Monte Carlo variance is σ̂²_plug-in / (nB).
- By the law of total variance, Var(θ̂_B) = Var(x̄) + E[σ̂²_plug-in]/(nB) ≥ Var(x̄).
The result is never better, and slightly worse at finite B. The reason: the mean is a linear statistic, so averaging it over resamples just evaluates it at the empirical distribution. The same holds approximately for other smooth estimators such as OLS coefficients, so bagging them changes almost nothing.
Related trap: bootstrap bias correction. θ̂_bc = 2θ̂ − mean(θ̂*) reduces bias but usually increases variance, since you subtract a noisy bias estimate. Bootstrap tools can move you along the bias-variance tradeoff in either direction.
3) Example where it does help: bagging a hard threshold
Let X₁,…,Xₙ be iid N(μ, σ²) and take the unstable estimator θ̂ = 1{x̄ > c}. Consider the worst case, μ = c.
- Z = √n(x̄ − c)/σ is N(0,1), so θ̂ = 1{Z > 0} is Bernoulli(1/2) and Var(θ̂) = 1/4.
- The bagged version is θ̂_bag = P*(x̄* > c) ≈ Φ(Z).
- Since Φ(Z) is Uniform(0,1), its mean is 1/2 (same as θ̂) and Var(θ̂_bag) = 1/12.
Variance falls by a factor of 3. This is the Bühlmann–Yu style explanation of why bagging works.
Why: an indicator is a discontinuous function of the data, so tiny perturbations near the cutoff flip the output between 0 and 1. Averaging over resamples replaces the hard step with a smooth curve (the normal CDF), and a smooth function of x̄ varies far less than a step function of x̄.
Decision trees are the practical version: every split is a hard threshold, so bagged trees and random forests are much lower variance than a single tree.
4) How much can be gained
Average B identically distributed predictors with variance σ² and pairwise correlation ρ:
Var(average) = ρσ² + (1 − ρ)σ²/B.
- As B → ∞ the second term disappears, but ρσ² remains. All fits come from the same data, so they stay correlated.
- Random forests add random feature subsetting at each split, lowering ρ and pushing the floor down.
- For stable learners (linear regression, k-NN with large k), ρ ≈ 1 and bagging achieves almost nothing.
5) Caveats and trade-offs
- Bias. Bagging changes the target. Away from the threshold in the example, θ̂_bag is pulled toward 1/2. It improves MSE mainly in the unstable region.
- No guarantee. There are constructed cases (certain U-statistic examples) where bagging increases variance or MSE.
- Out-of-bag evaluation. Each resample leaves out about 37% of points (1/e), giving a nearly free generalization estimate. This is a practical benefit separate from variance reduction.
- Cost. Bagging multiplies training cost by roughly B, though it parallelizes trivially.
Suggested spoken answer
"The bootstrap is a tool for estimating the sampling variance of an estimator. It doesn't reduce it, because resampling adds no information. Averaging bootstrap means just returns the sample mean plus Monte Carlo noise. But if I redefine the estimator as the bootstrap average, which is bagging, I can reduce variance when the base estimator is nonlinear and unstable, such as a threshold or a decision tree, because averaging smooths the discontinuity. For 1{x̄ > c} at the boundary, variance drops from 1/4 to 1/12. The gain is capped by the correlation between bootstrap fits, which is why random forests decorrelate trees. For linear or smooth estimators there's essentially no benefit."
Common mistakes
- Saying more bootstrap resamples reduce variance. A larger B reduces simulation error, not sampling variance.
- Treating a narrower bootstrap interval as proof of a more precise estimator.
- Claiming bagging always helps. It helps unstable learners, and the gain is capped by ρσ².
- Forgetting that bootstrap bias correction typically increases variance.
- Not distinguishing the variance of θ̂ from the variance of the bootstrap's own Monte Carlo approximation.