Bootstrap
Resampling
Learn to estimate standard errors and confidence intervals by resampling from your data: no parametric assumptions required.
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?
The Bootstrap Workflow
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
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
Example: Bootstrap SE of a Median
Suppose we have 7 observations of reaction times (in ms):
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:
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:
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.
Choosing \( B \): How Many Replicates?
Common Mistakes
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: