Free resource

Confidence interval simulator

The cure for the classic misconception. One hundred samples each build an interval; the true mean never moves. Watch roughly 95 of 100 cover it, drop the confidence level and watch the red misses multiply — the word 'confidence' finally meaning something you can count.

μ = 100
Interval covering μInterval missing μTrue mean (fixed)

99 of 100 cover μ · expected 95

The thing to internalise: μ never moves — the INTERVALS are the random objects. “95% confident” is a statement about the procedure (95% of intervals built this way cover μ), not a 95% probability that μ sits inside any single one. Drop the level to 50% and half the rows go red; push n up and every interval narrows with √n while the coverage rate stays put. With σ estimated, small samples produce wildly unequal widths — the price of not knowing σ, and the reason the t distribution has fatter tails.

What the confidence level actually promises

Once a specific interval is computed, μ is either inside it or not — there is no 95% probability left about that fact. The 95% belongs to the recipe: X̄ ± z·σ/√n captures μ in 95% of the samples the recipe is ever applied to, which is exactly what the rows in the simulation act out. This framing is the standard trap question in CS1 and every statistics course above it. The other two things worth watching: interval width falls like 1/√n, so quadrupling the data halves the interval; and with σ estimated the widths themselves become random, wildly so for small n — that extra uncertainty is precisely what the t distribution’s fatter tails are paying for.

The rest of the chain. Interval recipes come from sampling distributions — see the CLT demo — and their critical values from the statistical tables. The testing view of the same geometry is the hypothesis testing visualiser. Memori is a flashcard app built by actuarial students, with a ready-made CS1 set in the shop. Join the beta.

For education only.