Confidence level: what does 95% really mean?
Randomly select 40 male students and measure their heights. Use the sample mean height to estimate the true mean height μ of all male students at the university. Compare z and t intervals in a teaching model with independent random sampling from a normal population.
Simulation settings
Try it
The simulation draws independent observations from a normal distribution with mean μ and standard deviation σ, rather than sampling from an actual university roster. σ generates the simulated data; in the two “unknown σ” modes, the interval calculation uses only the sample standard deviation s. Changing settings restarts the simulation. Space = draw 1 sample.
Confidence intervals from repeated samples
- Interval covers μ
- Interval misses μ
- Dashed line = true mean height μ
Sampling distribution of the sample mean
- Inside the shaded region (interval covers μ)
- Outside the shaded region (interval misses μ)
Repeated-sampling results
- Total samples drawn
- 0(students per sample: 40)
- Covers μ
- 0Number of intervals
- Misses μ
- 0Number of intervals
- Coverage proportion
- —Theoretical: 95%
Interval width: 3.72 cm for every interval
Most recent sample
No sample drawn yet. Click “Draw 1 sample” to start.
Confidence interval formula and calculation for this sample
Confidence interval formula for the current estimation method
Known population standard deviation σ: Use the standard normal critical value z = 1.96. Confidence level 95%; standard error (the standard deviation of the statistic's sampling distribution) = σ/√n; margin of error Δ (the interval's half-width) = critical value × standard error. Every interval has the same width in this teaching model.
After sampling, the most recent substitution calculation appears here
Before sampling
Under this normal-sampling model, this procedure covers the fixed true value μ with probability 95%.
After sampling
μ is fixed, and the endpoints have been determined. The interval either covers it or misses it; the classical confidence level does not assign a probability to this fixed interval.
After many repetitions
The cumulative coverage proportion approaches 95% in the long run. It fluctuates with finite sampling; exactly 95 of every 100 intervals need not cover the true value.
References and model conventions
This lesson simulates independent samples from one normal population. Known-σ z intervals use the original lesson's rounded critical values, so theoretical coverage is approximately the nominal level; unknown-σ t intervals attain the nominal level under this model. Substituting s for σ while retaining a z critical value is an approximation that does not guarantee nominal coverage in small samples. Finite simulation runs also fluctuate randomly.
- NIST: What are confidence intervals? — Repeated-sampling interpretation and the normal-mean interval with known population standard deviation.
- NIST: Confidence Limits for the Mean — Intervals using the sample standard deviation and a t critical value. NIST's sample size N corresponds to n here.