Formula & Calculator

Confidence Interval for the Mean

Calculates a range of values likely to contain the true population mean, based on a sample mean and desired confidence level.

StatisticsProbabilityInference

Confidence Interval Calculatorfor the Mean

CI = ± z · ( σ / √n )
CI = confidence interval  ·  = sample mean  ·  z = z-score  ·  σ = population std dev  ·  n = sample size
⟹ SolveE, z, σ, n
Please fix the errors above.
Solve for:
Presets:
Margin of Error
x̄: z: σ: n: E:
Confidence interval: [lower, upper]
✓ Copied!
Margin of Error Magnitude
Small (< 2) Medium (2–8) Large (8–20) Very Large (> 20)
E = z · σ / √n  ·  Confidence interval: ± E

Interpretation

CI = x̄ ± z·(σ/√n). Range of plausible values for population mean, with a given confidence level. Used in inferential statistics and research.

CI = x̄ ± z*(σ/√n)
Confidence Interval for the Mean

Variables

SymbolQuantityUnit
CIConfidence interval
Sample mean
zZ-score for confidence level
σPopulation standard deviation
nSample size

What it means

A confidence interval for the population mean provides a range of values that is likely to contain the true mean, based on a sample statistic. The formula uses the sample mean x̄, a critical value z (from normal distribution) for the desired confidence level, and the standard error σ/√n. It assumes known population standard deviation. For unknown σ, the t‑distribution is used. The interval width reflects the uncertainty due to sampling. It is widely used in reporting study results, in quality control, and in survey analysis. Understanding confidence intervals is crucial for interpreting the precision of estimates and for making inferential conclusions.

Worked example

Confidence Interval for Mean – Two Examples

Real‑World
Scenario: A sample of 100 items has mean 50, σ=10. Construct a 95% CI (z=1.96).
ParameterValue
50
σ10
n100
z1.96
1Margin = 1.96 × (10/√100) = 1.96 × 1 = 1.96
2CI = 50 ± 1.96 = (48.04, 51.96)
Result (48.04, 51.96) ✓ 95% confidence
Scenario: A sample of 25 has mean 100, σ=20. Find 95% CI.
ParameterValue
100
σ20
n25
z1.96
1Margin = 1.96 × (20/√25) = 1.96 × 4 = 7.84
2CI = 100 ± 7.84 = (92.16, 107.84)
Result (92.16, 107.84) ✓ 95% CI
Insight: A confidence interval gives a range of plausible values for the population mean. The 95% CI means that in repeated sampling, 95% of intervals would contain the true mean.

Common mistakes

  • Confidence interval for the mean: Estimate of the population mean with a given confidence level.
  • z: The z‑score for the desired confidence level (e.g., 1.96 for 95%).
  • σ: Population standard deviation – if unknown, use t‑distribution and sample standard deviation.
  • n: Sample size – must be large enough for z (or use t).
  • Interpretation: The interval has a (1−α)·100% chance of containing the true mean.

Applications

A confidence interval for the mean provides a range of plausible values for the population mean, based on sample data, with a specified level of confidence (e.g., 95%). It is a cornerstone of inferential statistics, used to quantify the uncertainty of estimates. Engineers use confidence intervals to assess process performance, to compare designs, and to validate simulation models. In research, they report the precision of estimates. By constructing confidence intervals, professionals can make informed decisions, recognise the limitations of sample data, and communicate the reliability of findings. The interval width is determined by the sample size, standard deviation, and confidence level. Understanding confidence intervals is essential for evidence‑based decision‑making.

  • Quality control – estimating true mean of a process
  • Research – reporting means with uncertainty
  • Engineering design – comparing alternative designs
  • Market research – estimating population parameters
  • Risk analysis – assessing uncertainty in predictions

Frequently Asked Questions

Q01What is a confidence interval for the mean and how is it constructed?
A01

CI = x̄ ± z·(σ/√n) (if σ known). It gives a range of values that likely contains the population mean μ, with a certain confidence level (e.g., 95%).

Q02What is the correct interpretation of a 95% confidence interval?
A02

If we repeated the sampling many times, 95% of such intervals would contain the true population mean. It is not a 95% probability that the particular interval contains μ.

Q03What factors affect the width of a confidence interval?
A03

The width depends on the standard deviation (σ), sample size (n), and the confidence level (z). Larger σ and higher confidence widen it; larger n narrows it.

Q04What is the difference between a confidence interval and a prediction interval?
A04

A confidence interval is for the population mean. A prediction interval is for an individual future observation, which is wider because it includes individual variability.

Q05How do you construct a confidence interval when σ is unknown?
A05

Use the t‑distribution: CI = x̄ ± t·(s/√n), with df = n−1. This accounts for the extra uncertainty from estimating σ.

Q06What is the margin of error in a confidence interval?
A06

The margin of error is E = z·(σ/√n) (or t·(s/√n)). It is half the width of the interval.

Q07How does sample size affect the confidence interval?
A07

Larger n decreases the standard error (σ/√n), leading to a narrower interval, all else being equal.

Q08What is the relationship between confidence level and width?
A08

Higher confidence level (e.g., 99% vs 95%) requires a larger z‑value, resulting in a wider interval.

Q09What is the assumption for constructing a z‑confidence interval?
A09

The data should be approximately normally distributed, or the sample size should be large enough (n ≥ 30) for the CLT to apply. The population standard deviation must be known.

Q10How do you interpret a confidence interval that contains zero?
A10

If the interval contains zero, it suggests that the true mean difference could be zero, meaning no statistically significant effect at the given confidence level.