Educerie · AP · Statistics
AP Statistics 4.10
Carrying Out a Test for the Difference Between Two Population Means
How can a sample of numerical measurements tell us about the mean of a whole population, and how sure can we be?
What you will learn
- Know how to calculate the two-sample t statistic and find its degrees of freedom and p-value
- Understand how to interpret the p-value in context
- Know how to make the decision and write the conclusion in terms of the alternative
- Understand how the test and the interval agree
You must be able to
- Calculate the t statistic from summary values
- Find the p-value for the correct tail or tails and check df is in range
- Interpret the p-value as a probability, computed assuming equal population means
- Make the decision by comparing the p-value with alpha using both numbers
- Write the conclusion in context, in terms of the alternative, with convincing evidence
- Explain why a cause is claimed only after random assignment
In the exam. Section I multiple choice: the statistic from summary numbers, the tail for the p-value, the right reading of the p-value, or the decision and conclusion. In Section II (Q3 and Q4) this is the calculation and conclusion half of a full test of two means: , the degrees of freedom, the p-value, a comparison with , and a conclusion in context. Common slips are comparing with , using the wrong tail, and stating a conclusion about or in definitive language.
1The test statistic
The formula sheet gives the pattern "statistic minus parameter over standard error". For two means, with the null difference 0:
When is true, has a t-distribution. The degrees of freedom come from technology. They lie between the smaller of and , and .
Check your df against that range. A df of 8 from samples of 35 and 32 would be an error.
There is no pooled version of the standard error here. Each sample keeps its own . When a calculator asks "Pooled?", choose "No".
2The p-value
The p-value is a tail area under the t-distribution with those degrees of freedom, set by .
- : the area to the right of .
- : the area to the left of .
- : the area in both tails beyond , twice the one-tail area.
Use technology and write what you entered. With a table only, use the smaller of and as df, or the next lower row if that df is not printed (Table B prints 1 to 30, then 40, 50, 60, 80, 100 and 1000). Table B then gives a range for the p-value, a little larger than the exact one.
3Interpreting the p-value
A correct interpretation has three parts: a probability of a result at least as extreme, in the direction of , computed assuming is true (the population means are equal, in context), and the context.
It is not the probability that is true.
4Worked example: an experiment
The teacher from Topic 4.9 randomly assigned 35 students to solve a puzzle with music and 32 to solve it in silence. Times in seconds:
| Group | Mean | Standard deviation | |
|---|---|---|---|
| Music (group 1) | 35 | 212 | 38 |
| Silence (group 2) | 32 | 232 | 41 |
Set-up. Two-sample t-test for a difference between population means. = the mean puzzle time, in seconds, of all students like these who would solve it with music; = the same for silence. and , with . The conditions are met: a randomized experiment, and both groups have at least 30 students.
Statistic. The observed difference is .
Degrees of freedom and p-value. Technology gives df , between 31 and 65, as it should be. The area to the left of is .
Read Figure 1 in this order:
- The curve is the t-distribution when is true, centered at 0.
- The amber line marks the observed , 2.07 standard errors below 0.
- The alternative says music lowers the mean, so the left tail is shaded. Its area, 0.0215, is the p-value.
With a table, the smaller of 34 and 31 is 31, but Table B has no row for 31. Use the next lower row, df : the table gives for a tail probability of 0.025 and for 0.01. Our lies between, so the p-value is between 0.01 and 0.025. This agrees with the exact 0.0215.
Interpretation. Assuming the mean puzzle times with music and in silence are equal, the probability of getting a difference in sample means of -20 seconds or lower, in groups of 35 and 32 assigned at random, is 0.0215.
Decision. The p-value 0.0215 is less than , so we reject .
Conclusion. There is convincing evidence that the mean puzzle time of students like these is lower with music than in silence. Because students were randomly assigned, the data support music as the cause of the lower time.
If the teacher had asked only whether the means differ, the p-value would be . It is still below 0.05 here, but a borderline case could flip, which is why comes from the question.
5Worked example: small samples
Return to the study app from Topic 4.7. App group: , , . No-app group: , , . Students were randomly assigned, and the boxplots show no outliers and no strong skew. Test whether the app raises the mean score, at .
- and , with the mean quiz score of all students like these who would use the app and the mean of those who would not.
- , so .
- Technology: df , and the right-tail area is .
- Table check with df : for 0.005 and for 0.0025. Our lies between, so the p-value is between 0.0025 and 0.005, a little above the exact 0.0019 because df 11 is conservative.
Decision. , so we reject .
Conclusion. There is convincing evidence that the mean quiz score of students like these is higher with the app than without it.
Notice that the Topic 4.7 interval, (3.11, 14.16), agrees. It was entirely above 0.
6The decision and the conclusion
- Decision. Compare the p-value with using both numbers. If p-value , reject . If p-value , fail to reject. Never say "accept ".
- Conclusion. State it in context, in terms of , with non-definitive language, and refer to both populations.
Reject: "There is convincing evidence that the mean ... of [population 1] is [less than / greater than / different from] that of [population 2]."
Fail to reject: "There is not convincing evidence that the mean ... of [population 1] is [less than / greater than / different from] that of [population 2]."
For an experiment with random assignment, you may say the treatment caused the difference. For two samples from existing populations, you may not.
7A test and an interval agree
For a two-sided test at and a 95% interval for , the results fit together. If 0 is outside the interval, the p-value is below 0.05. If 0 is inside, it is above.
Example: the gym samples (A: , , ; B: , , ) give the interval (-0.02, 9.02) in Topic 4.7. Zero is just inside, and the two-sided test has and a p-value of 0.051, just above 0.05. They agree.
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.