---
title: "H0 is about p1 minus p2. | FiveStudy"
description: "A retailer films two versions of a laptop advertisement. Each version ends with a code a viewer can text. Five hundred volunteers are randomly assigned, 250 to each version. Version A produces 83 text"
url: https://fivestudy.com/guides/apstats-3-12-setting-up-a-two-proportion-test
---

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

# H0 is about p1 minus p2.

[Figure: FiveStudy]

FiveStudy

AP® Statistics · Unit 3 · Inference for Categorical Data: Proportions

AP® Statistics · Unit 3 · Inference for Categorical Data: Proportions

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

How to write hypotheses about p₁ − p₂, name the two-sample z-test, and check its conditions, including the pooled proportion that the normality condition uses because H₀ says the proportions are equal.

1. Parameters and procedure 2. Hypotheses 3. Conditions and pooling 4. Quick reference

The idea in one paragraph

To test whether two groups differ on a yes or no outcome, assume they do not: \(H_0: p_1 = p_2\). Under that assumption the two groups share one proportion, so the normality condition uses the **pooled** (combined) proportion of successes. The procedure is the **two-sample z-test for the difference between two population proportions**.

## 1 Parameters and procedure

The parameters are the two population proportions; the hypotheses are about their difference. Define each one in context, naming the response variable and the population, and keep the order fixed.

Worked Example 1 Hypotheses for an experiment

### Reminder texts

A school randomly assigns 240 students who missed an assignment to receive a reminder text (120) or no text (120). The question: does a reminder text increase the proportion who turn in the work within two days? State the hypotheses and name the procedure.

1. 1Parameters: \(p_1\) = the true proportion of students like these who turn in the work within two days when they get a text; \(p_2\) = the same proportion when they get no text.
2. 2\(H_0: p_1 - p_2 = 0\) (no difference). \(H_a: p_1 - p_2 \gt 0\) (texts increase the proportion).
3. 3Procedure: two-sample z-test for the difference between two population proportions.

**Answer:** H₀: p₁ − p₂ = 0, Hₐ: p₁ − p₂ > 0, tested with a two-sample z-test for a difference in proportions.

## 2 Hypotheses

The null hypothesis says there is no difference: \(H_0: p_1 = p_2\), or equivalently \(H_0: p_1 - p_2 = 0\). The alternative can be one-sided (\(p_1 \gt p_2\) or \(p_1 \lt p_2\)) or two-sided (\(p_1 \ne p_2\)), chosen from the question before the data are seen.

**Figure 1.** Writing the hypotheses as a difference, p₁ − p₂, makes it clear that the parameter of interest is the difference between the two population proportions.

Common Mistake 1 · Writing hypotheses about the sample proportions

\(H_0: \hat{p}_1 = \hat{p}_2\) makes no sense: the sample proportions, 0.70 and 0.55, are known and plainly not equal. The hypotheses are about the population proportions \(p_1\) and \(p_2\).

Worked Example 2 Hypotheses for two random samples

### Walking to school

Independent random samples from two large schools found 33 of 150 students at School 1 and 21 of 160 at School 2 walk to school. Is there a difference in the proportions? Set up the test and check the conditions.

1. 1\(p_1\), \(p_2\) = the proportions of all students at School 1 and School 2 who walk to school. \(H_0: p_1 = p_2\), \(H_a: p_1 \ne p_2\).
2. 2Randomization: independent random samples. 10% condition: 150 and 160 are each no more than 10% of their large schools.
3. 3Pooled proportion: \(\hat{p}_c = 54/310 \approx 0.174\). Expected counts: \(150(0.174) \approx 26.1\), \(150(0.826) \approx 123.9\), \(160(0.174) \approx 27.9\), \(160(0.826) \approx 132.1\): all at least 10.

**Answer:** A two-sided two-sample z-test for a difference in proportions is appropriate.

## 3 Conditions and the pooled proportion

| Condition | Check |
| --- | --- |
| Randomization | Two independent random samples, or a randomized experiment |
| 10% condition | \(n_1 \le 0.10N_1\) and \(n_2 \le 0.10N_2\) when sampling without replacement (not needed for an experiment) |
| Normality | \(n_1\hat{p}_c\), \(n_1(1-\hat{p}_c)\), \(n_2\hat{p}_c\), \(n_2(1-\hat{p}_c)\) all at least 10 |

Here \(\hat{p}_c\) is the combined, or **pooled**, proportion assuming H₀ is true:

\[ \hat{p}_c = \frac{n_1\hat{p}_1 + n_2\hat{p}_2}{n_1 + n_2} = \frac{\text{total successes}}{\text{total sample size}} \]

**Figure 2.** The null hypothesis says the two population proportions are equal. If so, the best single estimate of that shared proportion combines both groups: (84 + 66) / (120 + 120) = 0.625. The test’s normality condition uses this pooled proportion.

Worked Example 3 Check the conditions with the pooled proportion

### Reminder texts

84 of the 120 texted students and 66 of the 120 others turned in their work. Check the conditions for the test.

1. 1Randomization: the treatments were randomly assigned. This is an experiment, so the 10% condition does not apply.
2. 2Pooled proportion: \(\hat{p}_c = \dfrac{84 + 66}{120 + 120} = 0.625\).
3. 3Normality: \(n_1\hat{p}_c = 75\), \(n_1(1 - \hat{p}_c) = 45\), \(n_2\hat{p}_c = 75\), \(n_2(1 - \hat{p}_c) = 45\), all at least 10.

**Answer:** All conditions are met for the two-sample z-test.

Worked Example 4 When the pooled counts are too small

### A small pilot

In a small pilot, 3 of 25 students using a new study app and 1 of 25 using the old one raised their grade by a full letter. Can the two-sample z-test be used?

1. 1\(\hat{p}_c = (3 + 1)/(25 + 25) = 0.08\).
2. 2\(n_1\hat{p}_c = 25(0.08) = 2\), less than 10.

**Answer:** No. The normality condition fails, so the z-test’s p-value would not be trustworthy. A larger study is needed.

Common Mistake 2 · Using the separate sample proportions in the test’s normality check

A confidence interval checks normality with each sample’s own counts, because it assumes nothing about the proportions. A test assumes H₀, under which the proportions are equal, so it uses the pooled proportion. Keep track of which procedure you are doing.

Common Mistake 3 · Applying the 10% condition to an experiment

In a randomized experiment the subjects are not a sample drawn from a larger population, so there is nothing to compare 10% against. The randomization condition is met by the random assignment of treatments.

Say it like this

“Normality: the pooled proportion is p̂c = 150/240 = 0.625. Assuming H₀ is true, the expected numbers of successes and failures in each group are 120(0.625) = 75 and 120(0.375) = 45, all at least 10.”

## 4 Quick reference

| Step | What to write |
| --- | --- |
| Parameters | \(p_1\), \(p_2\) in context; the order of subtraction |
| Hypotheses | \(H_0: p_1 - p_2 = 0\); \(H_a: p_1 - p_2 \gt 0\), \(\lt 0\), or \(\ne 0\) |
| Procedure | Two-sample z-test for the difference between two population proportions |
| Pooled proportion | \(\hat{p}_c\) = total successes ÷ total sample size |
| Conditions | Random samples or random assignment; 10% (samples only); four pooled expected counts ≥ 10 |

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