Confidence Interval for a Single Mean

Estimate a population mean and quantify the uncertainty around that estimate.

Overview

A confidence interval (CI) for a mean provides a range of plausible values for the true population mean based on sample data. Instead of reporting a single point estimate, the CI communicates how precise the estimate is. A 95% CI means that if you repeated the study many times, approximately 95% of the intervals computed would contain the true population mean.

Statulator computes the CI using either the t-distribution (recommended for most practical situations, especially when n is small or σ is unknown) or the z-distribution (when σ is known or n is very large).

Worked Example

Scenario: Average Waiting Time at a Clinic

A hospital administrator collected waiting times (minutes) from a random sample of n = 25 patients. The sample mean was x̄ = 32.4 min and the sample standard deviation was s = 8.6 min. Construct a 95% confidence interval for the true mean waiting time.

Using Statulator:

1 Open the CI for a Single Mean calculator.

2 Enter Sample Mean = 32.4, Standard Deviation = 8.6, Sample Size = 25.

3 Set Confidence Level to 95% and Distribution to t.

4 The result: 95% CI = (28.85, 35.95).

Hand calculation:
\[ \text{SE} = \frac{s}{\sqrt{n}} = \frac{8.6}{\sqrt{25}} = 1.72 \] \[ t_{0.025,\,24} = 2.064 \] \[ \text{CI} = 32.4 \pm 2.064 \times 1.72 = 32.4 \pm 3.55 = (28.85,\; 35.95) \]

Interpretation Guide

The output (28.85, 35.95) means: we are 95% confident that the true mean waiting time lies between 28.85 and 35.95 minutes. If the confidence level were increased to 99%, the interval would widen; if decreased to 90%, it would narrow.

Margin of error is the half-width of the interval (here, 3.55 min). A smaller margin requires either a larger sample or lower confidence.

t vs. z: For sample sizes above ~30 and known σ, t and z give nearly identical results. For smaller samples with estimated σ, use t.

Formula

Using the t-distribution (recommended)
\[ \bar{x} \pm t_{\alpha/2,\;\nu} \cdot \frac{s}{\sqrt{n}} \]
Using the z-distribution
\[ \bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \]

where:

Assumptions & Requirements

Textbook Examples

Medicine

A sample of 40 patients has a mean fasting glucose of 105 mg/dL with SD = 18 mg/dL. Compute a 95% CI.

Inputs: x̄ = 105, s = 18, n = 40, confidence = 95%.
Result: 95% CI: (99.2, 110.8).
Interpretation: We are 95% confident the population mean fasting glucose lies between 99.2 and 110.8 mg/dL.

Education

The mean SAT math score for 60 students in a test-prep programme is 580 with SD = 75. Compute a 95% CI.

Inputs: x̄ = 580, s = 75, n = 60, confidence = 95%.
Result: 95% CI: (560.6, 599.4).
Interpretation: The true mean score for students in this programme is likely between 561 and 599.

Engineering

Thirty tensile-strength tests yield a mean of 420 MPa with SD = 25 MPa. Estimate the mean with 95% confidence.

Inputs: x̄ = 420, s = 25, n = 30, confidence = 95%.
Result: 95% CI: (410.7, 429.3).
Interpretation: With 95% confidence, the mean tensile strength of the material is between 410.7 and 429.3 MPa.

Agriculture

A random sample of 50 dairy cows produces a mean daily yield of 28.5 L with SD = 5.2 L. Compute a 95% CI.

Inputs: x̄ = 28.5, s = 5.2, n = 50, confidence = 95%.
Result: 95% CI: (27.0, 30.0).
Interpretation: The herd's mean daily yield is estimated between 27.0 and 30.0 litres with 95% confidence.

References

  1. Altman, D. G. (1991). Practical Statistics for Medical Research. Chapman & Hall.
  2. Rosner, B. (2016). Fundamentals of Biostatistics (8th ed.). Cengage Learning.
  3. Bland, M. (2015). An Introduction to Medical Statistics (4th ed.). Oxford University Press.