How to construct a confidence interval
- Compute the point estimate (x̄ or p̂).
- Find the critical value for your confidence level: z* (1.645, 1.960, 2.576 for 90/95/99%) or t* with n − 1 degrees of freedom.
- Compute the standard error.
- Margin of error = critical value × SE.
- Interval = estimate ± margin of error.
Interpreting it correctly
Say: “We are 95% confident the true mean is between A and B.” The 95% describes the method: if you repeated the study many times, about 95% of the intervals would contain the true value. It does not mean there is a 95% chance this particular interval contains it (the true value is fixed; the interval is what varies). The simulation above shows this happening.
Conditions: a random sample, independence (sample under 10% of the population), and a roughly normal sampling distribution: either normal data, n ≥ 30, or for proportions at least 10 successes and 10 failures.
Frequently asked questions
When do I use t instead of z?
For a mean, use t whenever you estimate σ from the sample, which is nearly always. Use z only when the population σ is genuinely known. For proportions, use z.
How can I make the interval narrower?
Increase the sample size (the width shrinks with √n) or accept a lower confidence level. The sample size calculator tells you the n needed for a target margin of error.