A single sample mean is a point estimate — one number, standing in for an unknown truth. But it's never exactly right. A confidence interval upgrades that single number into a range, paired with a stated level of confidence, giving an honest picture of how much uncertainty actually surrounds the estimate. "The average is 74" is a claim with no sense of its own precision; "we're 95% confident the true average is between 71 and 77" tells you both the estimate and how much to trust it.
- What "95% confidence" actually means — and the common misinterpretation to avoid
- How to construct a confidence interval for a mean, step by step
- Why larger samples produce narrower intervals, and by how much
- When to use a z-interval vs. a t-interval
The Structure of Every Confidence Interval
Regardless of what's being estimated, every confidence interval has the same basic shape:
For a population mean, using the Central Limit Theorem's guarantee about the shape of the sampling distribution, this becomes:
Here x̄ is the sample mean, σ/√n is the standard error, and z(α/2) is the critical value from the standard normal distribution corresponding to your chosen confidence level — 1.96 for 95% confidence, 1.645 for 90%, and 2.576 for 99%.
What "95% Confidence" Actually Means
This is the single most commonly misinterpreted idea in introductory statistics, so it's worth stating precisely. A 95% confidence interval does not mean "there's a 95% probability the true population mean falls in this specific interval." Once calculated, a specific interval either does or doesn't contain the true value — there's no probability left to talk about, only certainty we don't have access to.
What it actually means: if you repeated this same sampling and interval-construction process many times, about 95% of the resulting intervals would contain the true population parameter. The 95% describes the reliability of the method, not the probability attached to any one specific interval you happen to have calculated.
Worked Example
Problem: A sample of 50 delivery times has a mean of 32 minutes and a known population standard deviation of 7 minutes. Construct a 95% confidence interval for the true mean delivery time.
Standard error: SE = σ/√n = 7/√50 ≈ 0.99
Margin of error: 1.96 × 0.99 ≈ 1.94
Confidence interval: 32 ± 1.94 = (30.06, 33.94) minutes
We're 95% confident the true mean delivery time across all deliveries falls between about 30.1 and 33.9 minutes — not that this specific range definitely contains it, but that this method, applied repeatedly, would capture the true value about 95% of the time.
Z-Interval vs. T-Interval: Which Formula to Use
The formula above uses z, which requires knowing the true population standard deviation σ — something rarely known in practice. When σ is unknown (the overwhelming majority of real cases) and must be estimated from the sample (using s, the sample standard deviation), the extra uncertainty from that estimation needs to be accounted for, which is done by using the t-distribution instead of the normal distribution:
The t-distribution has heavier tails than the normal distribution, producing a wider (more honest) interval for the same confidence level, especially with small samples. As sample size grows, the t-distribution converges toward the normal distribution, and the difference between the two formulas shrinks toward negligible.
What Actually Makes an Interval Narrower
Three factors control the width of a confidence interval, and it's worth understanding each one's trade-off:
- Larger sample size (n): narrows the interval, because standard error shrinks as √n grows. But the relationship is a square root, not linear — quadrupling n only halves the margin of error, which is why survey sample sizes hit diminishing returns quickly.
- Lower confidence level: narrows the interval (a 90% interval is narrower than a 95% interval for the same data), but at the cost of being less likely to capture the true value. There's a genuine trade-off here, not a free improvement.
- Smaller population variability (σ or s): narrows the interval directly — less inherent noise in the data means less uncertainty in the estimate, but this typically isn't something you can control; it's a property of what you're measuring.
Confidence Intervals for a Proportion
The same logic extends to estimating a population proportion (like the percentage of voters supporting a candidate), using a slightly different standard error formula based on the sample proportion p̂:
This is exactly the calculation behind the "margin of error" reported alongside every political poll — a poll of n = 1,000 with p̂ = 0.52 supporting a candidate typically produces a margin of error around ±3 percentage points at 95% confidence, meaning the underlying true support plausibly lies anywhere in roughly a 6-point range.
The formula above (the "Wald interval") performs poorly when p̂ is close to 0 or 1, or when the sample is small — it can even produce a nonsensical interval extending below 0% or above 100%. The Wilson score interval is a more robust alternative used by many statistical software packages by default, and is generally the better choice outside of introductory coursework.
Worked Example: A Confidence Interval for a Proportion
Problem: In a survey of 400 randomly selected customers, 260 say they're satisfied with a product. Construct a 95% confidence interval for the true proportion of satisfied customers.
Sample proportion: p̂ = 260/400 = 0.65
Standard error: √[0.65(1−0.65)/400] = √[0.2275/400] = √0.000569 ≈ 0.0239
Margin of error: 1.96 × 0.0239 ≈ 0.0468
Confidence interval: 0.65 ± 0.047 = (0.603, 0.697), or roughly 60.3% to 69.7%
The company can report, with 95% confidence, that the true customer satisfaction rate lies somewhere between about 60% and 70% — a genuinely useful range, but one that also honestly reflects that a single survey of 400 people can't pin the true figure down to the nearest percentage point.
Working Backward: Choosing a Sample Size in Advance
The confidence interval formula rearranges to answer a different, very practical question: how large a sample do I need to achieve a target margin of error? Rearranging the mean formula for the required sample size E = z·σ/√n gives:
If a researcher wants a margin of error no larger than E = 2 minutes on the delivery-time example above, with σ = 7 and 95% confidence (z = 1.96): n = (1.96 × 7 / 2)² = (6.86)² ≈ 47.1, rounded up to 48 — you'd need a sample of at least 48 deliveries to guarantee that precision at 95% confidence. This calculation is exactly what should happen before data collection begins, not after — deciding your required precision in advance, rather than collecting a convenient sample size and hoping the resulting interval happens to be narrow enough.
Common Mistakes
Interpreting the interval as a probability statement about the true value. Covered above, but worth repeating because it's the single most common error — the confidence is in the method, not in any one calculated interval.
Using a z-interval when σ is actually unknown. If you estimated σ from your sample (almost always the case), you should generally be using a t-interval, not a z-interval — this is a common shortcut students take that understates the true uncertainty.
Assuming a narrower interval is always "better." A narrower interval sounds more precise, but if it comes from a lower confidence level or an unrepresentative sample, it can be narrower and less trustworthy at the same time — width and reliability are separate properties.
Clinical trials: a drug's effect is typically reported as a confidence interval for the difference in outcomes between treatment and control groups, not just a single "the drug improved outcomes by X%" figure — regulators and clinicians need to see the plausible range, including whether it comes close to "no effect," before drawing conclusions.
Why is 95% the most common confidence level?
Can a confidence interval be one-sided?
What happens to the confidence interval if the sample isn't random?
How is a confidence interval related to a hypothesis test?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals →