A sample of 25 adults has a mean systolic blood pressure of 128.9 mm Hg. Another 25 would have given a different number. So how far from the true population mean could 128.9 be? This topic answers that question, and the answer has a name.
A confidence interval is a range computed from a sample, such as 121.0 to 136.8 mm Hg, reported with a confidence level, such as 95%. The level describes how often the method of computing such ranges captures the true value. It is a property of the method, not of any one interval, and most misreadings of intervals come from forgetting that.
This is where the course turns from probability to inference. The previous topic showed how far a sample mean tends to fall from the population mean. Turning that statement around gives an interval around the sample mean that contains the population mean in a stated share of samples. The topic builds that interval in three steps:
- first in the simplest case, where the population standard deviation is known, checking by simulation what the 95% really promises;
- then in the realistic case, where the standard deviation is estimated from the same sample, which needs Student's $t$ distribution;
- finally for questions with only one interesting direction, and for the reverse question of how large a sample a study needs.
Two examples run through all three articles: systolic blood pressures of adults from the National Health and Nutrition Examination Survey (NHANES), and the sleep-drug trial that Student analyzed in 1908. Every number comes from a script in the site's repository.
Articles
- Confidence Intervals and Coverage: what does "95% confidence" promise? The interval for a mean with known standard deviation, derived from the sampling distribution. A hundred intervals, then 300,000, drawn from 5,247 NHANES adults whose mean is known. How to read an interval, what higher confidence costs, and what happens when the sample is not random.
- Confidence Intervals for a Mean: z and t: what changes when the standard deviation must be estimated? Why the plain substitution fails for small samples, and Student's repair. The chi-squared and $t$ distributions derived step by step, why the divisor is $n - 1$, and Student's sleep data worked by hand. How the $t$ interval fares for skewed populations.
- One-Sided Confidence Bounds and Sample Size: what if only one direction matters, and how many observations are enough? Lower and upper bounds, their link to one-sided tests, and why the side must be chosen before the data are seen. Sample size for a target margin of error, the $t$ iteration, and the chance that the finished interval is as narrow as planned.
Related topics
The interval rests on the sampling distribution of the mean and the central limit theorem, from the previous unit of the course. The next unit, hypothesis testing, uses the same pivots to decide whether data are consistent with a stated mean: hypothesis tests for a mean.
Intervals for a proportion, and why the textbook interval for one can fail badly, are in confidence intervals for a proportion. Intervals for a regression slope and for a fitted line are in Simple Linear Regression, and Linear Regression Assumptions shows what violated assumptions do to their coverage. In information retrieval, significance testing applies the paired $t$-test and the bootstrap to comparing search engines.
References
- NIST/SEMATECH. e-Handbook of Statistical Methods, §7.1.4 (What are confidence intervals?) and §7.2.2 (Confidence interval approach and sample sizes). National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/ record · 30 pages
- Pagano, M., Gauvreau, K., and Mattie, H. (2022). Principles of Biostatistics (3rd ed.). CRC Press. The course text. record · 35 pages
- Student (1908). The probable error of a mean. Biometrika, 6(1), 1–25. record · 11 pages