Key takeaways
- Every interval needs three inputs: an estimate, a standard error, and a critical value.
- Margin of error is half the width. It shrinks with the square root of the sample size, so quadrupling n halves it.
- 95% describes the procedure, not the parameter. After the data are in, the interval either covers the truth or it does not.
- Wider intervals mean less precision, not less confidence. A 99% interval is wider than a 95% interval by design.
- Overlapping intervals are not a test. Compare the interval for the difference directly.
Why a point estimate is not enough
A sample mean is a single number, but a different sample would have produced a different number. That sampling variability is what a confidence interval quantifies. Instead of saying “the average is 72,” you say “the average is 72, and the data are compatible with values from about 68.7 to 75.3.”
The interval is built from the sampling distribution of the estimate. For a mean, that distribution is centered on the population mean and has standard deviation σ/√n, called the standard error. The central limit theorem makes the distribution approximately normal for large samples, which is why the same recipe works for many different statistics.
The general form of a confidence interval
Almost every interval has the same structure:
estimate ± critical value × standard error
For a mean with a known population standard deviation, the critical value is z* from the normal distribution: 1.645 for 90%, 1.960 for 95%, and 2.576 for 99%. When σ is estimated from the sample, use t* with n − 1 degrees of freedom, which is slightly larger to account for estimating the spread. The interval is:
x̄ ± t* × s/√n
The t distribution converges to the normal as n grows, so the two recipes agree closely beyond about 30 observations.
Worked example: a mean
A sample of 25 students has a mean score of 72 and a standard deviation of 8. The standard error is 8 ÷ √25 = 1.6. With 24 degrees of freedom, t* = 2.064 for 95% confidence. The margin of error is 2.064 × 1.6 = 3.30, so the interval is 72 ± 3.30, or (68.70, 75.30).
If the same mean and standard deviation came from 100 students, the standard error would be 0.8 and t* would be about 1.984. The margin of error would fall to 1.59, giving (70.41, 73.59). The estimate did not change; the precision did. This is the sense in which a larger sample buys a narrower interval rather than a different answer.
Margin of error and sample size
The margin of error is the half-width of the interval, and for a mean it equals z*σ/√n. Because n sits under a square root, reducing the margin by half requires four times the sample. To go from ±4 to ±2 at the same confidence level, you need four times as many observations.
The relationship also means that the last few points of precision are expensive. A poll with a ±3 point margin needs about 1,067 respondents; a ±1 point margin needs about 9,604. That is why national surveys quote margins around 2 to 3 points and why subgroup estimates, which use smaller samples, carry much wider margins.
What “95% confidence” actually means
The confidence level describes the long-run performance of the method. If you drew many samples and built a 95% interval from each one, about 95% of those intervals would contain the true parameter. The procedure is reliable; any single interval either includes the truth or misses it, and you never know which.
It is tempting to say “there is a 95% chance the true mean is between 68.7 and 75.3.” In the frequentist framework, the parameter is fixed and the interval is random, so that probability statement does not apply after the data are observed. A Bayesian credible interval can support a probability statement, but only with a prior and a different interpretation.
What changes the width
Three things move the interval. A higher confidence level widens it: the 99% interval for the student example uses t* = 2.797 and runs from 67.52 to 76.48, noticeably wider than the 95% interval. More variability widens it, because a noisy measurement carries less information. A larger sample narrows it, because averaging more observations reduces the standard error.
Design choices matter too. Clustered samples, stratified samples, and survey weights change the effective standard error, often substantially. A cluster survey can have a design effect of 2 or more, which doubles the variance and widens the interval by roughly 40%. Software that ignores the design will report an interval that is too narrow and too confident.
Confidence intervals for proportions
For a proportion, the standard error is √(p̂(1 − p̂)/n), and the interval is:
p̂ ± z* × √(p̂(1 − p̂)/n)
With 54 successes in 100 trials, p̂ = 0.54 and the standard error is √(0.54 × 0.46/100) = 0.0498. The 95% interval is 0.54 ± 1.96 × 0.0498, or 0.54 ± 0.098, giving (0.442, 0.638). The interval is widest near p = 0.5 and narrows toward 0 and 1.
The Wald formula misbehaves when p̂ is close to 0 or 1 or when n is small: it can produce limits below 0 or above 1 and can seriously understate uncertainty. The Wilson score interval and the Clopper–Pearson exact interval are better choices in those cases, and most statistical software offers them.
Confidence intervals and hypothesis tests
A 95% confidence interval and a two-sided test at α = 0.05 are two views of the same calculation. If the interval for a difference excludes zero, the test rejects the null of no difference at the 5% level. If the interval includes zero, the test does not reject. The interval is usually more informative because it shows which nonzero effects remain plausible.
Do not test a difference by checking whether two separate intervals overlap. Overlap is neither necessary nor sufficient for a nonsignificant difference, because the standard error of the difference depends on the covariance between the estimates. Build the interval for the difference directly, or use the appropriate two-sample test.
Common mistakes
- Saying “95% probability the parameter is in this interval” after the data are observed.
- Believing a 99% interval is “more accurate” rather than wider and less precise.
- Treating non-overlapping intervals as proof of a significant difference, or overlap as proof of no difference.
- Using z* when the standard deviation is estimated from a small sample instead of t*.
- Ignoring survey weights, clustering, or design effects when computing the standard error.
- Reporting an interval without saying which parameter and which confidence level it refers to.
Practical caveats
A confidence interval covers sampling error, not bias. If the sample excludes people who did not respond, or if the measurement instrument is systematically wrong, the interval can be narrow and still miss the truth. Nonresponse and coverage problems require weighting, follow-up, or a different design; no amount of arithmetic fixes them.
The interval is also model-dependent. It assumes the observations are independent and that the estimate’s sampling distribution is approximately normal, or that the sample is large enough for the central limit theorem to help. For heavily skewed data, small samples, or complex designs, use a bootstrap or a design-based method and say so.
Frequently asked questions
What exactly does 95% confidence mean?
It means the method produces intervals that contain the true parameter in 95% of repeated samples. It is a property of the procedure, not a probability assigned to one observed interval.
Is a wider interval better?
No. Wider means less precision. A wider interval is the honest consequence of less data, more variability, or a higher confidence level; it is not a better estimate.
What is the margin of error?
It is half the width of the confidence interval. For a mean it equals the critical value times the standard error, and it shrinks in proportion to 1/√n.
Can a 95% confidence interval include values that are impossible?
Yes, especially with small samples or proportions near 0 and 1. The normal approximation can produce limits outside the parameter’s range; exact or score methods avoid this.
Why do two surveys with the same sample size have different margins of error?
Because margins depend on the estimated variability and the design, not just n. A question with responses split 50/50 has a larger margin than one split 90/10, and clustering or weighting can increase it further.
What is a 95% credible interval?
It is the Bayesian counterpart: an interval that contains the parameter with 95% posterior probability, given a prior and the data. It answers a different question and should not be labeled a confidence interval.
Further reading