The shortest section in the chapter, and the book concedes at the outset that the situation it describes is not likely, since knowing the population standard deviations rarely happens. Everything from section 10.1 carries over unchanged except two things. The two population standard deviations replace the two sample standard deviations in the standard error, so the variances added are the true ones rather than estimates, and the sampling distribution of the difference becomes normal rather than a Student t. That second change removes the Aspin-Welch degrees of freedom entirely, which is the whole practical simplification. Both populations must be normal, the samples must be independent, and the test statistic is a z-score formed exactly as before: the difference of the sample means divided by the standard error of that difference.
Subject: Statistics · 67 slides · symbolic lesson
Open the interactive version of this deck
Title
Statistics · Chapter 10 — Hypothesis Testing with Two Samples
The same two-sample test, with σ handed to you: a normal curve and no degrees of freedom
Objectives
Section 10.1 compared two population means when nobody knew how spread out the populations were, so the spreads had to be estimated from the samples. This section asks what changes if the two population standard deviations are handed to you. The book admits at the start that this is not a likely situation. It is still worth a lesson, because it shows exactly what the t distribution was doing in 10.1.
The arithmetic is short: square, divide, add, take a root, divide again. The reasoning around it is where marks are lost, so every example here ends with a conclusion you could read aloud to someone who has never seen a p-value, and every shortcut gets a slide on when it fails.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-523 — the section this deck covers
Warm-up
Everything in this section is built from a piece you met in Chapter 7: the standard error of one sample mean when σ is known. Work it for one of this lesson's floor waxes before combining two.
Discussion prompt
Wax 1's lasting time has population standard deviation 0.33 months. Twenty floors are waxed with it. What is the standard error of their mean lasting time, and should a test about that mean use the normal or a t distribution?
Hold on to 0.0738. Wax 2 will give a second standard error of the same kind, and the main new idea of this section is how the two combine into one standard error for the difference. They do not simply add, and the reason is worth a slide of its own.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §7.1 and §8.1 — the standard error of a mean with σ known
Section
Part 1
Concept
Example 10.6 compares two competing floor waxes. Twenty floors are randomly assigned to each wax, and you record how many months the wax lasts. Both populations of lasting times are normal, and, unusually, both population standard deviations are given.
| wax | sample mean, months | population standard deviation | floors |
|---|---|---|---|
| 1 | 3 | 0.33 | 20 |
| 2 | 2.9 | 0.36 | 20 |
Read the column heading carefully: population standard deviation. That single phrase is what puts this problem in Section 10.2 rather than 10.1. The numbers 0.33 and 0.36 describe every floor that could ever be waxed, not just these forty.
Figure (svg): Two normal curves of months a floor wax lasts, drawn from 1.8 to 4.2 months. The blue curve for wax 1 is centred at 3 with standard deviation 0.33; the orange curve for wax 2 is centred at 2.9 with standard deviation 0.36 and is slightly lower and wider. The two curves overlap almost completely.
The question is whether wax 1 lasts longer on average. The sample means differ by a tenth of a month, about three days, while single floors vary by a third of a month either way. Whether three days is a real advantage or just luck in which floors went where is exactly what a hypothesis test decides.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-521 — Example 10.6 and Table 10.10
Concept
Almost all of Section 10.1 carries over untouched. The random variable is still the difference of the two sample means, because you are comparing two averages and a difference is the natural single number for that.
\[ \bar X_1 - \bar X_2 = \text{difference in the mean months the two waxes last} \]
The hypotheses are still about the population means, written either as a comparison or as a difference. The two forms say the same thing; the difference form is the one that matches the random variable.
\[ H_0: \mu_1 \le \mu_2 \iff \mu_1 - \mu_2 \le 0 \]
\[ H_a: \mu_1 > \mu_2 \iff \mu_1 - \mu_2 > 0 \]
The requirements also carry over: two independent samples, here guaranteed by randomly assigning floors to waxes, and populations that are normal. The book states both. With known σ and normal populations, the difference of the sample means is exactly normal, whatever the sample sizes.
What changes is only the denominator of the test statistic and the curve you read the p-value from. The next slide puts the two sections side by side so you can see that nothing else moves.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the random variable and the requirements
Concept
The book lists normal populations as a requirement, and with twenty floors per wax it matters. A sample mean of twenty values is exactly normal only when the values themselves come from a normal population. From a skewed population, twenty values would leave the mean's curve somewhat skewed too.
\[ X_1 \sim N(\mu_1, \sigma_1), \; X_2 \sim N(\mu_2, \sigma_2) \Rightarrow \bar X_1 - \bar X_2 \text{ exactly normal} \]
A difference of two independent normal quantities is again normal, with the means subtracted and the variances added. So normal populations plus known spreads give an exactly normal statistic, at any sample size, even five floors per wax.
With large samples the Central Limit Theorem would rescue a non-normal population: the means would be close to normal anyway, so the requirement could be relaxed. With small samples nothing rescues it, so check the population shape before trusting a p-value, for instance with a dot plot of the data if you have them.
Independence is the other requirement, and it comes from the design. Random assignment of floors to waxes means the two groups share nothing that could tie their means together, which is exactly what lets the variances add.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — both populations must be normal
Concept
Here is Section 10.1's standard error of the difference. Each variance is estimated by the square of a sample standard deviation, and because those estimates vary from sample to sample, the standardised difference follows a t distribution with Aspin-Welch degrees of freedom.
\[ \text{10.1:} \quad SE = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}, \qquad t \text{ with Aspin-Welch df} \]
Now the same line for this section. Each s is replaced by the corresponding σ. Since the σ values are fixed numbers, the standard error is no longer an estimate at all: it is the true standard deviation of the difference.
\[ \text{10.2:} \quad SE = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}, \qquad \text{normal, no df} \]
Those are the only two changes: σ where s stood, and the normal where the t stood. The second follows from the first. The t distribution exists to account for the extra uncertainty of an estimated spread, and here nothing is estimated except the means themselves.
So the degrees-of-freedom formula, the longest calculation in 10.1, disappears entirely. That is the whole practical simplification, and Part 4 explains why it is legitimate rather than just convenient.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the distribution of the difference
Comparison
Fill in the blanks for the known-σ column. Every row that is not blank is identical in the two sections, which is the point of the table: you already know most of this test.
Comparison matrix
| 10.1: spreads estimated | 10.2: spreads known | |
|---|---|---|
| random variable | x̄₁ − x̄₂ | x̄₁ − x̄₂ |
| spreads used in the standard error | s₁, s₂ (from the samples) | sigma |
| distribution of the statistic | Student's t | normal |
| degrees of freedom | Aspin-Welch formula | none |
| centre under H₀ | 0 | 0 |
| decision rule | reject if p < α | reject if p < α |
Read the finished table by rows. Three rows change and all three are one fact seen three ways: the spreads are known, so the curve is normal, so there are no degrees of freedom to compute.
The rows that do not change are the ones most often got wrong in practice: the random variable, the centre under the null hypothesis, and the decision rule. They were the same in Chapter 9 too, which is why the conclusion sentences in this deck will sound familiar.
Keep this table in mind for Section 10.3 as well. Comparing two proportions uses the same skeleton again: a difference of two sample statistics, a standard error that adds two variances, and a normal curve centred at the null's boundary.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — and §10.1 for the left-hand column
Prediction
Before computing anything, decide where the curve for the difference of sample means is centred when you compute a p-value for the wax test. The observed difference was 0.1 months.
Predict first
When you compute the p-value for the wax test, the normal curve for the difference of the two sample means is centred at which value?
Correct: 0, the boundary value the null hypothesis names
Why: A p-value asks how surprising the data would be if the null hypothesis were true. The null says the difference in population means is at most zero, and its boundary value zero is the one to test against, so the curve is centred at zero.
The book gives the reason in one line: since the null says the first mean is at most the second, their difference is at most zero, and the mean of the normal distribution is zero. You test at the boundary because that is where the null is hardest to reject.
Centring the curve on the observed 0.1 is the commonest slip. It would put the observed value at the peak and make every result look perfectly ordinary, so no test could ever reject anything.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — the mean for the normal distribution is zero
Worked example
Does the data indicate that wax 1 is more effective than wax 2? Test at the 5 percent level. Before any arithmetic, decide which test this is and what the hypotheses say. Each line below answers one question the book asks of every test.
Name the parameters
Why: two separate groups of floors, one mean each.
\[ \mu_1, \mu_2 = \text{mean months wax 1, wax 2 last} \]
Check independence
Why: floors were randomly assigned, so the two samples are independent.
\[ \text{independent groups} \]
Check how the spreads were obtained
Why: the table says population standard deviation.
\[ \sigma_1 = 0.33, \quad \sigma_2 = 0.36 \]
You are reading the source of the numbers, not their size. Had the heading said sample standard deviation, the very same 0.33 and 0.36 would have sent you to Section 10.1 and a t distribution. This one line of the problem decides everything that follows, so it comes before any arithmetic.
Write the random variable
Why: a difference of two sample means.
\[ \bar X_1 - \bar X_2 \]
Translate more effective
Why: lasts longer on average: a greater-than sign, which goes in the alternative.
\[ H_a: \mu_1 > \mu_2 \]
Write the null as its complement
Why: the null holds the equality.
\[ H_0: \mu_1 \le \mu_2 \]
The alternative has a greater-than sign, so this is a right-tailed test: only a difference well above zero counts as evidence for wax 1. A wax 2 advantage, however large, would not support the claim.
Write the distribution under the null
Why: normal, centred at the boundary zero, with the true standard error.
\[ \bar X_1 - \bar X_2 \sim N\left(0, \sqrt{\frac{0.33^2}{20} + \frac{0.36^2}{20}}\right) \]
Check the hypotheses against the claim
Why: the claim, wax 1 lasts longer, sits in the alternative, and the equality sits in the null, as every test requires.
\[ \text{claim} \to H_a \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Example 10.6
Section
Part 2
Concept
Why is the standard error of a difference a square root of a sum? Start from what each sample mean does on its own. Each one varies from sample to sample, and its variance is its population variance divided by its sample size.
\[ \text{Var}(\bar X_1) = \frac{\sigma_1^2}{n_1}, \qquad \text{Var}(\bar X_2) = \frac{\sigma_2^2}{n_2} \]
For independent quantities, variances add. That is true for a difference as well as a sum, which surprises people. Subtracting a wobbly number does not cancel its wobble: an unlucky high value of the second mean pushes the difference down just as an unlucky low one pushes it up.
\[ \text{Var}(\bar X_1 - \bar X_2) = \frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2} \]
Take the square root to get back to the units of the data, months here. That is the standard error, and its square-root-of-a-sum shape is why the two separate standard errors combine like the two legs of a right triangle.
\[ \sigma_{\bar X_1 - \bar X_2} = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \]
Figure (svg): A right triangle whose horizontal leg, 0.0738, is the standard error of wax 1's mean and whose vertical leg, 0.0805, is the standard error of wax 2's mean. The hypotenuse, 0.1092, is the standard error of the difference. To the right, the two legs laid end to end make a longer bar of 0.1543, labelled too long, above a bar of length 0.1092.
The picture gives you a free check on any answer: the standard error of the difference must be larger than each separate standard error and smaller than the two added together. An answer outside that range has a mistake in it.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the standard deviation of the difference
Picture it
Here are the sampling distributions for the floor-wax study, drawn as if the true means were the sample means. On the left, each sample mean on its own; on the right, the difference of the two.
Figure (svg): Two panels. Left: two narrow normal curves for the sample means of 20 floors, wax 1 centred at 3 with standard error 0.074 and wax 2 centred at 2.9 with standard error 0.080, on a months axis from 2.6 to 3.3. Right: one curve for the difference of the two means, centred at 0.1 with standard error 0.109, on an axis from minus 0.3 to 0.5. The right curve is wider than either curve on the left.
Each sample mean is far less variable than a single floor: averaging twenty floors divides the variance by twenty. But the difference is noticeably wider than either mean's curve, because both sources of chance feed into it.
This is why comparing two groups needs more data than estimating one mean to the same precision. The uncertainty you are fighting is the combined uncertainty of both groups, and the combined standard error always lies between the larger of the two separate standard errors and about 1.4 times it, the square root of two.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the sampling distribution of the difference is normal
Notation
The book writes the whole sampling distribution in one line. Hover over each piece; each one answers a different question about the curve you will shade.
Annotate
On: \( \bar X_1 - \bar X_2 \sim N\left(\mu_1 - \mu_2, \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}\right) \)
Notice the second argument of N is a standard deviation, not a variance: the book's notation always puts the standard deviation there, so the square root belongs inside the bracket.
When you write this line for a specific problem, substitute the null's boundary for the centre and the given numbers for the spread. For the waxes that gives N of 0 and 0.1092, the curve every later slide shades.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the normal distribution has the following format
Notation
The test statistic standardises the observed difference: how many standard errors is it from the centre the null hypothesis assumes? Each piece of the formula has one job.
Annotate
On: \( z = \frac{(\bar x_1 - \bar x_2) - (\mu_1 - \mu_2)}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}} \)
The middle term matters more than its usual value of zero suggests. A null of the form wax 1 lasts at most a fifth of a month longer would put 0.2 there, and the formula would handle it with no other change.
Read the whole fraction as a sentence: the gap between what you saw and what the null expected, measured in standard errors. A z near zero means the data sit where the null predicts; a z beyond about two means they sit far out in a tail.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the test statistic (z-score)
Worked example
Compute the standard error for the wax study, one move per line. Keeping each square and each division visible is what lets you find a slip later.
Write the formula with the given numbers
Why: spreads 0.33 and 0.36, twenty floors each.
\[ SE = \sqrt{\frac{0.33^2}{20} + \frac{0.36^2}{20}} \]
Square each standard deviation
Why: variances, not standard deviations, are what add.
\[ 0.33^2 = 0.1089, \qquad 0.36^2 = 0.1296 \]
Square first and divide second, or divide first and square second, and you get the same thing here; what you must never do is divide the standard deviation by n. The variance is the quantity that shrinks in proportion to the sample size, so it is the variance that gets divided.
Divide each variance by its sample size
Why: this is each mean's own variance.
\[ \frac{0.1089}{20} = 0.005445, \qquad \frac{0.1296}{20} = 0.00648 \]
Add the two variances
Why: independent samples, so their variances add.
\[ 0.005445 + 0.00648 = 0.011925 \]
Take the square root
Why: back to months.
\[ SE = \sqrt{0.011925} \approx 0.1092 \text{ months} \]
So a difference of sample means from studies like this one typically lands about a tenth of a month from the true difference. That is about the size of the difference actually observed, which already hints at the answer.
Check against the triangle bounds
Why: the result must exceed the larger single standard error and fall short of their sum.
\[ 0.0805 < 0.1092 < 0.0738 + 0.0805 = 0.1543 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-521 — Example 10.6
Intuition
A standard error is easy to compute and easy to leave uninterpreted. Say what 0.1092 months means in the language of the floors before using it in a test.
\[ SE = 0.1092 \text{ months} \approx 3.3 \text{ days} \]
Imagine running the wax study over and over, each time waxing a fresh random twenty floors with each wax. The difference of the two sample means would change from run to run. Its typical distance from the true difference in mean lasting times is about 0.11 months, roughly three days.
That is the yardstick for the observed result. Wax 1 came out ahead by 0.1 months, which is less than one yardstick. A difference smaller than the typical luck of the draw is no evidence of anything on its own, and the test will make that precise.
\[ \frac{\text{observed difference}}{\text{typical luck}} = \frac{0.1}{0.1092} \approx 0.92 \]
Notice that the yardstick depends only on the design, the spreads and the sample sizes. It was fixed before a single floor was waxed, which is why it can be used to plan a study as well as to judge one, as Part 3 will show.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the standard deviation of the difference
Worked example
With the standard error in hand, standardise the observed difference. The null's boundary value is zero, so the numerator is just the observed difference.
Find the observed difference
Why: wax 1's mean minus wax 2's, in the order the hypotheses use.
\[ \bar x_1 - \bar x_2 = 3 - 2.9 = 0.1 \]
The order of subtraction was fixed when you wrote the hypotheses: wax 1 minus wax 2. The numerator must use the same order, or a positive difference in favour of wax 1 would come out negative and land in the wrong tail.
Subtract the null's boundary value
Why: the null says the difference is at most 0.
\[ 0.1 - 0 = 0.1 \]
Divide by the standard error
Why: measure the gap in standard errors.
\[ z = \frac{0.1}{0.1092} \]
Evaluate
Why: keep four decimal places, as the calculator does.
\[ z \approx 0.9157 \]
The observed difference is less than one standard error above zero. On any normal curve, about a sixth of the area lies beyond one standard deviation on one side, so you should already expect a p-value somewhere near 0.17 or 0.18.
The book's calculator output prints exactly this value, 0.9157, which confirms the reconstruction of the formula from the solution.
Check by multiplying back
Why: the statistic times the standard error must return the observed difference.
\[ 0.9157 \times 0.1092 \approx 0.1000 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — the TI-83 output: test statistic 0.9157
Error analysis
Here is an attempt at the wax standard error that goes wrong at the very first line. The final z looks plausible, which is what makes this slip dangerous: nothing about the answer shouts that it is wrong.
Annotate
On: \( SE = \sqrt{0.33^2 + 0.36^2} = 0.4884, \quad z = \frac{0.1}{0.4884} = 0.205 \)
The quickest way to catch this slip is the triangle check from earlier. The standard error of a difference of means must be smaller than the sum of the two separate standard errors, 0.1543. A value of 0.4884 is three times bigger than that, so something has been left out.
It also fails a common-sense test. The whole point of averaging twenty floors is that the average is steadier than one floor. A standard error that ignores n treats a twenty-floor study as no better than waxing a single floor of each kind.
A third check is the size of z itself. With a standard error that ignores n, a difference would need to be about half a month before reaching significance, a sign that the method cannot see anything a twenty-floor study could reasonably detect.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the standard deviation of the difference
Trap
A first attempt adds the two standard errors directly:
\[ SE = \frac{0.33}{\sqrt{20}} + \frac{0.36}{\sqrt{20}} \]
\[ SE = 0.0738 + 0.0805 = 0.1543 \]
\[ z = 0.1 / 0.1543 = 0.648 \]
Wrong. Standard deviations do not add; variances do.
Square each piece first, add, then take the root. The legs of a right triangle combine the same way, and the hypotenuse is always shorter than the two legs end to end.
\[ SE = \sqrt{0.0738^2 + 0.0805^2} \]
\[ SE = \sqrt{0.011925} = 0.1092 \]
\[ z = 0.1 / 0.1092 = 0.9157 \]
Adding the standard errors overstates the uncertainty by about 40 percent here and shrinks every z. In a closer study that alone could turn a real difference into a non-significant one.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the standard deviation of the difference
Picture it
Is the standard-error formula right? Here is a check that uses no formula at all. The computer waxed twenty random floors with each wax, two thousand times over, with both waxes set to last 3 months on average: the null hypothesis, exactly at its boundary.
Figure (svg): A histogram of 2000 simulated differences between the mean lasting time of 20 floors of wax 1 and 20 floors of wax 2, simulated with both true means equal to 3 months and the given standard deviations. The bars form a bell centred near zero, and the normal curve with mean 0 and standard deviation 0.1092 lies along their tops. The bars at or beyond 0.1 are drawn in yellow.
The simulated differences have standard deviation 0.1086, against the formula's 0.1092, and their average is -0.0046, essentially zero. The bell shape is the normal the section promises, with no heavier tails, because the spreads were fixed rather than estimated.
Now count the yellow bars: 353 of the 2000 studies, a share of 0.176, produced a difference of 0.1 months or more even though the waxes were identical. That share is the p-value, estimated by brute force, and it sits right beside the 0.1799 the normal curve gives.
Fill the middle
Try It 10.6 compares the revolutions per minute of two competing engines. Thirty engines of each type are tested; the population standard deviations are 50 and 60 RPM, and the sample means are 1,500 and 1,600 RPM. Fill in each line of the standard error.
Fill in the blanks
\frac83.33120 = 203.33, \quad \frac14.26___ = ___, \quad SE = \sqrt___} \approx ___
Why: Square each population standard deviation, 2500 and 3600, divide each by 30 to get 83.33 and 120, add to get 203.33, and take the root, about 14.26 RPM.
Check it against the triangle bounds. The separate standard errors are 50 over the root of 30, about 9.13, and 60 over the root of 30, about 10.95. The answer 14.26 is bigger than 10.95 and smaller than their sum, 20.08, as it must be.
Notice that the engines' standard error is about 14 RPM while the sample means differ by 100. You can already tell the coming z-score will be enormous, and the next slide asks you to estimate it before computing.
One more habit worth building here: write each intermediate value with its units. Variances of the mean are in RPM squared, and only the final square root brings you back to RPM, the unit the difference of 100 is measured in.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 521-522 — Try It 10.6 and Table 10.11
Estimation
For the engines, the observed difference engine 1 minus engine 2 is 1,500 minus 1,600 RPM, and the standard error is about 14.26 RPM. Estimate the z-score without a calculator.
Predict first
Roughly what is the z-score for the engine difference, engine 1 minus engine 2?
Correct: about −7
Why: One hundred divided by about fourteen is about seven, and the sign is negative because engine 1's mean is the smaller. A z of minus 7 is far beyond anything chance produces on a normal curve.
Estimating first protects you from a slipped decimal. If a calculation then gives minus 0.7 or minus 70, you know at once that a variance or a square root went missing, because the size of the answer should be about the difference divided by the standard error.
A z of minus 7 also tells you, before any table, that the p-value will be tiny. On a normal curve, three standard errors already leaves less than two in a thousand in one tail, and every further standard error shrinks it dramatically.
The sign is worth a sentence too. It comes from the order of subtraction, engine 1 minus engine 2, and the order also fixes which tail the alternative points to. Keep the same order in the hypotheses, the numerator and the picture.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Try It 10.6
Section
Part 3
Concept
A two-sample z test runs through the same steps as every test in Chapter 9. Only the random variable and the standard error are new, and you have just built both.
The book's conclusion sentence always has the same frame: at the stated level of significance, from the sample data, there is or is not sufficient evidence to conclude the alternative, said in words. Use that frame every time and you cannot accidentally claim to have proved the null.
\[ \alpha > p\text{-value} \Rightarrow \text{reject } H_0, \qquad \alpha \le p\text{-value} \Rightarrow \text{do not reject} \]
Draw the picture before you compute the p-value. A sketch of the null curve with the observed value marked tells you which side to shade and roughly how big the area should be, and it catches most wrong-tail errors before they happen.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Example 10.6's solution steps
Worked example
Finish the wax test. The statistic is z = 0.9157, the test is right-tailed, and α is 0.05. The p-value is the area beyond the observed difference on the null curve.
Write the p-value as a probability
Why: right-tailed, so the area above the observed 0.1.
\[ p\text{-value} = P(\bar X_1 - \bar X_2 > 0.1) \]
Convert to the standard normal
Why: the same area, measured in standard errors.
\[ = P(Z > 0.9157) \]
Standardising does not change the area; it only relabels the axis. The point 0.1 months on the null curve and the point 0.9157 on the standard normal cut off exactly the same share of their curves, which is why one table serves every normal test.
Use the complement of the left area
Why: tables and calculators give the area to the left.
\[ = 1 - \Phi(0.9157) = 1 - 0.8201 \]
Evaluate
Why: matches the book's calculator output.
\[ p\text{-value} = 0.1799 \]
Figure (svg): A normal curve centred at 0 with standard deviation 0.1092, for the difference in mean months from minus 0.4 to 0.4. A yellow line marks the observed difference 0.1. The area to the right of 0.1 is shaded red and labelled p-value 0.1799.
Compare with α
Why: the p-value is the larger of the two.
\[ \alpha = 0.05 < 0.1799 = p\text{-value} \]
Decide
Why: α is below the p-value, so the data are not rare enough.
\[ \text{do not reject } H_0 \]
Conclusion, in the book's frame: at the 5 percent level of significance, from the sample data, there is not sufficient evidence to conclude that the mean time wax 1 lasts is longer than the mean time wax 2 lasts.
Read the p-value in context too: if the two waxes truly lasted equally long on average, about 18 percent of studies of this size would show wax 1 ahead by a tenth of a month or more, just from which floors happened to get which wax.
Check against the simulation
Why: the share of simulated null studies at or above 0.1 must be close to 0.18.
\[ \frac{353}{2000} = 0.176 \approx 0.1799 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Example 10.6 and Figure 10.5
Picture it
The book's calculator reports both a statistic and a p-value. They are two descriptions of the same position on the same curve, and it helps to see them together on the standard normal.
Figure (svg): A standard normal curve from minus 3.5 to 3.5. A yellow line marks the test statistic z equals 0.9157. The region to the right of 1.645 is shaded red and labelled rejection region, area 0.05. The region from 0.9157 to the right is lightly shaded blue, the p-value 0.1799.
The red region is the 5 percent rejection region for a right-tailed test: everything beyond 1.645. The statistic 0.9157 falls well short of it, and the blue area beyond the statistic, 0.1799, is far larger than the red 0.05. Either reading gives the same decision, and they always agree.
The critical-value reading has one advantage: you can tell how far short the data fell. Reaching 1.645 would need an observed difference of 1.645 standard errors, about 0.18 months. A later slide turns that number into a statement about what the study could and could not detect.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Figure 10.5
Worked example
Do the data indicate that engine 2 has higher RPM than engine 1? Test at the 5 percent level. Thirty engines of each type, normal populations, population standard deviations 50 and 60 RPM, sample means 1,500 and 1,600.
Identify the case
Why: two independent groups of engines; population standard deviations given.
\[ \text{two means, } \sigma_1, \sigma_2 \text{ known} \Rightarrow z \]
Keep the book's subscripts
Why: 1 for engine 1, 2 for engine 2, and difference 1 minus 2.
\[ \bar X_1 - \bar X_2 \]
Translate the claim
Why: engine 2 higher means engine 1 lower: a less-than sign in the alternative.
\[ H_a: \mu_1 < \mu_2 \iff \mu_1 - \mu_2 < 0 \]
Write the null
Why: the complement, holding the equality.
\[ H_0: \mu_1 \ge \mu_2 \iff \mu_1 - \mu_2 \ge 0 \]
A useful habit is to say the null in words as well: engine 1 runs at least as fast as engine 2 on average. If that sentence sounds like the opposite of the claim, the symbols are the right way round.
The alternative points left, so this is a left-tailed test: evidence for engine 2 is a difference far below zero. Had you put engine 2 first, every sign would flip and the test would be right-tailed, with exactly the same p-value. What matters is keeping one order throughout.
Write the null distribution
Why: centred at the boundary 0, with the standard error you filled in earlier.
\[ \bar X_1 - \bar X_2 \sim N(0, 14.26) \]
Check the direction against the data
Why: the sample difference is negative, the side the alternative names, so the test has a chance of rejecting.
\[ 1500 - 1600 = -100 < 0 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 521-522 — Try It 10.6
Worked example
Finish the engine test. Every number below was recomputed; the book prints no answer for this Try It.
Standardise the observed difference
Why: subtract the boundary 0 and divide by the standard error.
\[ z = \frac{-100 - 0}{14.26} \]
The numerator is negative because engine 1 minus engine 2 is negative. That is the direction the alternative predicted, so a large negative z is evidence for the claim, not against it.
Evaluate
Why: as estimated earlier, about minus seven.
\[ z \approx -7.013 \]
Write the left-tailed p-value
Why: the area below the statistic.
\[ p\text{-value} = P(Z < -7.013) \]
Evaluate
Why: seven standard errors out, the area is microscopic.
\[ p\text{-value} \approx 1.2 \times 10^{-12} \]
Read the number aloud: about one in a trillion. Tables stop at z of about minus 3.5, where the area is already 0.0002, so a table would simply say the p-value is essentially zero. Either way it is far below any α anyone would choose, and its exact size does not matter for the decision.
Figure (svg): A normal curve centred at 0 with standard deviation 14.26 RPM, drawn from minus 110 to 50. A dashed red line marks the 5 percent cutoff at minus 23.5. A yellow line far to the left marks the observed difference minus 100, where the curve is flat on the axis, labelled z equals minus 7.01.
Decide
Why: the p-value is far below α.
\[ 1.2 \times 10^{-12} < 0.05 \Rightarrow \text{reject } H_0 \]
Conclusion: at the 5 percent level, from the sample data, there is sufficient evidence to conclude that engine 2's mean speed is higher than engine 1's. A gap of 100 RPM, about seven standard errors, is not something that random assignment of engines produces by chance.
Check with a 95 percent interval
Why: the plausible values of the true difference should all be negative.
\[ -100 \pm 1.96(14.26) = (-127.9, \,-72.1) \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 521-522 — Try It 10.6
Concept
The engine test gave a p-value of about one in a trillion. That says the difference is real, not that it is large. Statistical significance answers whether chance could explain the gap; whether the gap matters is a separate question about the engines.
\[ \frac{1600 - 1500}{1550} \approx 0.065 = 6.5\% \text{ of a typical speed} \]
Here the real difference is about 100 RPM, roughly six and a half percent of a typical engine's speed. Whether that is important depends on what the engines are for. For a pump it might decide which model to buy; for a design already running well below its limit it might not matter at all.
The same logic runs in reverse for the waxes. A tenth of a month, three days, is probably unimportant to anyone choosing a floor wax, so even a significant result would not have settled which wax to buy.
So report three things, not one: the decision, the size of the difference in the units of the problem, and an interval showing how precisely it is known. The engine interval, from about 72 to 128 RPM in engine 2's favour, does all of that in one line.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 521-522 — Try It 10.6
Concept
The floors in Example 10.6 were randomly assigned to waxes. The senators in Example 10.7 were not assigned to parties; they were sampled from groups that already existed. The test arithmetic is the same, but what a rejection would let you say is not.
This is the familiar warning that association is not causation, and it applies to every two-sample test. Had the senators' ages differed significantly, you could not have concluded that party membership makes anyone older or younger.
Random assignment also matters to the arithmetic, not just to the interpretation. It is what makes the two samples independent, and independence is what lets the two variances simply add. Matched designs, where the same subjects appear in both groups, need Section 10.4 instead.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-522 — Examples 10.6 and 10.7
Trap
After the wax test, a first attempt concludes:
\[ p = 0.1799 > 0.05 \]
so the two waxes last equally long.
Wrong. Not rejecting is not evidence of equality.
The test only says the data are consistent with no difference. They are also consistent with a real advantage for wax 1 of a sixth of a month, or for wax 2 of a tenth.
\[ 95\% \text{ interval: } (-0.114, \, 0.314) \]
Write the book's sentence instead: there is not sufficient evidence to conclude that wax 1 lasts longer. Then, if you can, say what size of difference the study could have detected.
\[ 1.645 \times 0.1092 = 0.18 \text{ months} \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — Example 10.6's conclusion
Worked example
A non-significant result is much more useful if you can say how big a difference would have been significant. That depends only on the design, the standard error and α, not on the data.
Find the right-tailed critical z
Why: 5 percent in the right tail.
\[ z_{0.05} = 1.645 \]
Work backwards from the decision rule. Rejection happens exactly when the statistic passes the critical value, so the smallest significant difference is the critical value converted back into months.
Convert to months
Why: multiply by the standard error.
\[ 1.645 \times 0.1092 \approx 0.1796 \text{ months} \]
Compare with the observation
Why: the observed difference fell short of the cutoff.
\[ 0.1 < 0.1796 \]
So with twenty floors per wax, only an observed advantage of about 0.18 months, five or six days, would have been called significant. Smaller true advantages often slip through, as the figure shows.
Figure (svg): Two normal curves of the difference in mean months, both with standard deviation 0.1092. The solid curve is centred at 0 (no difference); its tail beyond 0.1796 is shaded red, area 0.05. The dashed curve is centred at 0.3 (a real advantage of 0.3 months); its area beyond 0.1796 is shaded blue, 0.865. A yellow line marks the observed 0.1, short of the cutoff.
Find how often a true gap of 0.3 is detected
Why: the area of the shifted curve beyond the cutoff.
\[ P\left(Z > \frac{0.1796 - 0.3}{0.1092}\right) = P(Z > -1.103) \approx 0.865 \]
Find how often a true gap of 0.1 is detected
Why: the same calculation with the observed size of effect.
\[ P\left(Z > \frac{0.1796 - 0.1}{0.1092}\right) = P(Z > 0.729) \approx 0.233 \]
If wax 1 really does last a tenth of a month longer, a study this size catches it less than a quarter of the time. That is Section 9.2's power question, and it is why not rejecting says so little here.
Check at the null itself
Why: with a true gap of 0 the detection rate must be exactly α.
\[ P\left(Z > \frac{0.1796 - 0}{0.1092}\right) = P(Z > 1.645) = 0.05 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — built on Example 10.6's numbers
Tweak it
The null curve's width is the standard error, the square root of 0.2385 over n when both waxes get n floors. Slide n and watch where the observed 0.1 months lands relative to the curve.
Parameter explorer
Slide n, the floors per wax, from 5 to 100. At roughly what n does the observed difference of 0.1 months move out into the curve's right tail, past where most of the area lies?
\[ \text{SE} = \sqrt{0.2385 / {n}} \]
What to notice: the observed difference does not move; the curve does. The same 0.1-month advantage is unremarkable with twenty floors per wax and significant with seventy, because a bigger study pins each mean down more tightly.
Notice also how slowly the curve narrows past n of about 50. The standard error shrinks with the square root of n, so halving it costs four times the floors. That square root is why the next example's answer is so much larger than twenty.
Worked example
Suppose the manufacturer of wax 1 believes its advantage is about 0.1 months and wants a study in which an observed difference of that size would be significant at 5 percent, right-tailed. How many floors per wax?
Require 0.1 to reach the cutoff
Why: the observed difference must be at least 1.645 standard errors.
\[ \frac{0.1}{SE} \ge 1.645 \]
Solve for the standard error
Why: divide 0.1 by 1.645.
\[ SE \le \frac{0.1}{1.645} = 0.06079 \]
Write SE with n floors per wax
Why: the two variances share the same n.
\[ \sqrt{\frac{0.1089 + 0.1296}{n}} = \sqrt{\frac{0.2385}{n}} \]
Square both sides
Why: to free n from the root.
\[ \frac{0.2385}{n} \le 0.06079^2 = 0.003696 \]
Solve for n
Why: divide and round up, since floors come whole.
\[ n \ge \frac{0.2385}{0.003696} \approx 64.5 \Rightarrow n = 65 \]
Round up, never to the nearest whole number. Sixty-four floors would leave the standard error a whisker too big and the cutoff just above 0.1, so a study of 64 per wax would narrowly fail the requirement it was designed to meet.
Figure (svg): A falling curve of the standard error of the wax difference against the number of floors per wax, n from 5 to 100. A dot at n equals 20 marks 0.1092, and a dot at n equals 65 marks 0.0606. A dashed horizontal line at 0.0608 marks the standard error needed to detect a tenth of a month.
So about 65 floors per wax, more than three times the book's study. Even then, an observed difference of exactly 0.1 only just reaches significance, so the design detects a true 0.1-month advantage only about half the time.
Check by substituting n = 65
Why: the cutoff in months must now be at most 0.1.
\[ 1.645\sqrt{\frac{0.2385}{65}} = 1.645(0.06057) = 0.0996 \le 0.1 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — built on Example 10.6's numbers
Worked example
Suppose the question had been whether the two waxes differ in mean lasting time, in either direction. The data and the standard error are unchanged; only the alternative, and so the tail, change.
Write the hypotheses
Why: a two-sided claim puts a not-equal sign in the alternative.
\[ H_0: \mu_1 = \mu_2 \qquad H_a: \mu_1 \ne \mu_2 \]
The hypotheses must be chosen before seeing which wax came out ahead. If you would have been just as interested in a wax 2 advantage, the honest test is this two-sided one, and its p-value counts both directions.
Keep the statistic
Why: the observed difference and the standard error do not depend on the alternative.
\[ z = 0.9157 \]
Everything computed from the data stays put. Only the question of which results count as extreme has changed, and that lives entirely in the p-value step.
Write the two-sided p-value
Why: a difference of 0.1 in either direction counts as just as extreme.
\[ p\text{-value} = P(|Z| > 0.9157) = 2\,P(Z > 0.9157) \]
Double the one-tail area
Why: the normal is symmetric.
\[ = 2(0.1799) = 0.3598 \]
Figure (svg): The null curve for the wax difference, normal with mean 0 and standard deviation 0.1092. Both tails, beyond 0.1 and beyond minus 0.1, are shaded red, each labelled 0.1799, total 0.3598.
Decide
Why: the p-value is even further above α.
\[ 0.3598 > 0.05 \Rightarrow \text{do not reject } H_0 \]
At the 5 percent level there is not sufficient evidence that the two waxes differ in mean lasting time. A two-sided test is always harder to pass than a one-sided test pointing the right way, because its 5 percent is split between two tails.
Check with the two-sided cutoff
Why: the statistic must also fall short of 1.96.
\[ 0.9157 < 1.96 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 521 — built on Example 10.6
Worked example
An interval says more than a decision: it gives the whole range of true differences the data are consistent with. With σ known, it uses the normal multiplier.
Start from the point estimate
Why: the observed difference.
\[ \bar x_1 - \bar x_2 = 0.1 \]
Find the margin of error
Why: 1.96 standard errors for 95 percent confidence.
\[ E = 1.96 \times 0.1092 \approx 0.2140 \]
The multiplier is 1.96, not the 1.645 used in the one-sided test, because a two-sided interval leaves 2.5 percent outside each end. And it is a normal multiplier because σ is known; with estimated spreads it would be a slightly larger t value.
Subtract for the lower bound
Why: point estimate minus margin.
\[ 0.1 - 0.2140 = -0.114 \]
Add for the upper bound
Why: point estimate plus margin.
\[ 0.1 + 0.2140 = 0.314 \]
Figure (svg): A number line from minus 0.2 to 0.4 months. A blue bar runs from minus 0.114 to 0.314 with a yellow dot at 0.1 in the middle. A dashed red vertical line at 0, labelled no difference, passes through the bar.
Interpretation: we are 95 percent confident that the true mean lasting time of wax 1 is between 0.114 months shorter and 0.314 months longer than wax 2's. The interval is mostly positive, but it includes zero and small negative values, so the data cannot rule out that wax 2 is the better one.
Check against the two-sided test
Why: zero inside the 95 percent interval must match not rejecting at 5 percent, two-sided.
\[ 0 \in (-0.114, \,0.314) \iff p = 0.3598 > 0.05 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §8.1 — the interval with σ known, applied to a difference
Ranking
Here are the steps of Try It 10.6, scrambled. Put them in the order you would actually carry them out. The order matters: the hypotheses have to be fixed before the data are looked at, and the conclusion comes last.
Put in order
Order the steps of the engine test from first to last.
Why: Identify the case first, because it decides the distribution. Fix the hypotheses from the claim before computing anything. Then the standard error, the statistic, the p-value and decision, and finally the sentence about the engines.
The step most often done out of order is the alternative hypothesis. Writing it after seeing that engine 2's sample was faster feels harmless here, but it is the habit that leads to choosing a tail to suit the data, which doubles the real error rate.
The standard error and the statistic could be computed before the hypotheses without harm, since they do not depend on them. The tail and the p-value, though, cannot be found until the alternative is written down.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 521-522 — Try It 10.6
Section
Part 4
Concept
Section 8.2 introduced the t distribution for one reason. When σ is unknown you divide by a standard error built from s, and s itself changes from sample to sample. The statistic then has two sources of chance, the mean on top and the spread underneath.
\[ t = \frac{(\bar x_1 - \bar x_2) - 0}{\sqrt{s_1^2/n_1 + s_2^2/n_2}} \quad \leftarrow \text{ top and bottom both vary} \]
An unluckily small s makes the denominator small and the statistic large, so t values stray further from zero than z values would. The t curve's heavier tails are exactly the allowance for that extra straying, and the degrees of freedom measure how much information the s values rest on.
\[ z = \frac{(\bar x_1 - \bar x_2) - 0}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}} \quad \leftarrow \text{ only the top varies} \]
With σ known, the denominator is a fixed number, the same for every possible sample. Dividing a normal quantity by a fixed number leaves it normal. There is no second source of chance to pay for, so there is nothing for degrees of freedom to measure.
why there are no degrees of freedom — Degrees of freedom describe how much data an estimated spread rests on. When both population standard deviations are known, nothing about the spread is estimated, so the statistic is exactly standard normal and no degrees of freedom are involved.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the sampling distribution is normal
Picture it
Here are the curves the two sections use. The normal is what this section's statistic follows. The t curves are what Section 10.1's statistic follows, at two different degrees of freedom.
Figure (svg): Three bell curves from minus 4 to 4: the standard normal in blue, a t curve with 18 degrees of freedom in orange, and a t curve with 6 degrees of freedom in purple, which is lower in the middle and thicker in the tails. The area beyond 2 is shaded under the normal and under the 6 degree curve, labelled 0.0228 and 0.0462.
In the middle the three curves almost coincide. The difference is concentrated in the tails, which is precisely where p-values and cutoffs live. A statistic of 2 leaves 2.3 percent of the normal beyond it but 4.6 percent of a t with 6 degrees of freedom: the same data look half as convincing when the spread had to be estimated from small samples.
As the degrees of freedom grow, the t closes in on the normal from above. Knowing σ is like having infinitely many degrees of freedom: the estimate of spread is perfect, so its uncertainty costs nothing.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §8.2 — Student's t distribution and its degrees of freedom
Worked example
Compare the two-sided 95 percent multipliers you would use for a difference of means under four states of knowledge. The numbers are table values, recomputed in node.
σ known
Why: the standard normal.
\[ z_{0.025} = 1.960 \]
Each multiplier is the number of standard errors you must go out from the centre to enclose 95 percent of the curve. Heavier tails push that point further out, so the multiplier grows as the degrees of freedom shrink.
Spreads estimated, 38 df
Why: about what two samples of twenty give.
\[ t_{0.025, 38} = 2.024 \]
Spreads estimated, 18 df
Why: about two samples of ten.
\[ t_{0.025, 18} = 2.101 \]
Spreads estimated, 6 df
Why: about two samples of four.
\[ t_{0.025, 6} = 2.447 \]
Figure (svg): Four horizontal bars. Sigma known, the normal: 1.960. A t with 38 degrees of freedom: 2.024. A t with 18: 2.101. A t with 6: 2.447. A dashed line at 1.96 shows every t bar extending past it.
Read the bars as the price of not knowing σ. With samples of twenty the price is small, three percent extra width. With samples of four it is a quarter extra: intervals 25 percent wider and tests that need a bigger statistic to reject.
Check the ordering
Why: every t multiplier must exceed 1.960 and must fall as the degrees of freedom rise.
\[ 1.960 < 2.024 < 2.101 < 2.447 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §8.2 and §10.1 — the t table, here used for comparison
Prediction
Suppose 0.33 and 0.36 had been sample standard deviations computed from the forty floors, not population values. Everything else in Example 10.6 stays the same, so the statistic is still 0.9157.
Predict first
Compared with the z test's p-value of 0.1799, the Welch t test's p-value on the same numbers would be
Correct: slightly larger
Why: The t curve has heavier tails than the normal, so the same statistic leaves more area beyond it. With about 38 degrees of freedom the tails are only a little heavier, so the p-value grows only a little.
This direction never reverses. For the same statistic and the same tail, a t p-value is always at least as big as a z p-value, because the t is the normal with extra uncertainty built in. Treating an estimated spread as known therefore always flatters the evidence.
How much it flatters depends on the degrees of freedom, and the next example puts a number on it for the waxes.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.1 — the Aspin-Welch t test
Worked example
Run the wax numbers through Section 10.1's procedure, treating 0.33 and 0.36 as sample standard deviations. The statistic is unchanged; what changes is the curve.
Name the two variance pieces
Why: each mean's estimated variance.
\[ a = \frac{0.33^2}{20} = 0.005445, \quad b = \frac{0.36^2}{20} = 0.00648 \]
The Aspin-Welch formula weighs how much each group contributes to the standard error and how much data stands behind it. Writing the two pieces as a and b keeps the long fraction readable.
Write the Aspin-Welch numerator
Why: the squared sum.
\[ (a + b)^2 = 0.011925^2 = 1.4221 \times 10^{-4} \]
Write the Aspin-Welch denominator
Why: each piece squared over its n minus one.
\[ \frac{a^2}{19} + \frac{b^2}{19} = 3.7704 \times 10^{-6} \]
Divide for the degrees of freedom
Why: the result need not be a whole number.
\[ df = \frac{1.4221 \times 10^{-4}}{3.7704 \times 10^{-6}} \approx 37.7 \]
Find the right-tail area of the t
Why: same statistic, heavier-tailed curve.
\[ P(T_{37.7} > 0.9157) \approx 0.1828 \]
Software or a calculator does this last step; a printed t table would only bracket the answer between two columns. The point of the slide is the comparison, not the lookup.
So the price of estimating the spreads, with twenty floors per wax, is a p-value of 0.1828 instead of 0.1799. No decision at any usual α changes. That small gap is the entire practical content of knowing σ for samples this size.
It would not stay small with less data. With five floors per wax the same means give z = 0.458 with p = 0.3235, against a Welch t with 7.9 degrees of freedom and p = 0.3297.
Check the direction
Why: the t p-value must exceed the z p-value for the same statistic.
\[ 0.1828 > 0.1799 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.1, the Aspin-Welch formula — applied to Example 10.6's numbers
Step zero
Example 10.7 asks whether Democratic U.S. senators are older on average than Republican senators. Thirty randomly selected Republicans had mean age 61.675 years with standard deviation 10.17 years; thirty Democrats had mean 61.704 years with standard deviation 9.55 years. Before any arithmetic, decide which distribution the test should use.
Discussion prompt
Are these population standard deviations? Which distribution does the book use, and what justification does it give?
This is the book's only example in the section where σ is not actually known, and it is placed here to show the normal approximation at work. With large samples the s values are very close to the true σ values, so treating them as known costs very little. The next two slides check how little.
Keep the book's subscripts: 1 for the Democratic senators and 2 for the Republican senators, so the claim older Democrats puts a greater-than sign in the alternative: a right-tailed test.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 522 — Example 10.7
Worked example
Set up and compute the statistic with the book's subscripts: 1 for Democrats, mean 61.704 years, s = 9.55; 2 for Republicans, mean 61.675 years, s = 10.17; thirty of each.
Write the hypotheses
Why: older than is a greater-than sign, so it goes in the alternative.
\[ H_0: \mu_1 - \mu_2 \le 0 \qquad H_a: \mu_1 - \mu_2 > 0 \]
The book lists the Republicans first in the problem but makes the Democrats group 1 in the solution, because the claim is about Democrats being older. Putting the claimed-larger group first makes the alternative a greater-than and the test right-tailed, which is easier to picture.
Square and divide the Democrats' spread
Why: s used in place of σ, as the approximation allows.
\[ \frac{9.55^2}{30} = \frac{91.2025}{30} = 3.0401 \]
Square and divide the Republicans' spread
Why: same move for group 2.
\[ \frac{10.17^2}{30} = \frac{103.4289}{30} = 3.4476 \]
Add and take the root
Why: the standard error of the difference.
\[ SE = \sqrt{3.0401 + 3.4476} = \sqrt{6.4877} \approx 2.5471 \]
Find the observed difference
Why: Democrats minus Republicans.
\[ \bar x_1 - \bar x_2 = 61.704 - 61.675 = 0.029 \text{ years} \]
Standardise
Why: divide by the standard error.
\[ z = \frac{0.029}{2.5471} \approx 0.0114 \]
The observed gap is about ten days of age, against a standard error of two and a half years. The statistic is a hundredth of a standard error from zero: as close to the null's centre as real data ever get.
Check against the triangle bounds
Why: the SE must lie between the larger single SE and the sum of the two.
\[ \sqrt{3.4476} = 1.857 < 2.547 < 1.744 + 1.857 = 3.601 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 522 — Example 10.7
Worked example
Finish the test, then check two things the book takes for granted: its conversion of days to years, and its normal approximation.
Write the right-tailed p-value
Why: the area above the statistic.
\[ p\text{-value} = P(Z > 0.0114) = 1 - 0.5045 \]
Evaluate
Why: matches the book.
\[ p\text{-value} \approx 0.4955 \]
Figure (svg): A normal curve centred at 0 with standard deviation 2.547 years, drawn from minus 8 to 8. A yellow line at 0.029, almost exactly on the centre, marks the observed difference. Everything to its right is shaded, labelled p-value 0.4955.
Decide
Why: the p-value is far above α.
\[ 0.4955 > 0.05 \Rightarrow \text{do not reject } H_0 \]
Half the curve lies beyond the statistic because the statistic is essentially at the centre. A p-value near one half is what the data look like when they carry no information at all in the direction of the claim.
Conclusion: at the 5 percent level, from the sample data, there is not sufficient evidence to conclude that the mean age of Democratic senators is greater than the mean age of Republican senators.
A misprint, corrected: the book converts 61 years 247 days to 61.675 years, but 247 divided by 365 is 0.6767, so the age is 61.677 years. With the exact ages the difference is 0.0274 years and the p-value 0.4957 instead of 0.4955. The decision does not change, but the printed 61.675 is not what the stated age gives.
\[ 61 + \frac{247}{365} = 61.677, \qquad 61 + \frac{257}{365} = 61.704 \]
Check the normal approximation
Why: a Welch t with 57.8 df on the same numbers gives essentially the same area.
\[ P(T_{57.8} > 0.0114) = 0.4955 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 522 — Example 10.7 and Figure 10.6
Intuition
The book used the normal for the senators even though their spreads were estimated, and the Welch t confirmed the p-value to four places. The reason is that thirty values per group pin each standard deviation down well, so the t has plenty of degrees of freedom.
\[ t_{0.025, 57.8} = 2.002 \quad \text{vs} \quad z_{0.025} = 1.960 \]
With about 58 degrees of freedom the t multiplier is only two percent longer than the normal's. Any test whose p-value is not sitting right on the boundary will reach the same decision either way, and for the senators the p-value was nowhere near the boundary.
So the normal approximation is a statement about how little the estimate costs, not a claim that the spread is known. It is safest when both groups are large and the result is not borderline. When either condition fails, compute the Welch degrees of freedom and use the t; with software that costs nothing.
This also explains why the book can call known σ unlikely and still teach it. In large studies the known-σ test and the honest t test agree so closely that learning the simpler one first costs nothing.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 522 — the normal approximation to Student's t distribution
Counterexample
The book's justification in Example 10.7 was that the two sample sizes add to more than 30. That rule works when both groups are reasonably large. It fails when one group is tiny, because the small group's spread can dominate the standard error.
Discussion prompt
Find two samples whose sizes add to more than 30 but for which treating the sample standard deviations as known would badly understate the uncertainty.
Figure (svg): Two curves from minus 5 to 5: the standard normal in blue and a t curve with 3.07 degrees of freedom in purple, dashed, with much heavier tails. The area beyond 1.96 on both sides is shaded under the t curve, labelled total 0.143, against 0.05 for the normal.
What saves Example 10.7 is that both groups have thirty members, not just the total. If you are going to use the shortcut at all, check each sample, or simply compute the Welch degrees of freedom: if they come out large, the normal is fine; if small, it is not.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 522 — the sum of the sample sizes is greater than 30
Worked example
Ten randomly selected professors at university A average 46.672 years with standard deviation 8.53; ten at university B average 47.531 with standard deviation 7.83. Is A's mean age greater? Test at 5 percent. These are sample standard deviations and only 20 professors in all, so by the book's own rule the normal approximation is not licensed: use the Welch t.
Write the hypotheses
Why: A older than B: greater-than in the alternative.
\[ H_0: \mu_A - \mu_B \le 0 \qquad H_a: \mu_A - \mu_B > 0 \]
Compute the two variance pieces
Why: each s squared over 10.
\[ \frac{8.53^2}{10} = 7.2761, \qquad \frac{7.83^2}{10} = 6.1309 \]
Standard error
Why: add and take the root.
\[ SE = \sqrt{13.4070} \approx 3.6616 \]
Statistic
Why: observed difference over the standard error.
\[ t = \frac{46.672 - 47.531}{3.6616} = \frac{-0.859}{3.6616} \approx -0.2346 \]
The statistic is negative: university A's sample is younger, the opposite of the claim. Before computing any tail area you already know the right-tailed p-value must exceed one half, so the test cannot possibly reject.
Aspin-Welch degrees of freedom
Why: the squared sum over the sum of squared pieces over 9.
\[ df = \frac{13.4070^2}{(7.2761^2 + 6.1309^2)/9} \approx 17.87 \]
Nearly 18 degrees of freedom from 20 professors: the two groups have similar spreads and equal sizes, so the formula gives close to the pooled value of 18. Unequal groups with unequal spreads would give far fewer, as the counterexample showed.
Right-tailed p-value
Why: the area above minus 0.2346.
\[ P(T_{17.87} > -0.2346) \approx 0.5914 \]
Figure (svg): A t curve with 17.87 degrees of freedom from minus 4 to 4, with a dashed normal curve for comparison. A yellow line at t equals minus 0.235 marks the statistic; the area to its right is shaded, labelled p-value 0.5914.
Do not reject. At the 5 percent level there is not sufficient evidence that university A's professors are older on average; in fact A's sample is the younger one, which is why more than half the curve lies beyond the statistic.
Check against the normal shortcut
Why: a z on the same statistic should be close but a little smaller.
\[ P(Z > -0.2346) = 0.5927 \quad \text{vs} \quad 0.5914 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 523 — Try It 10.7: the book prints no answer
Trap
Eight measurements per group, s values 4.1 and 5.3, and a first attempt writes:
\[ \text{spreads given} \Rightarrow z \]
\[ z = 2.10 \Rightarrow p = 0.018 \]
Wrong. Given in the problem is not the same as known.
Ask where the numbers came from. Computed from these sixteen measurements, they are estimates, and the statistic follows a t.
\[ df \approx 13.2 \Rightarrow p \approx 0.028 \]
The z p-value is always the smaller one, so the slip always overstates the evidence. When in doubt, treat a spread as estimated; you can never make a t test look more convincing than the data warrant.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — both population standard deviations known
Section
Part 5
Concept
The book opens this section with a frank admission: knowing the population standard deviations is not likely. If you knew everything about a population's spread, you would usually know its mean too, and there would be nothing to test. So when can σ honestly be known while μ is not?
The answer is when the spread was settled long before the present study, by a large body of earlier data, while the mean is what the study is trying to learn about. The figure shows the typical case: a filling line with years of records.
Figure (svg): Two panels. Left: a histogram of 5,000 past fill volumes of a bottling line, centred at 500 ml with standard deviation 2.03 ml, with a normal curve along its tops. Right: a dot plot of today's 12 bottles, with sample standard deviation 1.95 ml.
The 5,000 past fills give a standard deviation of 2.03 ml, and that number will not move noticeably with one more day's data. Today's twelve bottles give 1.95 ml, which would be different tomorrow. Only the first is a known σ in the sense this section needs.
a genuinely known σ — A population standard deviation fixed independently of the samples being analysed: from a long-running process, an instrument's specification, or a simulation whose spread was set in advance. A spread computed from the data at hand is an estimate, however it is labelled.
The phrase to look for in a problem is population standard deviation, or a description of where the spread came from. The phrase to be suspicious of is standard deviation with no qualifier, attached to a small sample: that is almost always an s.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — this situation is not likely
Sorting
For each description of a standard deviation, decide whether it can be treated as a known population value or must be treated as an estimate. The deciding feature is always where the number came from, not how precise it looks.
Sort into buckets
Sort each standard deviation by how a two-sample test should treat it.
The senators are the instructive case. Example 10.7 used the normal for them, but as an approximation justified by the sample sizes, not because the spread was known. The label you give the method matters less than knowing which of the two you are doing and why.
If a problem is genuinely ambiguous, treat the spread as estimated. A t never gives a smaller p-value than a z for the same statistic, so the cautious choice can only make you less likely to claim a difference that is not there.
Notice that precision of the number is never the deciding feature. A pilot study can report a standard deviation to four decimal places and it is still an estimate; a published norm rounded to one decimal place is still a known value.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-522 — Examples 10.6 and 10.7
Concept
A known σ is only as good as its source. If the process has changed since the records were made, the standard error is wrong, and the z and p-value inherit the error. Because the standard error is proportional to the spreads, you can see exactly how much.
\[ \text{spreads } 20\% \text{ smaller: } SE = 0.0874, \; z = 1.145, \; p = 0.126 \]
\[ \text{spreads as stated: } SE = 0.1092, \; z = 0.916, \; p = 0.180 \]
\[ \text{spreads } 20\% \text{ larger: } SE = 0.1310, \; z = 0.763, \; p = 0.223 \]
For the waxes, none of these changes the decision, but the p-value moves by about a third in each direction. In a borderline study, an out-of-date σ could decide the result on its own.
The direction to worry about is a spread that has grown, from worn equipment or a new supplier. Then the old σ makes the standard error too small and the evidence look stronger than it is. A quick sample standard deviation from the current data is a sensible check: if it is far from the recorded σ, distrust the record.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — the standard deviation of the difference
Real world
A bottling plant runs two filling lines. Years of quality-control records give each line's standard deviation: 2.0 ml for line A and 2.5 ml for line B. This week, 25 bottles from each line average 501.2 ml and 499.8 ml.
Discussion prompt
Explain why a z test is appropriate here even though the book calls known σ unlikely, and say what could make the assumption fail.
Manufacturing and measurement are where this section's test actually earns its keep. The process spread is monitored continuously, while the mean is adjusted and re-checked. You will run the full test on these two lines in the exit ticket.
Notice the shape of the argument: you justify known σ by naming its source and the reason it has not changed, never by the fact that a number was printed in the problem.
OpenStax Introductory Business Statistics 2e, §10.5 Two Population Means with Known Standard Deviations §10.5 Two Population Means with Known Standard Deviations — the same test in business settings
Matching
Section 10.2 is one cell of a larger table: one or two samples, means or proportions, spreads known or estimated, independent or paired. Match each study to the procedure that fits it, naming the deciding detail before you choose.
Match the pairs
Why: Spreads fixed by a long record make the machines a known-sigma test. Spreads computed from the classes are estimates, so a Welch t. Before and after on the same patient are paired, not independent. Percentages of owners are proportions, not means.
Two of these look almost alike: the machines and the classes are both two independent groups compared on a mean. The only difference is where the spreads came from, which is exactly the question this section turns on.
The paired study is the one most often forced into the wrong box. Before-and-after measurements on the same people are not independent samples, and treating them as two groups throws away the pairing that makes the comparison sharp.
The proportions study is the other quick one to place: owning a bicycle is a yes-or-no outcome, so each city gives a percentage, not a mean of measurements, and Section 10.3 handles that with its own pooled standard error.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-523 — and the chapter's sections 10.1, 10.3 and 10.4
Picture it
Here is the whole chapter's first decision as a diagram. Follow it from the left for any two-group question.
Figure (svg): A flow diagram. Start: comparing two groups. If the data are proportions, go to section 10.3. If the measurements are paired, one pair per subject, go to section 10.4, matched pairs. Otherwise, two independent samples of means: ask whether both population standard deviations were known before the data. Yes leads to this section's z test with the standard error built from sigma. No leads to section 10.1's Welch t test with the standard error built from s.
The first fork asks what kind of data you have, proportions, paired measurements or two independent sets of measurements. Only the last of those brings you to the question this section adds: were both population standard deviations known before the data arrived?
Sample size appears nowhere in the diagram. Large samples make the two lower boxes give nearly the same p-value, as Example 10.7 showed, but they do not turn an estimate into a known value. The book's approximation is a shortcut through the lower box, not a route into the upper one.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, p. 520 — and Chapter 10's overview
Section
Part 6
Pattern
Every test in this deck ran through the same sequence. The arithmetic is three lines; the decisions around it are what the pattern is for.
\[ SE = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}, \qquad z = \frac{(\bar x_1 - \bar x_2) - (\mu_1 - \mu_2)}{SE} \]
Most wrong answers in this section are right arithmetic on the wrong thing: a standard deviation added where a variance belongs, an n left out, a sample s treated as known, or a non-significant result reported as proof of equality. Each step of the pattern has a one-line check aimed at one of those.
Check
Square before you add. The numbers are chosen so the arithmetic is easy and the method is the only thing being tested.
Check your understanding
Two normal populations have known standard deviations 4 and 3. Samples of 16 and 9 are drawn. What is the standard error of the difference of the sample means?
Answer: A
Why: Each population variance is divided by its own sample size: 16 over 16 is 1 and 9 over 9 is 1. The variances add to 2, and the standard error is the square root of 2, about 1.414 units.
The triangle check settles it without the formula: the separate standard errors are 1 and 1, so the answer must lie between 1 and 2. Only the root of 2 does.
In context, a difference of sample means from studies like this typically lands about one and a half units from the true difference, so an observed gap of 1 would be unremarkable and a gap of 4 would be striking.
Notice how each wrong option is a real habit: adding standard errors, forgetting to square, and pooling two samples into one. If you chose one of them, the matching trap slide earlier in the deck is the one to revisit.
Check
Ask where the spreads came from before anything else.
Check your understanding
Eight plants of each of two varieties are measured. The heights average 41 cm and 37 cm, with standard deviations 3.2 cm and 4.0 cm computed from the plants. Which procedure fits a test of whether the mean heights differ?
Answer: A
Why: The spreads were computed from the sixteen plants, so they are estimates, and with only eight per group the normal approximation is not justified. The standardised difference follows a t, with degrees of freedom from the Aspin-Welch formula.
Every detail in the question matters except the means. The phrase computed from the plants settles z against t, the sample size of eight rules out the approximation, and the two different varieties rule out pairing.
In the language of the flow diagram: independent measurements, spreads not known in advance, so the lower box, Section 10.1's test.
Had the problem said the varieties' standard deviations were known from years of trial plots, the very same numbers would have pointed to this section's z test. The words around a number decide its role.
Check
Choose the sentence a careful statistician would write.
Check your understanding
For the floor waxes, the right-tailed test gave p = 0.1799 at α = 0.05. Which statement is correct?
Answer: A
Why: A p-value above alpha means the data are consistent with the null, so the alternative is not supported. It does not establish the null; a real advantage under about 0.18 months could easily have gone undetected.
Each wrong option is a common reading of a p-value: proof of the null, the probability of the null, and a probability about individual floors. Only the correct option keeps to what a test can say.
In context: twenty floors per wax were not enough to tell whether wax 1's apparent three-day advantage is real.
The most useful addition to the correct sentence is a statement of sensitivity: with this design, only an observed advantage above about 0.18 months would have been significant.
Explain it to yourself
This is the one idea in the section that is not arithmetic. Put it in your own words before checking against the model answer.
Discussion prompt
In two or three sentences, explain why the two-sample test with known σ uses the normal distribution and has no degrees of freedom, while Section 10.1's test needs a t with Aspin-Welch degrees of freedom.
A strong answer names the source of the extra uncertainty, the estimated spread, and says the heavier tails are the allowance for it. A very strong one adds a consequence: a t p-value is never smaller than a z p-value for the same statistic, so treating an estimate as known always flatters the evidence.
If your answer mentioned sample size, check whether it said the right thing. Large samples make the t close to the normal; they do not make the spread known.
Exit ticket
The plant from the bridge slide. Line A has σ = 2.0 ml and line B has σ = 2.5 ml, from years of records. This week, 25 bottles from each average 501.2 ml and 499.8 ml. Do the lines differ in mean fill? Test at 5 percent.
Discussion prompt
Write the hypotheses, compute the standard error, the statistic and the two-sided p-value, and state the conclusion in context.
The question says differ, so the test is two-sided and the one-tail area is doubled. A one-tail p-value of 0.0144 reported as the answer would be the commonest slip here.
Check your standard error with the triangle: the separate standard errors are 0.4 and 0.5 ml, so the answer must lie between 0.5 and 0.9. And the interval excludes zero, matching the rejection.
Recap
When both population standard deviations are known, the two-sample test from Section 10.1 keeps its random variable, its hypotheses, its centre at zero and its decision rule. Two things change: σ replaces s in the standard error, and the statistic follows the normal instead of a t, so no degrees of freedom are needed.
| idea | formula or rule | read it as |
|---|---|---|
| random variable | X̄₁ − X̄₂ | the difference of the two sample means |
| distribution | N(μ₁ − μ₂, √(σ₁²/n₁ + σ₂²/n₂)) | exactly normal when σ known and populations normal |
| standard error | √(σ₁²/n₁ + σ₂²/n₂) | variances add; check it against the triangle bounds |
| statistic | z = ((x̄₁ − x̄₂) − 0)/SE | standard errors from the null's centre |
| why no df | SE is a fixed number | nothing estimated, nothing to pay for |
| Example 10.6 | z = 0.9157, p = 0.1799 | no evidence wax 1 lasts longer; detectable gap ≈ 0.18 months |
| Example 10.7 | z = 0.0114, p = 0.4955 | normal used as an approximation with n = 30 + 30 |
| known σ | fixed before the data | long records, specifications, simulations; rare |
The habits that matter are reading where a spread came from, squaring before adding, keeping one order of subtraction, and ending every test with a sentence about the populations that never claims to have proved the null.
The Introductory Business Statistics text treats the same test in its own Section 10.5, with business settings, if you want more practice. Section 10.3 turns to comparing two proportions, where the spread comes from the proportions themselves.
OpenStax Introductory Statistics 2e, §10.2 Two Population Means with Known Standard Deviations §10.2, pp. 520-523 — the whole section
OpenStax Introductory Business Statistics 2e, §10.5 Two Population Means with Known Standard Deviations §10.5 Two Population Means with Known Standard Deviations — the same test in business contexts
Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.