A confidence interval is a range of values that likely contains the true population mean, calculated from sample data. Instead of giving a single point estimate, it provides a range with an associated confidence level — typically 95% — meaning if you repeated the sampling many times, the true mean would fall in that range about 95% of the time.

The Formula

For a sample from a normally distributed population:

CI = x̄ ± (t* × SE)

Where:

  • (x-bar) = sample mean
  • t* = critical value from the t-distribution (depends on sample size and confidence level)
  • SE = standard error = s / √n
  • s = sample standard deviation
  • n = sample size

The width of the interval depends on the confidence level, sample size, and variability in the data.

Worked Example

A researcher measures the resting heart rate of 25 athletes and finds a mean of 58 bpm with standard deviation 6 bpm. What is the 95% confidence interval for the true population mean?

SE = 6 / √25 = 6 / 5 = 1.2 bpm
df = 25 - 1 = 24 degrees of freedom
t* ≈ 2.064 (from t-table at df=24, α=0.05)
CI = 58 ± (2.064 × 1.2) = 58 ± 2.48
CI = [55.52, 60.48] bpm

We can be 95% confident that the true mean resting heart rate for this population is between 55.52 and 60.48 bpm.

Understanding the Margin of Error

The margin of error (t* × SE) quantifies the precision of the estimate. Larger samples reduce the margin of error because √n grows faster than s typically does. Higher confidence levels (99% vs 95%) make the interval wider because t* increases.

When to Use

Use confidence intervals when:

  • You have sample data and want to estimate a population parameter
  • You need to communicate uncertainty alongside your estimate
  • You're writing a research report or publishing findings

Confidence intervals are preferred over point estimates because they acknowledge the inherent variability in sampling.

Tips

The t-distribution is used when the population standard deviation is unknown (most real-world cases). The z-distribution is used only when σ is known, which is rare. For large samples (n > 30), the t-distribution approaches the normal distribution, so the difference becomes negligible.

Use our Confidence Interval Calculator to compute intervals instantly from sample data.