intermediate 20 minutes

Confidence Intervals

Learn how to construct and interpret confidence intervals for population parameters. Understand margin of error and confidence level.

•
On This Page

Estimate an effect and show its uncertainty

A sample mean is one number. Another sample would usually give another number. A confidence interval uses a specified procedure to show uncertainty about a population parameter.

Suppose 25 independent measurements have mean 0.45 seconds and sample SD 0.08 seconds. A 95% t interval for the population mean is about 0.417 to 0.483 seconds. The interval describes uncertainty about the mean, not the range containing 95% of individual measurements.

What 95% confidence means

Imagine repeating the same sampling design and interval procedure many times. Under the method’s assumptions, about 95% of the resulting intervals would contain the fixed population parameter. This coverage is a property of the procedure.

For the interval calculated from one dataset, the parameter is either inside or outside it. “We are 95% confident” is customary shorthand for using a procedure with 95% long-run coverage. It is not a claim that the parameter has a 95% probability of lying in this particular frequentist interval. A Bayesian credible interval answers a different question under a prior and likelihood model.

A confidence level also does not cover every source of uncertainty. Selection bias, measurement errors, and an inappropriate model can make a narrow interval misleading.

Mean interval when population SD is unknown

For independent observations from an approximately normal population, use:

xˉ±t1−α/2,n−1sn\bar{x}\pm t_{1-\alpha/2,n-1}\frac{s}{\sqrt{n}}

The notation t₍₁₋α/₂,n−1₎ means a cumulative percentile: for 95% confidence, use the 97.5th percentile of the t distribution. An upper-tail table labels that same column α/2 = 0.025.

InputMeaningReaction-time example
x̄Sample mean0.45 seconds
sSample standard deviation0.08 seconds
nNumber of independent observations25
dfDegrees of freedom, n − 124
t*Positive critical value2.0639

Calculate the pieces:

  1. SE = 0.08/√25 = 0.016 seconds.
  2. Margin of error = 2.0639 × 0.016 = 0.03302 seconds.
  3. Interval = 0.45 ± 0.03302 = [0.41698, 0.48302] seconds.

Try mean 0.45, SD 0.08, n 25, confidence 95%, and unknown population SD in the confidence interval calculator.

Use t when σ is unknown; there is no automatic switch to z at n = 30. For large df, t approaches z, making the numerical difference smaller.

Mean interval when population SD is known

If population σ is genuinely known and the mean’s normal model is justified:

xˉ±z1−α/2σn\bar{x}\pm z_{1-\alpha/2}\frac{\sigma}{\sqrt{n}}

For x̄ = 500 g, σ = 15 g, and n = 36, SE = 2.5 g. A 95% interval is 500 ± 1.9600 × 2.5 = [495.10, 504.90] g.

A historical sample SD is an estimate, not automatically a known population σ. Check what the problem or study design actually supplies.

What makes an interval wider or narrower?

Change, with other inputs comparableEffect on widthMeaning
Higher confidence levelWiderMore coverage, less precision
Larger sample sizeNarrowerLess sampling variability
Greater outcome variabilityWiderLess precise estimate

For known σ = 15, x̄ = 100, and 95% confidence, n = 25 gives margin 5.88; n = 100 gives margin 2.94. Quadrupling n halves SE. With t intervals, the changing critical value also affects the exact width.

These relationships assume comparable independent observations. More measurements of the same person are not equivalent to more independently sampled people.

Relate an interval to a hypothesis test

For the corresponding two-sided test at α = 0.05, a 95% interval excluding the null value leads to rejection. The reaction-time interval excludes 0.50 seconds, so the matching one-sample t-test rejects μ = 0.50.

An interval including zero for a difference does not demonstrate equality. It may include substantial positive and negative effects. To establish practical equivalence, define acceptable bounds and use an equivalence procedure.

Do not compare overlapping separate group intervals as a substitute for an interval or test of their difference. The standard error of the difference, and whether observations are paired, matter.

Proportions need their own method

The familiar normal or Wald interval is:

p^±z1−α/2p^(1−p^)n\hat p\pm z_{1-\alpha/2}\sqrt{\frac{\hat p(1-\hat p)}{n}}

For 280 successes out of 500, p̂ = 0.56 and the approximate 95% Wald interval is [0.5165, 0.6035]. It requires a suitable sampling design and enough successes and failures for the approximation.

This formula performs poorly for small samples or proportions near 0 or 1; with zero observed successes it gives zero width, which is implausible as an uncertainty statement. Wilson or suitable exact binomial intervals are often preferable. The site’s mean-interval calculator does not calculate proportion intervals.

Check the design before trusting the interval

  • Identify the population and the sampling or assignment process.
  • Check whether observations are independent; clustered, paired, or serial data need appropriate methods.
  • Inspect small samples for strong skew and extreme outliers. There is no universal “30 observations solves normality” rule.
  • Report measurement units and the method, not just the endpoints.
  • Explain missing data and any exclusions. An interval does not repair biased data collection.

Practice

1. Mean = 20, sample SD = 4, n = 16. Find a 95% interval using t* = 2.1314.

Show the calculation

SE = 4/√16 = 1. Margin = 2.1314. The interval is [17.8686, 22.1314]. A matching two-sided test of μ = 22 does not reject at 5%; a test of μ = 23 does, assuming the t procedure is appropriate.

2. A 99% interval is wider than a 95% interval from the same data. Which is more precise?

Show the explanation

The 95% interval is narrower and more precise, but its procedure has lower coverage. Higher confidence does not mean a more precise estimate.

References and next steps

NIST’s confidence limits for the mean gives the t interval and repeated-sampling interpretation. Continue with hypothesis testing or sample size planning.

Check your understanding

Choose an answer, then check the explanation. These are practice questions, not a certification or graded assessment.

1. What does 95% confidence describe?
2. With the same data and method, what happens when confidence increases from 95% to 99%?

0 of 2 answered

Did this explanation help?

Your response helps us identify lessons that need more work.