On this page
You time a pendulum eight times in the school lab and get eight slightly different numbers. How far could their median be from the true value? For the median there is no simple school formula, so the bootstrap answers by computation instead of algebra.
What is bootstrap resampling?
The bootstrap, introduced in Efron's 1979 paper in The Annals of Statistics, estimates the sampling distribution of a statistic using only the data you observed.
In the words of Joel Horowitz's review of bootstrap methods, it amounts to treating the data as if they were the population. You cannot go back and collect a thousand new samples, so you draw new samples from the one you have:
Take your n measurements.
Draw n values from them at random, with replacement, so some values repeat and some are left out.
Compute your statistic (here, the median) for that resample.
Repeat thousands of times.
The spread of those recomputed values estimates the uncertainty. The middle 95% of them, from the 2.5th to the 97.5th percentile, is the percentile confidence interval.
Why with replacement? Without it, every resample would be your original data reshuffled, with the same median.
How do you bootstrap the median of 8 measurements?
The median is a fitting test case: the variance of the sample median is one of the worked examples in Efron's original paper. Here are 8 illustrative timings of one pendulum swing, in seconds:
1.98, 2.03, 2.01, 1.96, 2.05, 2.00, 2.12, 1.99
Sorted, they read 1.96, 1.98, 1.99, 2.00, 2.01, 2.03, 2.05, 2.12. With an even count, the median is the average of the 4th and 5th values: (2.00 + 2.01) / 2 = 2.005 s. If that rule is rusty, our guide to mean, median and mode formulas walks through it.
One resample might draw 2.03, 1.96, 2.03, 2.12, 1.99, 2.00, 2.03, 1.98. Sorted: 1.96, 1.98, 1.99, 2.00, 2.03, 2.03, 2.03, 2.12. Its median is (2.00 + 2.03) / 2 = 2.015 s.
A computer usually draws thousands of resamples at random. With only 8 values we counted every one: there are 8^8 = 16,777,216 equally likely ordered resamples. The exact results:
The most common bootstrap median is 2.00 s, in 14.9% of resamples.
The standard deviation of the bootstrap medians, the bootstrap standard error, is about 0.018 s.
Only 0.9% of resamples give a median below 1.98 s, and 1.1% give one above 2.05 s.
So the 95% percentile interval for the median is 1.98 s to 2.05 s. Notice it is lopsided: 0.025 s below the median and 0.045 s above. The readings above the median (2.03, 2.05, 2.12) are more spread out than those below, so the upper end reaches further; the percentile interval follows the data instead of forcing a symmetric plus-or-minus.
Why does the bootstrap work?
Your sample is the best picture you have of the population, so drawing from it imitates drawing fresh samples from the world. Bickel and Freedman (1981) showed it is asymptotically valid in a large number of situations, including t-statistics and quantile processes, which cover sample quantiles such as the median. Horowitz's review adds that under mild regularity conditions it is at least as accurate as first-order asymptotic theory, the usual formula-based approximations.
The formula route still matters: our explainer on the one-sample t-test in Class 12 Applied Maths shows the classical way to put a confidence interval on a mean. The bootstrap is what you reach for when no such formula is handy.
One honest limit: with 8 points the bootstrap picture is coarse, so treat the interval as a rough guide.
If ideas like sampling distribution or percentile feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson and its place in the map.
When does the bootstrap fail?
The same Bickel and Freedman paper also gives counterexamples where the approximation does not succeed. Horowitz warns that the bootstrap can be inaccurate and misleading if used incorrectly, and names inference about the maximum or minimum of random variables as one example.
Take the maximum of our timings, 2.12 s. No resample can ever exceed it, and a resample's maximum equals 2.12 s whenever that value is drawn at least once: probability 1 - (7/8)^8, about 65.6%. For n distinct values this is 1 - (1 - 1/n)^n, which never drops below 1 - 1/e, about 63.2%, however large n gets, as notes on bootstrap counterexamples hosted at the University of Chicago show. A real sample maximum varies from sample to sample and sits below the true upper limit, but the bootstrap piles most of its weight on one value and never looks above it.
Before you bootstrap, check:
Your readings are independent of each other, not a sequence where each depends on the last.
Your statistic depends on the middle of the data (mean, median, a proportion), not on one extreme value.
Each resample has the same size as your original sample.
If you are preparing the exam side of this topic, our plan for probability and statistics in JEE Advanced covers what is actually tested.



