9.2. Confidence Intervals for the Population Mean, When σ is Known
Having developed the tools of probability theory in earlier chapters and examined the sampling distributions of statistics, we now begin our exploration of statistical inference—the main focus of this course. In previous chapters, we discussed how to describe uncertainty through probability models and explored the sampling distribution of the sample mean. Now we’ll use these foundations to make inferences about unknown population parameters.
Statistical inference allows us to quantify uncertainty when estimating population parameters based on sample data. In this chapter, we’ll focus on constructing confidence intervals for a population mean μ when the population standard deviation σ is known. While this scenario is somewhat rare in practice (as σ is typically unknown), it provides a clear foundation for understanding the core logic of interval estimation.
Road Map 🧭
Fill Content
9.2.1. Why Point Estimates Aren’t Enough
A point estimate alone doesn’t tell us how precise our estimate is. When we calculate a sample mean \(\bar{x}\) from a single random sample, we get just one possible value out of many potential sample means that could have been observed. Due to sampling variability, the sample mean will fluctuate from sample to sample, and is typically not equal to the true population mean.
Consider the sample mean \(\bar{x}\) as our estimator for the unknown population mean μ. We know from Chapter 7 that if we take a simple random sample of size n from a population with a finite standard deviation σ, then:
If the population is normally distributed, \(\bar{X}\) follows a normal distribution with mean μ and standard deviation \(\frac{\sigma}{\sqrt{n}}\)
If the population is not normal but n is large enough, the Central Limit Theorem tells us that \(\bar{X}\) is approximately normally distributed with mean μ and standard deviation \(\frac{\sigma}{\sqrt{n}}\)
This means we can quantify the uncertainty around \(\bar{x}\) by constructing an interval that has a specified probability of containing the true mean μ.
9.2.2. Critical Values and the Margin of Error
The single-sample confidence interval for μ (when σ is known) takes the form:
The term \(z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}}\) is called the margin of error (ME). This margin of error has three components that determine its size:
\(z_{\alpha/2}\) – the critical value from the standard normal distribution corresponding to our chosen confidence level
σ – the population standard deviation (assumed known in this chapter)
n – the sample size

Fig. 9.3 Figure 9.5: Critical values split the standard normal distribution into regions, with α/2 probability in each tail.
In the formula, \(z_{\alpha/2}\) represents the z-value with α/2 area to its right under the standard normal curve. For a 95% confidence level (α = 0.05), \(z_{\alpha/2} = z_{0.025} = 1.96\). For a 99% confidence level (α = 0.01), \(z_{\alpha/2} = z_{0.005} = 2.58\).
We can find these critical values in R using the qnorm()
function:
# Finding z-critical values for confidence intervals
# For 95% confidence (alpha = 0.05)
z_0.025 <- qnorm(0.975) # Note: 0.975 = 1 - 0.025
z_0.025 # Returns 1.96
# For 99% confidence (alpha = 0.01)
z_0.005 <- qnorm(0.995) # Note: 0.995 = 1 - 0.005
z_0.005 # Returns 2.58
9.2.3. Deriving the Confidence Interval: The Pivotal Method
Let’s develop the confidence interval systematically using what’s called the pivotal method. We start with a random sample \(X_1, X_2, \ldots, X_n\) that are independent and identically distributed from a Normal(μ, σ²) population with known σ.
Since the observations come from a normal distribution, the sample mean follows:
We can standardize this to create a pivotal quantity:
This pivotal quantity Z has a standard normal distribution that does not depend on any unknown parameters, even though Z itself contains the unknown parameter μ. This important property allows us to state:
Now we need to rearrange this inequality to isolate μ in the middle. This algebraic “pivoting” involves:
Multiplying all parts by \(\frac{\sigma}{\sqrt{n}}\):
\[P\left(-z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} < \bar{X} - \mu < z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\right) = 1 - \alpha\]Multiplying by -1 and reversing the inequalities:
\[P\left(z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} > \mu - \bar{X} > -z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\right) = 1 - \alpha\]Rearranging to isolate μ:
\[P\left(\bar{X} - z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} < \mu < \bar{X} + z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\right) = 1 - \alpha\]
The probability statement now gives us a random interval that contains μ with probability 1-α. When we observe actual data and compute the sample mean \(\bar{x}\), we obtain the (1-α)100% confidence interval:
Or written as a pair of endpoints:
9.2.4. Understanding Confidence Levels
The confidence level (1-α)100% is often misinterpreted. It’s important to understand what it means—and what it doesn’t mean.
Common Pitfall (read carefully)
Saying “there is a 95% probability that μ lies in this specific interval” is incorrect. The parameter μ is fixed, while the interval is random. What is correct: we are 95% confident that our calculated interval is one of the successful ones that captures the true mean.
The confidence coefficient represents the long-run frequency with which the interval estimation procedure captures the true parameter in repeated sampling. In other words, if we took many samples from the same population and constructed a 95% confidence interval from each sample, approximately 95% of these intervals would contain the true population mean μ.

