intervals 0captured p 0missed 0observed rate n/anominal 95%

z* = 1.960 · exact long-run coverage of this interval at n = 50, p = 0.60: 94.1% · np = 30, n(1 - p) = 20 (both at least 10)

no intervals yet · blue = captures p · red diamond = misses

moving p or n re-runs every interval at the new setting

The true proportion is fixed at p = 0.60 and marked by the vertical line. Each sample of 50 produces one interval, drawn as a horizontal segment. The claim behind 95% confidence is about the procedure: in the long run, 95% of those segments should cross the line. Draw one, then draw 200.

Try to: draw at least 200 intervals catch an interval that misses p after 100 draws, land within 1 point of nominal

Confidence interval coverage simulator · free from StatsLearn