AP Statistics · Unit 4 · Inference for Quantitative Data: Means
4.9 Setting up a two-mean test
Write hypotheses for comparing two population means, check the conditions for a two-sample t-test, and choose the correct test statistic.
1/5Hypotheses describe the difference between two population means
- Hypotheses describe the difference between two population means
- The alternative hypothesis can be one-sided or two-sided
- Three conditions must hold before running a two-sample t-test
- Small samples need graphs to support the normality condition
- The test statistic standardizes the difference in sample means
- Check your recall
- Practice: 10 questions
Part 1 of 5: Hypotheses describe the difference between two population means
A gardener wants to know whether a new fertilizer gives a higher tomato yield than the usual one. Each fertilizer has its own long-run mean yield. The question concerns the difference between those two population means.
A test begins with two competing claims. The null hypothesis, , says the two means are equal. The alternative hypothesis, , says the means differ in the way the researcher suspects.
Hypotheses describe parameters, so define and in words and in context. For example, let be the true mean yield with the new fertilizer.
Key terms · tap one for its definition
null hypothesis
The null hypothesis is the claim of no difference, written with an equals sign, that a test seeks evidence against.
alternative hypothesis
The alternative hypothesis is the claim, written with , , or , that the parameters differ in the way the researcher suspects.
Part 2 of 5: The alternative hypothesis can be one-sided or two-sided
Now that both claims have names, the direction of the alternative needs a rule. The null hypothesis is , which is the same as .
The wording of the research question sets the alternative. Decide it before looking at the data. A two-sided alternative is used when the question asks only whether the means differ. A one-sided alternative names a direction.
Research wording and the matching alternative hypothesis
- Wording
- Differs or changes
- Alternative
- Type
- Two-sided
- Wording
- Greater or higher
- Alternative
- Type
- One-sided
- Wording
- Less or lower
- Alternative
- Type
- One-sided

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: C · Worked explanation
Part 3 of 5: Three conditions must hold before running a two-sample t-test
Before any calculation, the data must suit the procedure. The two-sample t-test compares two population means. It requires independent samples, so no individual in one group is linked to an individual in the other.
- Random: the data come from random samples or from random assignment in an experiment.
- Independence within groups: when sampling without replacement, each sample is less than 10% of its population.
- Independence between groups: the two groups are separate, with no pairing or matching.
- Normality: each population is approximately normal, or each sample size is at least 30.
Random sampling lets you generalize to the population sampled. Random assignment supports a cause-and-effect conclusion.
Key terms · tap one for its definition
two-sample t-test
The two-sample t-test is a hypothesis test about that uses a statistic computed from two independent samples.
independent samples
Independent samples are samples in which the individuals in one group have no pairing with, and no influence on, those in the other.
Part 4 of 5: Small samples need graphs to support the normality condition
The last condition needs more care when a sample is small. With at least 30 observations in a group, the sampling distribution of its sample mean is approximately normal. This holds even when the population is skewed.
With fewer than 30 observations, graph the sample. Use a dotplot, histogram, or boxplot. Look for a roughly symmetric shape with no strong skew and no outliers.
Check each group separately. One well-behaved group does not excuse the other.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: The test statistic standardizes the difference in sample means
With the conditions checked, the last step is choosing the statistic. A test statistic measures how far the sample result lies from the null value. Here the sample result is .
The population standard deviations are unknown, so each is estimated by a sample standard deviation . That makes the statistic a statistic, not a statistic. The null value is 0, because says the means are equal. The statistic is .
Technology finds the degrees of freedom, which select the exact distribution for the test.
Worked example
Setting up a two-mean test
- Define parameters: is the true mean quiz score with flashcards, and is the true mean score with notes.
- Write the hypotheses: and .
- Check conditions: students were randomly assigned, and the groups contain different students.
- Check normality: each group has 40 students, which is at least 30.
- Choose the statistic: .
Answer: Use a two-sample -test for with a one-sided alternative.
Key terms · tap one for its definition
test statistic
The test statistic is the sample statistic minus the null value, divided by the standard error, the typical sampling variability of the statistic.
degrees of freedom
The degrees of freedom are the number that determines which t distribution applies; for two means, technology computes it from both samples.
Check your recall[12 marks]
5 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Identify[2 marks]
Identify the null and alternative hypotheses, in symbols, for testing whether mean battery life of Brand A () is greater than that of Brand B ().
Show mark schemeHide mark scheme
Model answer
and .
- 1 mark for writing (or )
- 1 mark for writing
- 2.Describe[3 marks]
Describe the conditions that must be checked before using a two-sample t-test for means.
Show mark schemeHide mark scheme
Model answer
The data must come from random samples or random assignment. The observations must be independent: each sample is less than 10% of its population when sampling without replacement, and the two groups are not paired. Each population must be approximately normal, or each sample size must be at least 30.
- 1 mark for stating the random condition
- 1 mark for stating independence within and between groups, including the 10% condition
- 1 mark for stating the normality condition for each group (approximately normal or sample size at least 30)
- 3.Explain[2 marks]
Explain why a graph of the data is needed to check normality when a group has only 15 observations.
Show mark schemeHide mark scheme
Model answer
With fewer than 30 observations, the sample size does not make the sampling distribution of the mean approximately normal. A graph shows whether there is strong skew or outliers, which would make normality implausible.
- 1 mark for stating that the sample size is below 30, so normality is not guaranteed
- 1 mark for stating that a graph can reveal strong skew or outliers
- 4.Identify[2 marks]
Identify the test statistic for when population standard deviations are unknown, and name the symbols in its denominator.
Show mark schemeHide mark scheme
Model answer
, where and are the sample standard deviations and and are the sample sizes.
- 1 mark for writing the statistic with the difference in sample means over the square-root expression
- 1 mark for naming , , , and correctly
- 5.Justify[3 marks]
Justify why the independence-between-groups condition holds when 40 students are randomly assigned to two different study methods.
Show mark schemeHide mark scheme
Model answer
Each student is assigned to only one group, so the groups contain different individuals. Random assignment means no student is matched or paired with a student in the other group. Therefore one group’s values do not influence the other’s.
- 1 mark for stating that each student appears in only one group
- 1 mark for stating that there is no pairing or matching between groups
- 1 mark for concluding that one group’s values do not influence the other

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyIdentify[1 mark]
Show answer and explanation
Answer: D · Worked explanation
MediumDetermine[1 mark]
Show answer and explanation
Answer: B · Worked explanation
MediumCalculate[1 mark]
Show answer and explanation
Answer: B · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: D · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation
Hard[2 marks]
Show answer and explanation
Answer: A · Worked explanation