Confidence Intervals
Visualize how confidence intervals capture the true population mean.
Free theory articleVisualize how confidence intervals capture the true population mean.
Concept & interpretation
A sample mean changes when we draw another sample. A confidence interval attaches a margin to that estimate. The population mean is fixed; the intervals vary. A 95% procedure captures the mean in approximately 95% of repeated samples under its assumptions. It does not assign a 95% posterior probability to the mean inside one already observed interval.
Compare method width with observed coverage
Open the Confidence Intervals interactive experiment. Its three confidence buttons, two sliders, and Draw New Samples button are the complete experiment controls. On a small screen, scroll the controls panel to its statistics and the plot panel to see the entire chart. The legend occupies separate space above the data rows.
- Select 95% and set Sample Size (n) to 25. Read Margin ± 0.392000 and Full width 0.784000; inspect green and rose rows.
- Set Sample Size (n) to 100. Full width becomes 0.392000. This setting change generates a new batch, so sample centers and captured counts may also change.
- Select 99%. At n = 100 the width becomes 0.515200. The new batch need not have more captured intervals than the previous batch, despite the higher nominal confidence.
- Select 95% and set Number of Samples to 10. Coverage step becomes 10 percentage points. Captured plus Missed must be 10; exactly 95% observed coverage is impossible with ten intervals.
- Press Draw New Samples. Batch advances by one, while the selected settings and theoretical margin stay fixed. Read the new counts without assuming a particular result.
- Set Number of Samples to 200. Coverage step becomes 0.5 percentage points. More repetitions reveal coverage in finer increments, but do not guarantee the target percentage.