---
title: "H0 is about μ1 minus μ2. | FiveStudy"
description: "A learning center runs two review methods before a certification exam. Sixty-seven volunteers are randomly assigned, 32 to method A and 35 to method B. Everyone takes the same exam. Method A averaged "
url: https://fivestudy.com/guides/apstats-4-9-setting-up-a-two-mean-test
---

[AP Statistics](https://fivestudy.com/ap-statistics) · Study guide

# H0 is about μ1 minus μ2.

[Figure: FiveStudy]

FiveStudy

AP® Statistics · Unit 4 · Inference for Quantitative Data: Means

AP® Statistics · Unit 4 · Inference for Quantitative Data: Means

# Setting Up a Test for a *Difference* in Means

How to choose the two-sample t-test, define μ₁ and μ₂ in context, write the hypotheses, and check the conditions for both samples.

1. Which procedure? 2. Hypotheses 3. Conditions

The idea in one paragraph

To test whether two separate groups have different population means, assume they do not: \(H_0: \mu_1 - \mu_2 = 0\). The procedure is the **two-sample t-test for a difference between two population means**. It needs two independent random samples or a randomized experiment, the 10% condition for samples, and a sample data condition that applies to *both* groups.

## 1 Which procedure, which parameters?

The appropriate test for the difference between two population means is a two-sample t-test. Define both parameters in context, naming the response variable and the populations (or treatments). Keep the same order of subtraction throughout.

**Figure 1.** The design decides the procedure. Two separate groups, from two independent random samples or two randomly assigned treatments, call for the two-sample t-test. If the values come in linked pairs, subtract within pairs instead.

Worked Example 1 Hypotheses for an experiment

### Two fertilizers

Twenty seedlings were randomly assigned to fertilizer A or B, 10 each. The grower wants to know whether A produces taller seedlings after 4 weeks. State the parameters, hypotheses, and procedure.

1. 1Parameters: \(\mu_A\), \(\mu_B\) = the true mean heights (cm) after 4 weeks of seedlings like these grown with fertilizer A and with fertilizer B.
2. 2\(H_0: \mu_A - \mu_B = 0\). \(H_a: \mu_A - \mu_B \gt 0\), because the question asks whether A is taller.
3. 3Two separate groups, \(\sigma\) unknown: two-sample t-test for a difference between two population means.

**Answer:** H₀: μA − μB = 0, Hₐ: μA − μB > 0; two-sample t-test.

Common Mistake 1 · Choosing the two-sample test for paired data

If each value in one group is linked to a value in the other (the same person twice, or twins), the samples are not independent. Use a one-sample t-test on the differences instead.

## 2 Hypotheses

The null hypothesis says the means are equal: \(H_0: \mu_1 - \mu_2 = 0\), or \(H_0: \mu_1 = \mu_2\). The alternative is one-sided (\(\mu_1 \gt \mu_2\) or \(\mu_1 \lt \mu_2\)) or two-sided (\(\mu_1 \ne \mu_2\)), chosen from the question before the data are seen.

**Figure 2.** Either form is fine. Writing the parameter as a difference, μ₁ − μ₂, keeps the order of subtraction visible all the way to the conclusion.

Worked Example 2 Hypotheses and conditions for two random samples

### Commute times

Independent random samples of 40 students at School A (1,200 students) and 45 at School B (900 students) recorded commute times. Is there a difference in mean commute time? Set up the test.

1. 1\(\mu_A\), \(\mu_B\) = the true mean commute times (minutes) of all students at School A and School B.
2. 2\(H_0: \mu_A = \mu_B\). \(H_a: \mu_A \ne \mu_B\): no direction is given.
3. 3Randomization: two independent random samples. 10% condition: 40 ≤ 120 and 45 ≤ 90. Sample data: both samples have at least 30.

**Answer:** A two-sided two-sample t-test is appropriate.

Common Mistake 2 · Writing hypotheses about the sample means

\(H_0: \bar{x}_A = \bar{x}_B\) is wrong: the sample means are known and differ. Hypotheses are about the population means, \(\mu_A\) and \(\mu_B\).

## 3 Conditions

| Condition | Check |
| --- | --- |
| Randomization | Two independent random samples, or a randomized experiment |
| 10% condition | \(n_1 \le 10\%N_1\) and \(n_2 \le 10\%N_2\) when sampling without replacement (not needed for an experiment) |
| Sample data | Both \(n_1 \ge 30\) and \(n_2 \ge 30\), or both populations approximately normal. If either sample is under 30, both samples’ data must be free from strong skewness and outliers |

Worked Example 3 Conditions for small samples

### Two fertilizers

Check the conditions for the fertilizer test. Heights (cm): A: 24.1, 26.3, 22.8, 25.5, 27.0, 23.9, 25.2, 26.8, 24.6, 25.8; B: 22.4, 23.9, 21.7, 24.8, 22.1, 23.0, 25.1, 21.9, 23.6, 22.5.

1. 1Randomization: the fertilizers were randomly assigned. This is an experiment, so the 10% condition does not apply.
2. 2Sample data: both samples have 10, fewer than 30, so graph both. Dotplots of A (22.8 to 27.0) and B (21.7 to 25.1) show no strong skewness or outliers.

**Answer:** All conditions are met.

**Figure 3.** Both groups have fewer than 30, so both must be free from strong skewness and outliers. The caffeine group passes; the placebo group has an outlier at 84 (upper fence 59.5 + 1.5 × 6 = 68.5), so the two-sample t-test is not appropriate as is.

Worked Example 4 When a condition fails

### Caffeine and typing speed

Twenty-four volunteers were randomly assigned to caffeine or a placebo, 12 each, and their typing speeds were recorded (Figure 3). Is a two-sample t-test appropriate?

1. 1Randomization: random assignment, so this condition is met.
2. 2Both samples are under 30, so both must be free from strong skewness and outliers.
3. 3Placebo: Q1 = 53.5, Q3 = 59.5, IQR = 6, upper fence 68.5. The value 84 is an outlier.

**Answer:** No. The sample data condition fails for the placebo group, so the t-test’s p-value would not be trustworthy.

Common Mistake 3 · Checking only the smaller sample

When either sample is under 30, the condition covers both. A clean caffeine group does not make up for an outlier in the placebo group.

Say it like this

“Sample data condition: both samples have fewer than 30, but dotplots of the heights for fertilizer A and fertilizer B show no strong skewness or outliers, so a two-sample t-test is reasonable.”

### Quick reference

| Step | What to write |
| --- | --- |
| Procedure | Two-sample t-test for a difference between two population means |
| Parameters | \(\mu_1\), \(\mu_2\): true mean [variable] for [population 1], [population 2] |
| Hypotheses | \(H_0: \mu_1 - \mu_2 = 0\); \(H_a: \mu_1 - \mu_2 \gt 0\), \(\lt 0\), or \(\ne 0\) |
| Conditions | Independent random samples or random assignment; 10% for each sample; sample data condition for both groups |

FiveStudy AP® Statistics · Setting up a test for a difference in means
