01 / 20

Bootstrap
Resampling

Learn to estimate standard errors and confidence intervals by resampling from your data: no parametric assumptions required.

AP Statistics

What Is the Bootstrap?

The bootstrap is a computer-intensive resampling method introduced by Bradley Efron in 1979. The core idea is simple: treat your observed sample as if it were the population, then draw many new samples from it with replacement to learn about the variability of a statistic.

Why Do We Need It?

No Formula Needed
Many statistics (medians, ratios, percentiles) lack simple standard-error formulas. The bootstrap provides one automatically.
Distribution-Free
No need to assume normality or any specific parametric model for the population.
Versatile
Works for virtually any statistic: means, medians, regression coefficients, correlation, and more.

The Bootstrap Workflow

Original Sample Resample (with replacement) B-Sample 1 B-Sample 2 B-Sample B ...
\( \hat{\theta}^*_1 \)
\( \hat{\theta}^*_2 \)
\( \hat{\theta}^*_B \)
Bootstrap Distribution SE_boot Repeat B times

The Bootstrap Standard Error

Given \( B \) bootstrap replicates \( \hat{\theta}^*_1, \hat{\theta}^*_2, \ldots, \hat{\theta}^*_B \), the bootstrap estimate of the standard error is:

This is simply the sample standard deviation of the bootstrap replicates: no assumptions about normality or the form of \( \hat{\theta} \).

Bootstrap Confidence Intervals

Percentile Method
Use the \( \alpha/2 \) and \( 1 - \alpha/2 \) quantiles of the bootstrap distribution directly as interval endpoints.
Normal Interval
\( \hat{\theta} \pm z_{\alpha/2} \cdot \widehat{\text{SE}}_{\text{boot}} \). Assumes the bootstrap distribution is approximately normal.

Bootstrap vs. Permutation Tests

Bootstrap Permutation
Goal Estimate SE / CI for a statistic Test a null hypothesis
Resampling With replacement from one sample Without replacement (shuffle labels)
Null hypothesis Not required Required: no group difference
Output Distribution of \( \hat{\theta}^* \) Null distribution of test statistic
Typical \( B \) 1,000 to 10,000 1,000 to 100,000

How to Apply the Bootstrap

1
Collect your original sample of size \( n \) and compute the statistic of interest \( \hat{\theta} \).
2
Draw a bootstrap sample: sample \( n \) observations with replacement from the original data.
3
Compute \( \hat{\theta}^* \) on the bootstrap sample.
4
Repeat steps 2-3 a total of \( B \) times (e.g., \( B = 10{,}000 \)).
5
Analyze the bootstrap distribution: compute \( \widehat{\text{SE}}_{\text{boot}} \), percentile CI, or a histogram.

Example: Bootstrap SE of a Median

Suppose we have 7 observations of reaction times (in ms):

210 230 245 260 median 275 310 490 outlier

Three Bootstrap Samples

Replicate Bootstrap Sample (size 7) Median
1 230, 245, 245, 260, 310, 310, 490 260
2 210, 210, 230, 260, 260, 275, 490 260
3 210, 230, 275, 275, 310, 310, 490 275

Bootstrap SE of the Median

After \( B = 10{,}000 \) bootstrap replicates, suppose we obtain the following bootstrap distribution of medians:

210 230 260 275 310 mean = 261 Frequency

Example: 95% CI for a Mean

A sample of \( n = 30 \) exam scores has \( \bar{x} = 72.5 \). After \( B = 5{,}000 \) bootstrap resamples, the sorted bootstrap means give:

\( 2.5^{\text{th}} \) percentile
\( \hat{\theta}^*_{(125)} = 68.9 \)
\( \bar{\hat{\theta}}^* \)
\( 72.4 \) (bootstrap mean)
\( 97.5^{\text{th}} \) percentile
\( \hat{\theta}^*_{(4875)} = 76.2 \)

Example: SE of a Correlation

A researcher computes the sample correlation between study hours and GPA for \( n = 50 \) students: \( \hat{r} = 0.63 \). The exact SE formula for \( r \) is complex and depends on unknown population parameters.

1
Resample 50 (hours, GPA) pairs with replacement.
2
Compute \( r^* \) on each bootstrap sample.
3
After \( B = 10{,}000 \) replicates: \( \widehat{\text{SE}}_{\text{boot}}(r) = \) 0.087.
4
Percentile 95% CI: \( ( \) 0.45, 0.78 \( ) \).

Choosing \( B \): How Many Replicates?

\( B = 1{,}000 \)
Good for a rough SE estimate. Fast even on modest hardware.
\( B = 10{,}000 \)
Standard recommendation for confidence intervals. Stable results.
\( B = 50{,}000+ \)
Needed for precise tail probabilities (e.g., 99% CI endpoints).

Common Mistakes

✕ Sampling Without Replacement
The bootstrap requires sampling with replacement. Without replacement you just get the original sample every time.
✕ Wrong Sample Size
Each bootstrap sample must be the same size \( n \) as the original. Drawing fewer or more observations distorts the SE estimate.
✕ Breaking Paired Structure
For bivariate data, resample whole pairs (rows), not individual columns independently. Resampling columns separately destroys the correlation.

Summary of Bootstrap Methods

Method Formula / Procedure When to Use
Bootstrap \( \widehat{\text{SE}}_{\text{boot}} \) SD of \( B \) bootstrap statistics Any statistic, any distribution
Percentile CI Quantiles \( \alpha/2 \) and \( 1-\alpha/2 \) General-purpose; simple to compute
Normal CI \( \hat{\theta} \pm z_{\alpha/2} \cdot \widehat{\text{SE}}_{\text{boot}} \) Bootstrap distribution is symmetric
BCa CI Bias-corrected and accelerated Skewed bootstrap distributions

Question 1 of 5

In bootstrap resampling, each bootstrap sample is drawn from the original data:

Question 2 of 5

The bootstrap estimate of the standard error is calculated as:

Question 3 of 5

To construct a percentile 95% confidence interval from \( B = 10{,}000 \) bootstrap replicates, which quantiles do you use?

Question 4 of 5

When bootstrapping the correlation between two variables, you should resample:

Question 5 of 5

A researcher uses \( B = 1{,}000 \) bootstrap replicates and obtains \( \widehat{\text{SE}}_{\text{boot}} = 4.2 \). She then increases to \( B = 4{,}000 \). The bootstrap SE estimate itself will: