01 / 21

Bootstrap
Confidence Intervals

Learn how resampling with replacement lets you construct confidence intervals without relying on parametric assumptions: the percentile, basic, and \( BC_a \) methods.

AP Statistics

What Is the Bootstrap?

The bootstrap is a resampling method introduced by Bradley Efron in 1979. The core idea: treat your observed sample as a stand-in for the population, then draw many resamples with replacement to approximate the sampling distribution of any statistic.

Why does this work? By the plug-in principle, the empirical distribution \( \hat{F}_n \) converges to the true distribution \( F \) as \( n \to \infty \). The variability across bootstrap replicates mirrors the true sampling variability of the statistic.

The Bootstrap Algorithm

1
Compute the observed statistic \( \hat{\theta} \) from the original sample of size \( n \).
2
Draw \( B \) bootstrap samples: for \( b = 1, \dots, B \), draw \( n \) observations with replacement from the original sample.
3
Compute \( \hat{\theta}_b^* \) for each bootstrap sample to get the bootstrap distribution: \( \hat{\theta}_1^*, \hat{\theta}_2^*, \dots, \hat{\theta}_B^* \).
4
Use the bootstrap distribution to estimate standard errors, construct confidence intervals, or perform hypothesis tests.

Visualising the Bootstrap Distribution

Bootstrap Replicate Value Frequency \( \hat{\theta} \) 2.5th %ile 97.5th %ile 95% Confidence Interval

Why Use Bootstrap CIs?

✓ No Normality Needed
Works for skewed data, heavy tails, or small samples where the CLT is unreliable.
✓ Any Statistic
Medians, ratios, correlations, regression coefficients: no closed-form SE formula required.
✓ Automatic Shape
The CI inherits the natural asymmetry of the bootstrap distribution: no forced symmetry.

Traditional intervals use \( \hat{\theta} \pm z_{\alpha/2} \cdot \widehat{\text{SE}} \), which assumes the sampling distribution is normal and symmetric. The bootstrap relaxes both assumptions.

The Percentile Method

The simplest bootstrap CI. For a \( (1 - \alpha) \times 100\% \) interval, take the \( \frac{\alpha}{2} \) and \( 1 - \frac{\alpha}{2} \) quantiles of the bootstrap distribution directly.

Pros
Simple, intuitive, respects range restrictions (e.g., \( \text{variance} > 0 \)).
Cons
Can have poor coverage when the bootstrap distribution is biased relative to the true sampling distribution.

The Basic (Pivotal) Method

Instead of using the bootstrap quantiles directly, the basic method (also called the pivotal or reverse percentile method) reflects the bootstrap distribution around \( \hat{\theta} \).

Notice the bounds are swapped and reflected: the upper percentile appears in the lower bound and vice versa. This "reversal" corrects for bias in the bootstrap distribution.

Percentile vs. Basic: Visual Comparison

Percentile Method \( \hat{\theta} \) \( \hat{\theta}^*_{(.025)} \) \( \hat{\theta}^*_{(.975)} \) Basic (Pivotal) Method \( \hat{\theta} \) \( 2\hat{\theta} - \hat{\theta}^*_{(.975)} \) \( 2\hat{\theta} - \hat{\theta}^*_{(.025)} \) Bounds are reflected around \( \hat{\theta} \) in the basic method

The \( BC_a \) Method

The bias-corrected and accelerated (\( BC_a \)) method adjusts the percentile endpoints to account for both bias (the bootstrap distribution centre differs from \( \hat{\theta} \)) and skewness (acceleration).

\( \hat{z}_0 \) Bias
Fraction of bootstrap replicates \( < \hat{\theta} \), mapped to a \( z \)-score. If exactly 50%, then \( \hat{z}_0 = 0 \).
\( \hat{a} \) Acceleration
Estimated via jackknife influence values. Measures how the SE of \( \hat{\theta} \) changes with the true parameter value.

Key Distinctions Among Methods

Percentile Basic \( BC_a \)
Formula Direct quantiles of \( \hat{\theta}^* \) Reflected quantiles around \( \hat{\theta} \) Adjusted quantiles via \( \hat{z}_0, \hat{a} \)
Bias correction ✕ None Partial (pivot) ✓ Full
Skewness correction ✕ None ✕ None ✓ Yes (acceleration)
Coverage accuracy First order First order Second order
Complexity Lowest Low Moderate (jackknife)

The Normal (SE) Bootstrap Interval

For completeness, there is also the bootstrap SE method: use the bootstrap to estimate the standard error, then build a normal-theory interval.

This is symmetric by construction, just like the classical CI. It inherits all the problems of assuming normality: poor coverage when the sampling distribution is skewed. It is generally not recommended unless you have strong reason to believe normality holds.

How to Apply Bootstrap CIs

1
Choose your statistic \( \hat{\theta} \): mean, median, correlation, regression coefficient, etc.
2
Set \( B \geq 5{,}000 \) bootstrap replicates. For publication, use \( B = 10{,}000 \).
3
Resample and compute: draw \( B \) samples with replacement, calculate \( \hat{\theta}_b^* \) for each.
4
Select your CI method: use \( BC_a \) as default. Fall back to percentile if computation is prohibitive.
5
Report the interval: state the confidence level, the method, and the number of bootstrap replicates.

Example 1: Percentile CI for a Mean

A sample of \( n = 20 \) test scores: \( \bar{x} = 74.3 \). After \( B = 5{,}000 \) bootstrap resamples, the sorted bootstrap means yield:

2.5th percentile
\( \hat{\theta}^*_{(0.025)} = 70.8 \)
Observed
\( \hat{\theta} = 74.3 \)
97.5th percentile
\( \hat{\theta}^*_{(0.975)} = 77.6 \)

Example 2: Basic CI for the Same Data

Using the same bootstrap replicates from Example 1: \( \hat{\theta} = 74.3 \), \( \hat{\theta}^*_{(0.025)} = 70.8 \), \( \hat{\theta}^*_{(0.975)} = 77.6 \).

Compare: the percentile CI was \( [70.8,\; 77.6] \). The basic CI is \( [71.0,\; 77.8] \): slightly shifted to the right. This reflects a minor negative (left) skew in the bootstrap distribution, which the basic method corrects for.

Example 3: \( BC_a \) for a Median

For a skewed income sample (\( n = 50 \)), the sample median is \( \hat{m} = \$42{,}000 \). After \( B = 10{,}000 \) resamples:

1
Bias correction \( \hat{z}_0 \): 47.2% of bootstrap medians fall below \( \$42{,}000 \), so \( \hat{z}_0 = \Phi^{-1}(0.472) = -0.070 \).
2
Acceleration \( \hat{a} = 0.034 \) (computed via jackknife).
3
Adjusted percentiles: plugging into the \( BC_a \) formula yields \( \alpha_1 \approx 0.024 \) and \( \alpha_2 \approx 0.974 \).
4
\( BC_a \) 95% CI: \( [\hat{\theta}^*_{(0.024)},\; \hat{\theta}^*_{(0.974)}] = [\$37{,}800,\; \$48{,}100] \).

Common Mistakes

✕ Too Few Replicates
Using \( B = 100 \) or \( B = 200 \) makes the CI endpoints unstable. Use \( B \geq 5{,}000 \) for percentile CIs.
✕ Confusing the Bounds
In the basic method, the upper bootstrap percentile goes in the lower CI bound. Mixing them up produces a nonsensical interval.
✕ Ignoring Dependence
The naive bootstrap assumes i.i.d. observations. For time-series or clustered data, you need block bootstrap or cluster bootstrap.

Question 1 of 5

In a bootstrap procedure, each bootstrap sample is drawn with replacement and has the same size as the original sample. What is the primary reason for sampling with replacement?

Question 2 of 5

Given \( \hat{\theta} = 50 \), \( \hat{\theta}^*_{(0.025)} = 44 \), and \( \hat{\theta}^*_{(0.975)} = 58 \), what is the basic (pivotal) 95% CI?

Question 3 of 5

Which bootstrap CI method achieves second-order accuracy in coverage by correcting for both bias and skewness?

Question 4 of 5

A researcher uses \( B = 50 \) bootstrap resamples to construct a 95% percentile CI. Which criticism is most valid?

Question 5 of 5

When the bootstrap distribution of \( \hat{\theta}^* \) is perfectly symmetric around \( \hat{\theta} \), which statement is true?