Skip to content
Monte

Confidence intervals and sample size

  1. Read it, not yet
  2. Practice it, not yet
  3. Master it, not yet

A confidence interval is your estimate plus or minus a margin: estimate ± critical value × standard error. Use z when σ is known, t when you only have s.

Why it matters

A confidence interval is your estimate with honest error bars.

A number without a margin is a guess dressed as fact. The interval says if a difference is real or noise.

  • Polls48% plus or minus 3 means the race is open.
  • ProductA 4.1% conversion rate over 5,000 visits is really 3.6% to 4.7%.
  • SurveysSample size math says how many people to ask before you trust the answer.

Tennis example

You charted 20 matches: average first serve 115 mph, s = 6. 95% CI: 115 ± 2.093 × 6/√20 = 115 ± 2.8, so 112.2 to 117.8. For ±1 mph at 95%, n = (1.96 × 6 / 1)² ≈ 139 matches.

100 confidence intervals: how many catch μ = 50?

3040506070

0 of 100 intervals caught μ = 50, with n = 25 at 95% (expect about 95). Misses are red. Bigger n makes the intervals shorter; higher confidence makes them longer.

Check yourself

  1. General formula?

  2. 25 bottles, x bar = 502.4 ml, σ = 5 known: 95% CI?

  3. 16 trainees, x bar = 72.5, s = 12: 95% CI?

The trap

The mistake people make most on this one.

A 95% CI is not a 95% chance that μ is inside. μ is fixed; the interval moves. For sample size, width is 2E: width 0.06 means E = 0.03.

Formulas

6 formulas and a way to remember them.
σ known
x bar ± z(α/2) · σ / √n
σ unknown
x bar ± t(α/2, n − 1) · s / √n
Proportion
p hat ± z(α/2) · √[p hat(1 − p hat) / n]
Sample size for μ
n = (zσ / E)²
Sample size for p
n = z² p(1 − p) / E², using p = 0.5 with no prior estimate
z values
1.645 (90%), 1.96 (95%), 2.576 (99%). Always round n up.
Remember it
A confidence interval is a margin of error around your guess. More confidence widens it; more data tightens it.

Watch and go deeper

3 free videos and pages.