The bootstrap estimates uncertainty by resampling from the observed data.
Given data :
- Sample observations with replacement from the dataset
- Compute the statistic of interest
- Repeat many times
- Use the empirical distribution of bootstrap statistics to estimate uncertainty
This approximates the sampling distribution of the statistic.
Why sample with replacement? it mimics drawing new datasets from the empirical distribution.
Uses:
- Standard errors
- Confidence intervals
- Comparing models
- Estimating uncertainty for statistics without simple formulas
Bootstrap confidence interval: take percentiles of the bootstrap distribution, such as the 2.5th and 97.5th percentiles for a 95% interval.
Limitations:
- Assumes the sample represents the population
- Can fail with very small samples
- Can fail for extreme-value statistics
- Must preserve dependence structure, such as paired predictions or time series blocks
In ML: to compare two models on the same test set, bootstrap the per-example metric differences. This keeps the paired structure intact.
See also: Sampling Distributions, Confidence Intervals, Evaluation Metrics