Confidence Interval CoverageStatLens

Draw many samples from a known population and build a confidence interval from each one. See how many capture the true parameter — that's what "95% confidence" means.

Population: Normal(μ = 50, σ = 10)

Samples

Click a button to draw samples and build confidence intervals.

Confidence Interval Coverage

Draw many samples from a population whose true mean you can see, build a confidence interval from each sample, and count how often the interval captures that true mean. That long-run capture rate is what "95% confidence" means.

Predict first

Before any intervals appear, a prompt asks how many of the next batch you think will miss the true mean. Enter a guess and choose Lock & draw to commit and compare against what actually happens, or Skip. Predicting first makes the result stick.

Set up the population

Draw samples

Use +1 / +10 / +25 / +100 to draw that many samples; each adds an interval to the chart. Intervals that miss the true mean are marked. The running coverage rate below settles toward the confidence level as you draw more. Reset clears them.

Compare the four interval methods

The CI method selector builds every interval a different way from the same samples, so you can measure — not assert — which one actually delivers its advertised 95%:

Add ?method=t, ?method=bootstrap, ?method=se, or ?method=bca to link straight to one.

What you will find, on a right-skewed population at nominal 95% (measured here, 1200 intervals per cell):

ntpercentile±2·SEBCa
888.4%83.7%85.3%85.8%
1591.9%88.9%90.3%90.1%
2592.4%90.3%92.0%92.3%
5092.9%92.5%93.9%93.8%

Three things worth saying out loud. Every method under-covers here — the gap to 95% is larger than any gap between methods. BCa does help, but by a point or two, not by closing the gap; it estimates its correction from the same short sample. And the t-interval holds up best at very small n, which is a genuine result worth showing students rather than hiding. On a Normal population, or once n is large, the four converge.

Because bootstrap bounds come from the replicate distribution rather than a stored standard error, changing the confidence level on a bootstrap method redraws the run instead of re-widening the existing intervals.

Plausibility shape (cat's-eye)

Tick Show plausibility shape (cat's-eye), then hover an interval. The bulge shows that values near the sample mean are more plausible than values near the interval's ends — the interval is not a band of equally likely values.

Keyboard shortcuts

1
+1 sample
2
+10 samples
3
+25 samples
4
+100 samples
0
Reset
Space
Play / Pause
?
Show this help
Esc
Close this dialog

New to this tool? Walk through it step by step.

Open guided walkthrough ↗