Confidence Intervals for Means
You should be comfortable with:
Medication dosages, IV drip rates, vital monitoring
When you want to estimate a population mean from a sample, a single number like tells you surprisingly little. Is the true mean likely to be 100? Or 110? Or somewhere else entirely? A confidence interval for the mean answers this question by providing a range of plausible values for , together with a stated level of confidence. In this lesson, you will learn two approaches: the z-interval (when the population standard deviation is known) and the t-interval (when it is not).
Z-Interval (Population Standard Deviation Known)
When the population standard deviation is known β which is rare in practice but foundational for understanding the concept β the confidence interval for the mean is:
Here is the sample mean, is the known population standard deviation, is the sample size, and is the critical value from the standard normal distribution for your chosen confidence level (1.645 for 90%, 1.960 for 95%, 2.576 for 99%).
The quantity is the standard error of the mean β it measures how much the sample mean typically varies from sample to sample. Notice that as increases, the standard error decreases: larger samples produce more precise estimates.
Example 1: IQ Scores
IQ tests are designed so that (this is known by the testβs construction). A researcher administers the test to a random sample of college students and finds . Construct a 95% confidence interval for the mean IQ of all college students.
Step 1: Calculate the standard error.
Step 2: Calculate the margin of error.
Step 3: Construct the interval.
Answer: We are 95% confident that the mean IQ of all college students is between 100.84 and 109.16.
The T-Distribution
In the real world, you almost never know . When you replace with the sample standard deviation , you introduce additional uncertainty β your estimate of the spread itself has sampling variability. The t-distribution accounts for this extra uncertainty.
The t-distribution looks like the standard normal distribution (symmetric, bell-shaped, centered at 0) but with heavier tails. This means extreme values are more likely under the t-distribution than under the normal, which makes the confidence interval appropriately wider when you are less certain about the spread.
The t-distribution has one parameter: degrees of freedom (df), which equals for a one-sample interval. Key properties include:
- When df is small (say 5 or 10), the tails are noticeably heavier than the normal curve
- As df increases, the t-distribution gets closer and closer to the standard normal
- For df of 30 or more, the t-distribution and the normal distribution are nearly identical
- At , the t-distribution is exactly the standard normal
This means the t-distribution automatically adjusts: small samples get wider intervals (more uncertainty), while large samples get intervals similar to the z-interval.
T-Interval (Population Standard Deviation Unknown)
The t-interval is the standard approach for constructing confidence intervals for means in practice:
The formula looks just like the z-interval, with two changes: is replaced by (the sample standard deviation), and is replaced by (the critical value from the t-distribution with ).
Example 2: Patient Recovery Time
A hospital records the recovery time (in days) for randomly selected patients who underwent a particular surgery. The sample mean is days and the sample standard deviation is days. Construct a 95% confidence interval for the true mean recovery time.
Step 1: Determine degrees of freedom and the critical value.
From a t-table at 95% confidence with : .
Step 2: Calculate the standard error.
Step 3: Calculate the margin of error.
Step 4: Construct the interval.
Answer: We are 95% confident that the true mean recovery time is between 4.30 and 5.30 days. A hospital administrator could use this interval to plan staffing and bed availability.
Common Values
This table provides critical values for the most commonly used confidence levels and degrees of freedom. For degrees of freedom not listed, use the nearest smaller df (this gives a slightly wider, more conservative interval).
| df | 90% | 95% | 99% |
|---|---|---|---|
| 10 | 1.812 | 2.228 | 3.169 |
| 15 | 1.753 | 2.131 | 2.947 |
| 20 | 1.725 | 2.086 | 2.845 |
| 24 | 1.711 | 2.064 | 2.797 |
| 30 | 1.697 | 2.042 | 2.750 |
| 60 | 1.671 | 2.000 | 2.660 |
| 120 | 1.658 | 1.980 | 2.617 |
| 1.645 | 1.960 | 2.576 |
Notice the bottom row: as degrees of freedom approach infinity, converges to . This confirms that the t-distribution becomes the standard normal for large samples.
Conditions for a Valid T-Interval
Before using the t-interval, verify these conditions:
- Random sample β the data must come from a random sampling process
- Independence β observations must be independent (the 10% condition: sample size is less than 10% of the population)
- Normality β the population should be approximately normally distributed, or the sample size should be at least 30 (at which point the Central Limit Theorem ensures the sampling distribution of is approximately normal regardless of the population shape)
- No strong outliers β for small samples, the t-interval is sensitive to outliers. A boxplot or dotplot can help check for extreme values.
For small samples from clearly non-normal populations (heavily skewed distributions with outliers), consider using a nonparametric method like the bootstrap confidence interval instead.
Z vs T β Which Should You Use?
| Situation | Use | Why |
|---|---|---|
| known | z-interval | You know the exact population spread |
| unknown, | t-interval (z is similar) | t accounts for estimating with |
| unknown, smaller than 30 | t-interval | Must use t; the extra tail weight matters |
When in doubt, use the t-interval. It is always valid (even when is known, the t-interval works β it is just very slightly wider than necessary). The z-interval is really just a special case of the t-interval where df is infinite.
Choosing Sample Size for a Desired Margin of Error
Just as with proportions, researchers often plan studies by specifying the desired margin of error and then determining how large a sample is needed. For means, the sample size formula is:
This formula uses (not ) because at the planning stage, you do not yet know the sample size, and therefore you do not know the degrees of freedom. The z-approximation is standard for sample size planning.
You also need a preliminary estimate of , which typically comes from prior studies, pilot data, or published literature.
Example 3: Blood Pressure Study
A researcher wants to estimate the mean systolic blood pressure of adults in a community with a margin of error of no more than 2 mmHg at 95% confidence. Prior studies suggest mmHg. How many participants are needed?
Round up: .
Answer: The researcher needs at least 139 participants. If the preliminary estimate of turns out to be too low, the actual margin of error will be larger than 2 mmHg β so researchers sometimes add a buffer by rounding up more generously.
Real-World Application: Nursing β Estimating Average Wait Time
An emergency department manager wants to estimate the average patient wait time before triage. She randomly selects patients over a two-week period and records their wait times in minutes. The results show minutes and minutes.
Construct a 95% confidence interval for the true mean wait time.
With , the critical value is approximately .
Interpretation: The hospital is 95% confident that the true mean wait time before triage is between 19.7 and 25.3 minutes. If the departmentβs target is 20 minutes or less, this interval suggests the target may not be met β the lower bound is barely below 20, and the best estimate is 22.5. This data provides actionable evidence for staffing decisions.
Why the t-interval is appropriate here: The population standard deviation of wait times is unknown (we estimated it with ), and the sample size of 36 satisfies the Central Limit Theorem requirement even if wait times are somewhat right-skewed (as they often are in healthcare settings).
Practice Problems
Test your understanding with these problems. Click to reveal each answer.
Problem 1: A random sample of 40 packages from an assembly line has a mean weight of ounces and ounces. Construct a 95% confidence interval for the true mean weight.
With , use .
Answer: We are 95% confident that the true mean package weight is between 15.94 and 16.46 ounces.
Problem 2: A sample of 10 ceramic tiles has a mean breaking strength of psi and psi. Construct a 99% confidence interval for the mean breaking strength. (Use for df = 9 at 99%.)
Answer: We are 99% confident that the mean breaking strength is between 374.3 and 425.7 psi. Notice how wide this interval is β with only 10 observations and 99% confidence, there is substantial uncertainty.
Problem 3: A researcher collects IQ scores from participants ( is known). The sample mean is . Construct a 90% confidence interval. Should you use z or t?
Since is known, use the z-interval with .
Answer: We are 90% confident that the mean IQ is between 98.92 and 105.08.
Problem 4: You want to estimate the mean commute time in a city with a margin of error of 3 minutes at 95% confidence. A pilot study suggests minutes. What sample size is needed?
Round up: .
Answer: You need at least 139 participants.
Problem 5: A nurse samples 20 patients and records their resting heart rates: bpm, bpm. Construct a 95% confidence interval. (Use for df = 19 at 95%.)
Answer: We are 95% confident that the true mean resting heart rate is between 71.19 and 76.81 bpm. This range is within the normal resting heart rate of 60 to 100 bpm, consistent with healthy patients.
Key Takeaways
- When is known (rare), use the z-interval:
- When is unknown (almost always), use the t-interval: with
- The t-distribution has heavier tails than the normal, producing wider intervals that account for the uncertainty in estimating with
- As the sample size grows, the t-distribution approaches the normal distribution β for , the difference is small
- Conditions for the t-interval: random sample, independence (10% rule), approximate normality or , and no strong outliers for small samples
- When in doubt, use the t-interval β it is always valid and only slightly more conservative than the z-interval
- To plan a study with a desired margin of error, use and round up
- In healthcare, confidence intervals for means help administrators quantify metrics like average wait times, recovery durations, and dosage responses β turning sample data into actionable estimates with clearly stated precision
Return to Statistics for more topics in this section.
Next Up in Statistics
All Statistics topicsLast updated: March 29, 2026