A worked example
A sample mean of 100 with a standard deviation of 15 and 30 observations gives a 95% confidence interval of about 94.6 to 105.4 — a margin of error of roughly ±5.37.
Frequently asked questions
What does a confidence interval actually mean?
It's a range built from your sample that's likely to contain the true population value. A 95% confidence interval means that if you repeated the sampling process many times, about 95% of the intervals you'd construct would contain the true mean — it doesn't mean there's a 95% chance this particular interval contains it.
Why does a larger sample size shrink the interval?
Larger samples give a more precise estimate of the population mean, which directly reduces the margin of error — the interval narrows as the sample size grows, all else equal.
Why does a higher confidence level widen the interval?
Demanding more confidence that the interval contains the true value requires casting a wider net — there's a direct trade-off between how confident you want to be and how precise (narrow) the interval can be.