A confidence interval is a range of values that's likely to contain the true population parameter (mean, proportion, difference between groups, etc.) based on a sample — and understanding what confidence intervals actually mean is one of the most commonly misunderstood concepts in statistics. A 95% confidence interval doesn't mean there's a 95% chance the true value is inside the interval (a common misstatement); it means that if you repeated the sampling process many times, about 95% of the resulting intervals would contain the true parameter. The sections below cover what confidence intervals quantify and why they're essential for honest scientific reporting, how sample size and confidence level trade off against interval width, and the specific formulas for mean and proportion confidence intervals with their assumptions.

What Confidence Intervals Actually Mean

A confidence interval quantifies the uncertainty in an estimate derived from a sample. When we compute a 95% CI of [48.2, 51.8] for a mean, the technical interpretation is this: the procedure used to generate this interval has the property that, across many hypothetical repeated samples, 95% of the intervals produced by this procedure will contain the true population mean. The interval itself is a random variable — it shifts as the sample changes — while the true population mean is fixed and unknown.

This distinction matters because the common phrase "there's a 95% probability the true mean is in this interval" is technically incorrect in classical (frequentist) statistics — once you've computed a specific interval, either it contains the true mean (probability 1) or it doesn't (probability 0), and we don't know which. The 95% applies to the long-run behavior of the procedure, not to any single interval. Bayesian credible intervals, a different mathematical construct, do support the intuitive "probability in the interval" interpretation but require specifying a prior distribution. For practical work, frequentist CIs are adequate and widely understood despite the subtle interpretation issue.

Sample Size, Confidence Level, and Width Tradeoffs

The width of a confidence interval is determined by three factors: the sample size (n), the variability in the data (standard deviation s), and the chosen confidence level (90%, 95%, 99%, etc.). Larger samples produce narrower intervals because the standard error of the mean (s/√n) shrinks as n grows — doubling sample size reduces the interval width by about 30% (factor of √2). Quadrupling sample size halves the width. This diminishing-returns relationship is why sample-size planning matters — going from n=100 to n=400 is a big gain, but from n=400 to n=1600 adds less incremental precision for 4× the data-collection cost.

Higher confidence levels produce wider intervals because you need a larger margin of error to be more confident the interval captures the true parameter. A 99% CI is about 31% wider than a 95% CI from the same data; a 99.9% CI is about 59% wider. Choose confidence level based on the consequences of being wrong — medical research and regulatory approvals typically use 95% or 99%, while exploratory business analysis may use 80% or 90% for tighter, more actionable intervals. The calculator shows how interval width responds to these choices so you can pick a balance appropriate to your specific decision context.

Formulas and Assumptions

The CI for a population mean uses the formula x̄ ± t*(s/√n), where t* is the critical t-value from the t-distribution with n−1 degrees of freedom at your chosen confidence level. For n ≥ 30 the t-distribution is essentially identical to the normal distribution and you can use z-values instead (1.96 for 95% CI, 2.576 for 99% CI). For smaller samples the t-values are slightly larger than z-values, widening the interval to account for additional uncertainty about the true standard deviation.

For a population proportion, the formula is p̂ ± z*·√(p̂(1−p̂)/n), where p̂ is the sample proportion. This proportion formula requires np̂ ≥ 10 AND n(1−p̂) ≥ 10 for the normal approximation to work — violate this and use exact binomial methods instead. Both formulas assume independent random sampling from the population; systematic biases (convenience samples, self-selection) invalidate the CI interpretation regardless of sample size. When assumptions are violated, the calculator's output may be technically valid but misleading about actual uncertainty — always check assumptions before trusting the interval.

Confidence Intervals: Quantifying Uncertainty

What a Confidence Interval Really Means

A 95% confidence interval does not mean there is a 95% probability that the true parameter lies within the specific interval you computed. Instead, it describes the performance of the procedure: if you repeated the same study 100 times, approximately 95 of the resulting intervals would contain the true value. Any single interval either contains the true value or it doesn't — the randomness is in the sampling, not the parameter.

When to Use Z vs T

Use the Z-distribution when the population standard deviation (σ) is known or when n is large (≥ 30). For small samples with unknown σ, the T-distribution accounts for the additional uncertainty by producing slightly wider intervals. The t critical values converge to z values as df increases — by df = 30, the difference is less than 1%.

Sample Size and Precision

The margin of error is proportional to 1/√n. To halve the margin of error, you must quadruple the sample size. This relationship explains why political polls survey roughly 1,000–1,500 people: beyond that point, the gains in precision diminish rapidly relative to the cost of additional data collection. The Sample Size Solver above shows exactly what n you need for any target margin of error.