Confidence Intervals: Capturing the True Mean

April 12, 2026

Problem

Take 50 random samples of size 30 from a population. Show how ~95% of 95% confidence intervals capture the true mean.

Explanation

What does "95% confidence" actually mean?

A 95% confidence interval means: if you repeated the experiment many times, about 95% of the computed intervals would contain the true mean. It does NOT mean "there's a 95% chance the true mean is in this particular interval" — the true mean is fixed; the intervals are random.

The formula

CI=xˉ±zsn\text{CI} = \bar{x} \pm z^* \cdot \frac{s}{\sqrt{n}}

where xˉ\bar{x} is the sample mean, ss is the sample standard deviation, nn is the sample size, and z=1.96z^* = 1.96 for 95% confidence.

Step-by-step example

Given: A sample of n=30n = 30 students has xˉ=75\bar{x} = 75, s=10s = 10.

Step 1 — Compute the standard error: SE=s/n=10/30=1.826SE = s/\sqrt{n} = 10/\sqrt{30} = 1.826.

Step 2 — Compute the margin of error: ME=1.96×1.826=3.58ME = 1.96 \times 1.826 = 3.58.

Step 3 — Build the interval: 75±3.58=(71.42,78.58)75 \pm 3.58 = (71.42, 78.58).

Interpretation: We are 95% confident that the true population mean is between 71.42 and 78.58.

The simulation insight

Take 50 random samples and compute a 95% CI from each. About 47-48 will contain the true mean; 2-3 will miss. This is the "95%" in action — not every interval captures the truth, but 95% do over the long run.

Try it in the visualization

50 horizontal CI bars are drawn. About 95% (green) capture the true mean line; a few (red) miss it. Adjust the confidence level and sample size to see how the intervals change.

CI=xˉ±zsn\text{CI} = \bar{x} \pm z^{*} \cdot \dfrac{s}{\sqrt{n}}, where z=1.96z^{*} = 1.96 for 95%.

Interactive Visualization

Parameters

50.00
30.00
95%
50.00
10.00
1.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Confidence Intervals: Capturing the True Mean | MathSpin