Why the Percentile CI WorksStatLens

A bootstrap distribution has roughly the shape and spread of the true sampling distribution, but it is shifted to centre on your sample mean instead of on μ. If that shift were exact, the middle 95% of the bootstrap distribution would capture μ precisely when x was a typical draw. Build both distributions on one axis and see how close it gets.

Samples

Population each sample highlights the dots it drew

Distribution of means one dot per sample mean — the true sampling distribution

True sampling distribution (solid) Bootstrap distribution (dashed, hatched)

Draw samples to build the true sampling distribution. Once it has taken shape, switch to Stage 2 to bootstrap from a single sample.

Why the Percentile CI Works

The percentile method reads a confidence interval straight off the bootstrap distribution — the middle 95%. This page shows why that captures μ about 95% of the time, by building the true sampling distribution and a bootstrap distribution on the same axis.

The argument in one line

If the bootstrap distribution were exactly the sampling distribution shifted from μ over to x — same shape, same spread, new centre — then the middle 95% of the bootstrap distribution would contain μ exactly when x itself landed in the middle 95% of the sampling distribution, which happens 95% of the time. That is the whole justification. The shift is never exact, so the page lets you check both halves of it every frame and see where it frays.

Stage 1 — the true sampling distribution

The top panel is a population of about 200 values, one circle each. Each draw takes a sample of n, highlights the circles it drew (darker where a circle was drawn more than once), and drops that sample's x into the blue distribution below. Use +1 to watch one at a time, then +1000 to fill it in.

The 200 circles show the population's shape — they aren't a roster of 200 individuals. Samples are drawn as if from a much larger population, which is why a circle occasionally comes up twice even here (about one sample in five at n = 10). Keeping it that way means the sampling distribution's spread is exactly σ/√n, with no finite-population correction to explain away — and it keeps the comparison with the bootstrap honest at every n. In Stage 2 repeats stop being occasional and become constant, because there the resample is drawing n values from only n.

Stage 2 — the bootstrap

One sample is frozen, highlighted in red inside the population and blown up in the Original sample inset. Every resample now comes from those n values only, drawn with replacement — which is why circles go dark: at n = 10 a resample typically uses some values three or four times and skips others entirely. Each x* lands in the red distribution, overlaid on the blue one.

The slider

Original sample mean (x) picks a different frozen sample by its mean. Sweeping it slides the red distribution across the blue one. Watch the two lines in the verdict flip together as x crosses the edge of the blue band — that agreement is the percentile method's justification.

Where it breaks — and why that matters

Reading the lower panel

Keyboard shortcuts

1
+1
2
+10
3
+100
4
+1000
0
Reset
?
Show this help
Esc
Close this dialog