Fig. 9.4 Figure 9.6: Multiple 95% confidence intervals constructed from different samples. About 95% of them (black lines) contain the true mean μ, while about 5% (red lines) miss it.
Valid interpretations of a 95% confidence interval include:
We are 95% confident that the constructed interval captures the true population mean μ.
The interval was constructed using a method that captures the true mean in 95% of all possible samples.
If we were to repeat this sampling process many times, about 95% of the resulting intervals would contain μ.
9.2.5. Worked Example: American Adult Male Weights
Historical data from 1960 indicated that the weight of American adult males was normally distributed with a mean of μ = 166.3 lbs and a standard deviation of σ = 49.26 lbs.
In 2000, researchers collected a new sample of n = 3,791 adult males and found a sample mean of \(\bar{x} = 191\) lbs. Assuming the standard deviation hasn’t changed, let’s find a 99% confidence interval for the mean weight of American adult males in 2000.
To construct the 99% confidence interval, we need: * Sample mean: \(\bar{x} = 191\) lbs * Known population standard deviation: σ = 49.26 lbs * Sample size: n = 3,791 * Confidence level: 99% (α = 0.01) * Critical value: \(z_{\alpha/2} = z_{0.005} = 2.58\)
Step 1: Find the margin of error
Step 2: Construct the confidence interval
Interpretation: We are 99% confident that the true mean weight of American adult males in 2000 was between 188.94 and 193.06 pounds.
Here’s how we would calculate this in R:
# Sample data
n <- 3791 # Sample size
xbar <- 191 # Sample mean (lbs)
sigma <- 49.26 # Population standard deviation (lbs)
# 99% confidence interval (alpha = 0.01)
alpha <- 0.01
z <- qnorm(1 - alpha/2) # z_(0.005) = 2.58
# Calculate margin of error
me <- z * sigma / sqrt(n)
# Calculate confidence interval
ci_lower <- xbar - me
ci_upper <- xbar + me
ci <- c(ci_lower, ci_upper)
# Display results
cat("99% Confidence Interval:", ci, "\n")
# Output: 99% Confidence Interval: 188.9392 193.0608
The result shows that American adult males in 2000 were significantly heavier than in 1960 (when the mean was 166.3 lbs), as the 99% confidence interval [188.94, 193.06] lies entirely above the 1960 mean.
9.2.6. Sample Size Planning for a Target Margin of Error
An important practical question is: “How large a sample do we need to achieve a desired precision?” We can solve for the required sample size by setting the margin of error equal to our desired precision E and solving for n:
Rearranging to isolate n:
Since n must be an integer, we round up to the next whole number using the ceiling function.
For example, suppose the researchers in our weight study wanted to estimate the mean weight with a margin of error of just 1 pound at 99% confidence. What sample size would they need?
# Desired margin of error (half-width)
E <- 1 # pounds
# Calculate required sample size
n_required <- ceiling((z * sigma / E)^2)
n_required # Result: 16100
This shows they would need a sample size of 16,100 adult males—much larger than their actual sample of 3,791. This illustrates an important practical consideration: achieving high precision often requires very large sample sizes, which may be impractical or expensive.
The relationship between sample size and margin of error follows a “square root law”: to halve the margin of error, you need to quadruple the sample size.
9.2.7. Assumptions and Cautions
The confidence interval procedure we’ve discussed relies on several assumptions:
Simple Random Sample – Each unit is drawn independently and randomly from the population.
Known σ – The population standard deviation is known exactly, which is rare in practice.
Normality OR large n – Either the population follows a normal distribution, or the sample size is large enough (generally n ≥ 30) to invoke the Central Limit Theorem.
Several cautions apply when using these methods:
Outliers – The sample mean \(\bar{x}\) is not resistant to outliers, so extreme values can distort the confidence interval.
Systematic error – The margin of error only accounts for random sampling variability, not biases in the sampling method or measurement process.
Known σ is rare – In most practical situations, σ is unknown and must be estimated from the data, which introduces additional uncertainty (addressed in Chapter 9.5 using the t-distribution).
9.2.8. Beyond Two-Sided Intervals with Known Sigma (THIS OVERLAPS WITH SECTION 9-4)
In some applications, we may only be interested in an upper or lower limit on the parameter, rather than a two-sided interval. For these cases, we can construct one-sided confidence bounds:
Upper Confidence Bound (with confidence level 1-α):
Lower Confidence Bound (with confidence level 1-α):
Note that the critical value is now \(z_{\alpha}\) rather than \(z_{\alpha/2}\) because we’re putting all the error probability (α) in one tail.
In R, we can find this critical value with:
# One-sided confidence bound with 95% confidence
alpha <- 0.05
z_alpha <- qnorm(1 - alpha, lower.tail = TRUE)
z_alpha # Returns 1.645
In practice, we rarely know the population standard deviation σ. In Chapter 9.5, we’ll explore how to construct confidence intervals when σ is unknown. The approach is similar, but we’ll use the sample standard deviation s as an estimate of σ and replace the z-distribution with the t-distribution to account for the additional uncertainty in estimating σ.
The key changes will be: 1. Using the sample standard deviation s instead of the known σ 2. Using t-critical values instead of z-critical values 3. Working with n-1 degrees of freedom
9.2.9. Bridging It All Together
Exercises
Derivation practice – Redo the pivotal derivation starting from \(P(Z > z_{\alpha/2}) = \alpha/2\) and obtain the same two-sided confidence interval.
Interpretation check – For a 90% confidence interval of [45.2, 52.8] for the mean battery life of a certain brand of batteries, provide a correct interpretation and two incorrect interpretations.
DIY calculation – A researcher measures the heights of 36 adult men and finds a sample mean of 175.4 cm. Assuming the population standard deviation is known to be 7.2 cm, construct a 95% confidence interval for the mean height. Interpret the interval.
Sample size planning – A quality control engineer wants to estimate the mean tensile strength of steel cables with a margin of error of 10 N at 99% confidence. If the population standard deviation is known to be 45 N, how many cables should be tested?
One-sided bound – Using the data from Exercise 3, construct a 95% lower confidence bound for the mean height. In what situations would a one-sided bound be more appropriate than a two-sided interval?