Understanding Confidence Intervals

A confidence interval is a range of values derived from sample data that estimates an unknown population parameter with a specified level of certainty. If you calculate a 95% confidence interval for the average weight of widgets produced at a factory, you are asserting that if you repeated your sampling process many times, approximately 95% of the calculated intervals would contain the true population mean.

The interval has two boundaries: a lower bound and an upper bound. The distance from the sample mean to either boundary is the margin of error. A narrower interval suggests more precision; a wider interval reflects greater uncertainty. The width depends on three factors: the confidence level chosen, the variability in your sample, and how many observations you collected.

  • Confidence level: The percentage (commonly 90%, 95%, or 99%) expressing how confident you are that the true parameter lies within the bounds.
  • Sample size: More observations generally tighten the interval.
  • Population variability: Higher standard deviation widens the interval.

Confidence Interval Formulas

The calculation differs depending on whether you are estimating a population mean or a population proportion. Both approaches use a critical z-score that corresponds to your chosen confidence level.

Standard Error = σ ÷ √n

Margin of Error = Standard Error × Z

Lower Bound = Mean − Margin of Error

Upper Bound = Mean + Margin of Error

Confidence Level = (2 × erf(Z)) − 1

For Proportions:

Standard Error = √[p(1 − p) ÷ n]

Lower Bound = p − (Standard Error × Z)

Upper Bound = p + (Standard Error × Z)

  • σ (sigma) — Standard deviation of the sample
  • n — Total number of observations in the sample
  • Z — Critical z-score corresponding to your desired confidence level
  • p — Sample proportion (as a decimal, e.g., 0.45 for 45%)
  • Mean — Average value of the sample

Step-by-Step Calculation

Suppose you survey 250 customers about satisfaction and find an average rating of 7.2 out of 10, with a standard deviation of 1.8. You want a 95% confidence interval.

  1. Identify your inputs: Sample mean = 7.2, standard deviation = 1.8, sample size = 250, confidence level = 95%.
  2. Find the z-score: For 95% confidence, Z = 1.96 (the 97.5th percentile of the standard normal distribution).
  3. Calculate standard error: SE = 1.8 ÷ √250 = 1.8 ÷ 15.81 ≈ 0.114.
  4. Compute margin of error: ME = 0.114 × 1.96 ≈ 0.223.
  5. Set the bounds: Lower = 7.2 − 0.223 = 6.98; Upper = 7.2 + 0.223 = 7.42.

Your 95% confidence interval is 6.98 to 7.42. You can be 95% confident the true population mean satisfaction lies within this range.

Common Pitfalls and Caveats

Avoid these mistakes when calculating and interpreting confidence intervals.

  1. Confusing confidence level with probability — A 95% confidence interval does <em>not</em> mean there is a 95% chance the true parameter is in this particular interval. Rather, the method used to construct the interval is correct 95% of the time across repeated sampling. Once calculated, the parameter either is or is not in your interval—it is not a probability statement about this specific interval.
  2. Using the wrong z-score — Different confidence levels require different z-scores. A 95% confidence level uses Z ≈ 1.96, while 99% confidence uses Z ≈ 2.576. Using the incorrect critical value will produce a misleadingly narrow or wide interval. Always verify your z-score against a standard normal table or calculator.
  3. Ignoring sample size effects — Smaller samples yield wider intervals, not because of lower confidence but because less data means more uncertainty. A sample of 30 individuals will produce a much broader interval than a sample of 1,000, even at the same confidence level. If your interval is too wide to be useful, you likely need more data.
  4. Assuming normality without verification — The formulas presented here assume your sample data is approximately normally distributed. With small samples (n < 30) from skewed populations, the true coverage may differ from your stated confidence level. For small samples, consider using t-scores instead of z-scores, or consult a statistician if your data is highly non-normal.

Frequently Asked Questions

What does a 95% confidence interval actually mean?

A 95% confidence interval represents a range around your sample statistic. If you repeated your study many times, about 95% of the intervals you calculated would capture the true population value. It reflects the reliability of your estimation procedure, not the probability that the true parameter is in any single computed interval. The interval itself contains a fixed (but unknown) parameter—either the parameter is within your bounds or it is not.

How do I choose between 90%, 95%, and 99% confidence levels?

The choice depends on how much certainty you need versus how wide you are willing to accept your interval to be. A 90% interval is narrower but less certain; a 99% interval is wider but more certain. In most scientific and business contexts, 95% is the standard. Higher confidence (99%) is common in quality control and clinical medicine where errors are costly. Lower confidence (90%) might suffice for exploratory analyses or marketing surveys.

Why does a larger sample size create a narrower confidence interval?

Standard error—the denominator in the margin of error formula—depends inversely on the square root of sample size. As n increases, the standard error shrinks, which directly reduces the margin of error and tightens the interval around your estimate. Doubling your sample size does not cut the interval in half; it reduces the width by a factor of √2 ≈ 1.41.

Can I use a confidence interval for proportions the same way as for means?

The approach is conceptually identical, but the formulas differ. For proportions (percentages), you use the sample proportion p and calculate standard error as √[p(1 − p) ÷ n]. For means, you use standard deviation and sample size. Both methods yield lower and upper bounds. Proportions are common in surveys (e.g., "40% of voters support Candidate A"), while means are typical for continuous measurements (e.g., "average test score").

What is the relationship between confidence intervals and hypothesis tests?

Confidence intervals and hypothesis tests are two sides of the same coin. A 95% confidence interval for a population mean excludes a hypothesised value if and only if a two-sided hypothesis test of that value would be rejected at the 5% significance level (α = 0.05). If your interval does not overlap zero (for a difference) or a target value, you have evidence against that value at the corresponding significance level.

How do I report confidence intervals in a report or paper?

Standard notation is: mean ± margin of error, or [lower bound, upper bound]. For example: "The average response time was 2.3 seconds (95% CI: 2.0–2.6 seconds)" or "The proportion of defective units was 0.05 (95% CI: 0.03–0.07)". Always state the confidence level, the parameter being estimated, and preferably the sample size. This transparency allows readers to assess precision and reproducibility.

More statistics calculators (see all)