Specialty › Resampling

Bootstrap CI

Bootstrap confidence intervals resample the data to bound any one- or two-sample statistic, including those with no analytic standard error.

What is Bootstrap CI?

The bootstrap resamples with replacement from the original data B times, recomputes the statistic on each resample, and uses the resulting distribution to construct a CI. The key insight (Efron 1979): the variability of the statistic across bootstrap resamples mirrors its variability across hypothetical samples from the true population.

Three CI flavours: percentile (the 2.5th and 97.5th quantiles of the bootstrap distribution — simplest), basic (reflects around the observed value — corrects mild bias), BCa (bias-corrected and accelerated — corrects for both bias and skew, the standard for inference where you want a real CI).

Use the bootstrap for statistics with no closed-form SE: medians, IQRs, ratios of means, correlations of paired bootstraps, area under a curve. For routine statistics (mean, proportion) the analytic CIs are usually fine and faster.

When should I use Bootstrap CI?

  • Custom statistics where SE isn't analytic.
  • Small samples where the asymptotic CI is unreliable.
  • Non-normal data where the t-based CI is mis-calibrated.

What data does it need?

One or two numeric columns + statistic + R (number of resamples) + CI method + optional seed.

What does it report?

Observed statistic, bootstrap SE, bias, lower / upper CI bounds. BCa diagnostics z₀ + a when chosen.

What does it assume?

  • Independent observations — bootstrap fails on time-series or clustered data without modification (block bootstrap).

Formula

For BCa: CI = θ̂*({α₁, α₂}-quantiles), with α₁ = Φ(z₀ + (z₀ + z_{α/2}) / (1 − a(z₀ + z_{α/2})))

How do I interpret the result?

R = 1000 is enough for percentile / basic; R = 5000–10000 for BCa (extreme quantiles need more reps).

BCa is the right default for asymmetric distributions (medians, ratios). Percentile is acceptable for nearly-symmetric distributions and easier to explain.

See also

References

  • Efron & Tibshirani (1993). An Introduction to the Bootstrap.