Put uncertainty to workLesson 16 of 30 · 7 min
How uncertain is the mean?
Construct and interpret a t confidence interval for a population mean.
An estimate from a sample changes when the sample changes. A confidence interval is built by a procedure intended to cover a target population quantity at a stated rate over repeated sampling under its assumptions.
A t interval starts at the sample mean and extends by a margin in either direction. The margin is the estimated standard error multiplied by a value that depends on the sample size and chosen confidence level. The procedure has its stated coverage for independent observations from a normal population. With bigger samples it can also work approximately for some other populations.
The target here is the population mean elapsed time, not the time of the next request. A 95% confidence procedure does not say that 95% of observations lie in the interval. After the interval is computed, frequentist coverage is a property of the procedure, not a probability assigned to the fixed population mean.
Should this interval contain nearly every individual reading?
Write a prediction (optional)
Run the prepared example
This page puts the example in the Python editor. Select Run Python with the code unchanged.
Invented data
A saved draft is open. To run the published example, open Editor tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
What to compare
Compare the two endpoints in 95% t interval for population mean (ms) with Observed range (ms). Which line describes uncertainty about a mean rather than individual times?
Your result
Result tools
The known observations span 97 to 104 ms. The interval addresses the unknown population mean. With the same observations, higher confidence requires a wider interval.
Published example output
The site ran the original code to produce this reference. Build environment ↗
Sample mean (ms): 100.5 Estimated SE (ms): 0.866 95% t interval for population mean (ms): 98.452 102.548 Observed range (ms): 97 104
The known observations span 97 to 104 ms. The interval addresses the unknown population mean. With the same observations, higher confidence requires a wider interval.
Change and run again
In the Python editor, change confidence_level = 0.95 to confidence_level = 0.99. Select Run Python again. Subtract the lower endpoint from the upper one for each of the 95% and 99% intervals. What happens to interval width and Observed range (ms)? Return to the Python editor
What this example supports. These eight values are invented. Using a t interval requires a justified independence and distribution model; the calculation itself cannot establish either.
Try a fresh case
A 95% confidence interval for mean height is 169–171 cm. Which interpretation fits?
Hints for this question
- Name the interval’s target.
- Distinguish repeated samples from individuals in one sample.