Mathematics.

inferential statistics

Confidence Intervals

Statistics20 minDifficulty5 out of 10

You should know: normal distribution

Overview

According to frequentist inference, a confidence interval (CI) is a range of values which is likely to contain the true value of an unknown statistical parameter, such as a population mean. Rather than reporting a single point estimate, a confidence interval provides a range, such as 2 to 4 hours, along with a specified confidence level, typically 95%. The confidence level describes the long-run reliability of the procedure used to construct the interval: if you repeated the sampling and interval-construction process many times, about that percentage of the resulting intervals would contain the true parameter.

Interactive Graph

A normal distribution and its confidence interval

Loading visualization…

Formal Definition

Definition

A γ-confidence interval for a parameter θ is a pair of statistics u(X), v(X) computed from the sample such that, before the data is observed, the interval has probability γ of containing θ:

P(u(X)<θ<v(X))=γfor all θP(u(X) < \theta < v(X)) = \gamma \quad \text{for all } \theta

The defining property, holding for every possible true value of θ

Exact confidence interval
T=XˉμS/nT = \frac{\bar{X} - \mu}{S/\sqrt{n}}

Studentized sample mean, used when the population standard deviation is unknown

t-statistic
PX ⁣(XˉcSnμXˉ+cSn)=0.95P_X\!\left(\bar{X} - \frac{cS}{\sqrt{n}} \le \mu \le \bar{X} + \frac{cS}{\sqrt{n}}\right) = 0.95

c is the critical value (e.g. from the t or normal distribution) such that P(−c ≤ T ≤ c) = 0.95

95% CI for a mean

Worked Examples

  1. Compute the standard error of the mean.

    SE=sn=10100=1SE = \frac{s}{\sqrt{n}} = \frac{10}{\sqrt{100}} = 1
  2. Construct the interval as x̄ ± (critical value)(SE).

    50±1.96(1)=(48.04, 51.96)50 \pm 1.96(1) = (48.04,\ 51.96)

Answer: 95% CI ≈ (48.04, 51.96) — we are 95% confident this range contains the true population mean.

Practice Problems

Difficulty 5/10

A sample of n=64 has mean 20 and sample standard deviation 8. Construct an approximate 95% confidence interval for μ (use critical value 1.96).

Difficulty 6/10

A concrete supplier tests n = 25 cubes with mean strength 34 MPa and sample SD 3 MPa. Give an approximate 95% confidence interval for the true mean strength (use 1.96).

Difficulty 6/10

A geotechnical survey wants the 95% margin of error for a soil property mean to be no more than 0.5 units, with known σ ≈ 2 units. How many samples are needed?

Difficulty 5/10

To HALVE the width of a confidence interval (same confidence level, same variability), you must:

Common Mistakes

Common Mistake

Interpreting a 95% confidence interval as 'there is a 95% probability the true parameter lies in this specific computed interval'.

Once the interval is computed from actual data, the true parameter either is or isn't in it — there's no probability left. The 95% describes the long-run success rate of the procedure across repeated samples, not a probability statement about this one interval.

Quiz

A 95% confidence interval for a concrete batch mean is (32.8, 35.2) MPa. The correct interpretation is:
Confidence-interval width is proportional to 1/√n. Quadrupling the sample size:

Summary

  • A confidence interval gives a range of plausible values for an unknown parameter, paired with a confidence level (e.g. 95%).
  • The confidence level describes the reliability of the interval-construction procedure over repeated sampling, not the probability that a specific computed interval contains the parameter.
  • A common form is estimate ± (critical value) × (standard error), e.g. x̄ ± 1.96·(s/√n) for a 95% CI on a mean with large n.

References