Bootstrap
Resampling
Learn how to estimate the variability of a statistic by resampling from your own data: no formulas for standard error required.
What Is the Bootstrap?
Imagine you collected a sample of \( n \) observations and computed a statistic: a mean, a median, a correlation. You want to know: how much would that statistic vary if you could repeat the whole study?
The bootstrap answers this by resampling with replacement from your original sample, over and over, to build an empirical picture of sampling variability.
Why Do We Need the Bootstrap?
Sampling With Replacement
The Bootstrap Algorithm
The Bootstrap Distribution
Bootstrap Standard Error
The bootstrap standard error is simply the standard deviation of the \( B \) bootstrap statistics:
where \( \overline{\hat{\theta}^*} = \frac{1}{B}\sum_{b=1}^{B}\hat{\theta}^*_b \) is the mean of the bootstrap statistics. This is exactly the sample standard deviation formula applied to the list of bootstrap replicates.
Bootstrap Confidence Interval
The simplest bootstrap confidence interval is the percentile method: use the quantiles of the bootstrap distribution directly.
Bootstrap vs. Traditional Inference
| Bootstrap | Traditional | |
|---|---|---|
| Assumptions | Minimal: sample is representative | Often requires normality or large \( n \) |
| SE Formula | Computed from resamples | Derived analytically (e.g., \( s/\sqrt{n} \)) |
| Applicability | Any statistic | Limited to known distributions |
| Computation | Requires many iterations | Usually one formula |
| Accuracy | Improves with more resamples | Improves with larger \( n \) |
How to Apply the Bootstrap
Example 1: Bootstrap SE of the Mean
A sample of \( n = 5 \) test scores: {72, 85, 90, 68, 79}. The sample mean is \( \bar{x} = 78.8 \). We draw \( B = 4 \) bootstrap samples (just to illustrate):
Example 2: Bootstrap CI for the Median
A researcher measures reaction times (ms) for \( n = 8 \) subjects: {230, 245, 260, 275, 310, 340, 390, 520}. The sample median is 292.5 ms.
She generates \( B = 10{,}000 \) bootstrap medians. The sorted bootstrap medians give:
Example 3: Bootstrap for Correlation
We have \( n = 15 \) paired observations of study hours and exam score. The sample correlation is \( r = 0.72 \).
When Does It Work (and Not)?
Common Mistakes
Bootstrap Summary
| Concept | Details |
|---|---|
| Input | Original sample of \( n \) observations |
| Resampling | Draw \( n \) values with replacement |
| Replicates | \( B \geq 1{,}000 \) (more for CIs) |
| Bootstrap SE | SD of the \( B \) bootstrap statistics |
| Percentile CI | Quantiles at \( \alpha/2 \) and \( 1-\alpha/2 \) |
| Key Assumption | Sample is representative of the population |
Question 1 of 5
In bootstrap resampling, each bootstrap sample is drawn from the original data with replacement. What happens if you accidentally sample without replacement?
Question 2 of 5
You have a sample of \( n = 20 \) and generate \( B = 5{,}000 \) bootstrap resamples. How large is each bootstrap sample?
Question 3 of 5
The bootstrap standard error is computed as the _____ of the \( B \) bootstrap statistics.
Question 4 of 5
To construct a 95% bootstrap percentile confidence interval, you take the _____ percentiles of the bootstrap distribution.
Question 5 of 5
A major advantage of the bootstrap over traditional methods is that it: