Unit 4 · Topic 4.9 · about 20 minutes
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.
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?
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.