Unit 4 · Topic 4.9 · about 20 minutes
AP Statistics 4.9: Setting Up a Test for the Difference Between Two Population Means
Recognize when two population means should be compared with a two-sample t-test, then define the parameters, state the hypotheses and verify the conditions.
Unit 4: 10 to 20% of the multiple-choice section
What you'll be able to do
- Identify the two-sample t-test as the method for comparing two population means, and define both parameters in context.
- Write the null and alternative hypotheses for the difference between two population means.
- Verify the conditions that justify a hypothesis test for the difference between two population means.
Key vocabulary
| Term | What it means | The exam trap |
|---|---|---|
| Two-sample t-test | The test for a difference between two population means, used with two independent random samples or the two groups of a randomized experiment. | Paired data, such as left-hand and right-hand grip strength for the same people, need the one-sample t-test on the differences instead. |
| Null hypothesis | , or equivalently : no difference between the population means. | Writing it with sample means, , turns it into a statement about data already in hand instead of about the populations. |
| Alternative hypothesis | The claim the test looks for evidence of: , or , each of which can also be written with compared to 0. | A claim in one direction, such as a drink that increases push-ups, needs a one-sided alternative, not . |
| Sample data condition | Both samples have at least 30 observations, or both populations are approximately normal. If either sample is under 30, both sample distributions should be free from strong skewness and outliers. | Moderately skewed samples of 45 and 38 still meet it, because both are at least 30. |
| 10 percent condition | When sampling without replacement, and . It is not needed for a randomized experiment. | Each sample is checked against its own population, so a combined count against one population answers the wrong question. |
Predict first
A fishing-line company says its new line is stronger, on average, than its old line. An engineer will test the breaking strength of random samples of each. What does the null hypothesis say?
The test and its two parameters
To test a claim about the difference between two population means, use the two-sample t-test for a difference between two population means. It applies to two independent random samples and to the two groups of a randomized experiment.
There are two parameters, and each one needs its own definition with the population and the response variable in context: " = the mean breaking strength, in pounds, of all new line" and " = the mean breaking strength, in pounds, of all old line." For an experiment on volunteers, each population is people like those in the study receiving that treatment.
| The question asks whether | Null hypothesis | Alternative hypothesis |
|---|---|---|
| mean 1 is less than mean 2 | , or | , or |
| mean 1 is greater than mean 2 | , or | , or |
| the means differ | , or | , or |
Two groups or pairs?
The most expensive decision in this topic comes before any hypotheses. If each value in one group is linked to exactly one value in the other, because both values come from the same person or the same car, the data are paired, and the right test is the one-sample t-test for a mean difference from Topic 4.4. If the two groups were sampled or assigned separately, with no link between any particular members, use the two-sample t-test. A third kind of question compares one group with a fixed number, such as an advertised value, and that is a one-sample t-test for a mean.
Sort it
Sort each study by the kind of comparison it needs. Tap a card, then tap a bin.
Two independent groups
Matched pairs
One group vs a fixed value
The conditions
The conditions match the two-sample interval from Topic 4.7:
- Randomization condition: two independent random samples, or a randomized experiment.
- 10% condition: when sampling without replacement, and . Not needed for a randomized experiment.
- Sample data condition: both samples have at least 30 observations, or both populations are approximately normal. If either sample is smaller than 30, both sample distributions should be free from strong skewness and outliers.
Notice what the sample data condition does not ask. Two samples of 45 and 38 can both be moderately skewed and still meet it, because both are at least 30.
Reaction times after chewing gum, in milliseconds
Both groups of 15 are roughly symmetric with no outliers.
Worked exampleSetting up a two-sample test
A researcher recruits 30 volunteers and randomly assigns 15 to chew caffeinated gum and 15 to chew identical-looking gum without caffeine. Ten minutes later each volunteer completes a computer reaction-time task, and the researcher records the time in milliseconds. The boxplots above show the results. Set up a test of whether caffeinated gum lowers mean reaction time.
Identify the procedure. The two groups were formed by random assignment, and no volunteer is linked to any particular volunteer in the other group. Use a two-sample t-test for a difference between two population means.
Define the parameters. = the true mean reaction time, in ms, for volunteers like these who chew caffeinated gum. = the true mean reaction time, in ms, for volunteers like these who chew gum without caffeine.
State the hypotheses. and . A lower reaction time is faster, so "lowers" points the alternative below 0.
Check conditions. Random: the volunteers were randomly assigned to the two kinds of gum. 10%: not needed, because this is a randomized experiment. Sample data: both groups have 15 volunteers, fewer than 30, so both boxplots must be free of strong skewness and outliers, and they are.
A two-sample t-test of against , with all conditions met. The calculation and conclusion are in Topic 4.10.
Check your understanding
A researcher selects independent random samples of 50 vegetarian and 50 non-vegetarian adults from the patients of a large clinic and records each person's LDL cholesterol level. She wants to know whether the mean LDL level differs between the two groups. Which test is appropriate?
A company claims that its new sports drink increases the mean number of push-ups people can do. In an experiment, volunteers are randomly assigned to drink either the sports drink or water before a push-up test. Let and be the true mean numbers of push-ups for people like these volunteers after the sports drink and after water. Which hypotheses fit the company's claim?
An analyst takes independent random samples of 45 houses sold last year in one large city and 38 sold in another, and plans a two-sample t-test on mean selling price. Dotplots show that both samples are moderately skewed to the right with no extreme outliers. Which statement about the sample data condition is correct?
Volunteers are randomly assigned to solve a set of puzzles either while listening to music or in silence, and the time to finish is recorded. The test will use , with group 1 the music group. Which is the best definition of ?
A two-sample t-test will compare two treatments in a randomized experiment on 60 volunteers, 30 per treatment. Which statement about the 10% condition is correct?
Exam strategy for this topic
- Section I, Multiple Choice: 42 questions in 90 minutes.
- Section II, Free Response: 4 questions in 90 minutes.
- A graphing calculator with statistical capabilities is expected on both sections.
Questions students ask
How can I tell whether two sets of numbers are paired?
Ask whether each value in one group belongs with exactly one value in the other, because both come from the same person, car or pair of twins. If they do, the data are paired. If the groups were sampled or assigned separately, they are independent.
Why is the company's claim the alternative and not the null?
The null hypothesis is the statement of no difference, which the test assumes until the data argue against it. The claim is what the test looks for evidence of, so it goes in .
Why don't the hypotheses use the sample means?
Sample means are known as soon as the data are in, and they almost never come out exactly equal, even when the population means are. Hypotheses are statements about the population means.
My samples are skewed. Can I still run the test?
If both samples have at least 30 observations, yes. If either one is under 30, both sample distributions need to be free from strong skewness and outliers.
How do I choose the direction of a one-sided alternative?
Follow the question and think about what the response measures. In the gum study a lower reaction time is faster, so 'caffeinated gum lowers reaction time' becomes .
What if one group is compared with a fixed number instead of a second group?
Then there is only one sample, and the right procedure is a one-sample t-test for a mean, such as phone battery life against the 20 hours a maker advertises.
Course alignment, for teachers
AP Statistics topic 4.9, Unit 4: Inference for Quantitative Data: Means.
- Skill 2.C: Identify appropriate statistical inference methods.
- Skill 2.E: Identify the null and alternative hypotheses.
- Skill 4.E: Justify the use of a chosen statistical inference method by verifying conditions.