From confidence intervals to hypothesis testing
The same statistical inference question, viewed from another direction
What happens to 95% confidence intervals over 100 samples?
Continue with the male students' height example. The simulated population mean is fixed at μ = 172 cm and the population standard deviation is σ = 6 cm. Each time, independently draw a random sample of n = 100 people and calculate a 95% confidence interval.
Each horizontal line represents an interval from one sample; blue indicates coverage of the true population value, and orange indicates a miss. The plot shows the most recent 40 samples; the statistics include all samples drawn.
- Total samples drawn
- 0
- Covers true value
- 0
- Observed coverage proportion
- —
95% is the long-run coverage rate of this interval construction method; it does not guarantee exactly 95 intervals covering the true value in every 100 experiments.
How can we assess a hypothesized value when the true population value is unknown?
In a real survey, the true population mean is usually unknown. The sample mean is now 173 cm. Someone suggests that the population mean height may be 175.0 cm. Does this hypothesized value fall inside the 95% confidence interval calculated from the sample?
The horizontal line segment is the 95% confidence interval calculated this time; the vertical line represents the adjustable hypothesized population mean.
The hypothesized value is outside the 95% confidence interval
175.0 ∉ [171.824, 174.176]
Here we only assess whether the sample result is compatible with the hypothesized value; formal hypothesis-testing decision terms come later.
Does the hypothesized value fall inside the confidence interval? Rewrite the condition step by step
In Part 2, we used a plot to see whether the hypothesized value fell inside the interval. Now express the same question as a mathematical condition: first express the interval boundaries using a general critical value, then derive the Z statistic used for comparison.
These are equivalent expressions of the same condition. In the next part, we plot the calculated Z on the standard normal distribution. You can drag the slider to observe its position change.
Where does the Z we just derived fall on the standard normal distribution?
In the previous part, we derived the Z formula from the condition for a 95% confidence interval. Now plot the calculated Z on the standard normal distribution and observe how many standard errors it lies from 0. The next part introduces an adjustable significance level.
How are the central 95% and the 5% in the two tails related?
First suppose a particular population mean μ₀ is the true value. If we repeatedly draw independent samples and calculate Z = (sample mean − μ₀) ÷ standard error each time, about 95% of the Z values fall between −1.96 and 1.96, and about 5% fall beyond these limits in the two tails. In the language of the previous topic, about 95% of the sample confidence intervals cover this fixed true value and about 5% miss it.
Now focus on the central region and the two tails: Z falling inside the central 95% region is equivalent to the hypothesized value μ₀ falling inside this sample's 95% confidence interval. For the 95% example, the combined 5% in the two tails is the significance level α. When you change the confidence level, α changes accordingly. It is not "the probability that μ₀ is false." We will learn how to use it for a formal test decision in the next lesson.
This sample’s Z = −3.33
Light blue marks the central region, hatching marks the two tails, and the blue vertical line marks this sample's Z. Drag the hypothesized mean to move the blue Z marker; change the significance level to change the central region and critical values while Z stays the same.
The central 1 − α and the combined α in the two tails represent areas under the sampling distribution of the Z statistic when the hypothesized value holds. The significance level is neither "the probability that the hypothesized value is wrong" nor "the probability that this particular decision is wrong."