Mistake Master
Student view — seeing the site as a student does
Home Unit 3 · Inference for Categorical Data: Proportions 3.1·3.2·3.3·3.4·3.5·3.6·3.7·3.8·3.9·3.10·3.11·3.12·3.13·3.14·3.15 Lesson
Skill Check 0 / 10 complete

One claim about two parameters

The two-proportion test asks one question: could the gap between these two samples have come from two populations with the same proportion. That framing sets everything up. The null names no particular value, only equality; the alternative carries the direction from the research question; and because the null says the two populations share one proportion, the test estimates that single proportion from both samples at once.

§1

Two parameters, one claim about their difference.

Define both parameters in context first, then write the hypotheses:

$$H_0: p_1 = p_2 \qquad \text{equivalently} \qquad H_0: p_1 - p_2 = 0,$$

against one of $H_a: p_1 - p_2 > 0$, $< 0$, or $\ne 0$.

For the checkout study, $p_1$ is the proportion of all shoppers who would complete a purchase using the new system and $p_2$ the proportion who would using the old one. If the company wants to know whether the new system does better, the pair is $H_0: p_1 = p_2$ against $H_a: p_1 > p_2$.

Three setups that look like hypotheses and are not:

  1. $H_0: p_1 = 0.46$ and $p_2 = 0.36$. That states two separate values, both taken from the samples, and leaves nothing to test.
  2. $H_0: \hat{p}_1 = \hat{p}_2$. The sample proportions are 0.46 and 0.36; they are known and plainly unequal.
  3. $H_0: p_1 - p_2 = 0.10$. The observed difference is not a hypothesis; it is the evidence being weighed.

The null names no numerical value for either proportion, which is exactly what makes the next section's pooling possible.

§2

The null says one proportion, so the test estimates one proportion.

Under $H_0$, the two populations share a single common proportion. Both samples are then estimating the same thing, and the best estimate of it uses all the data:

$$\hat{p}_c = \frac{x_1 + x_2}{n_1 + n_2}.$$

For the checkout study, $\hat{p}_c = \frac{138 + 90}{300 + 250} = \frac{228}{550} \approx 0.4145$. The standard error of the difference then uses that one proportion with both sample sizes:

$$SE = \sqrt{\hat{p}_c(1 - \hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)} = \sqrt{0.4145(0.5855)\left(\frac{1}{300} + \frac{1}{250}\right)} \approx 0.0422.$$

This is the mirror image of Topic 3.10. An interval estimates the difference and assumes nothing, so it keeps the groups apart. A test assumes they are the same, so it merges them. Using the interval's unpooled standard error in a test, or the test's pooled one in an interval, mismatches the formula to the assumption.

Note that $\hat{p}_c$ is a weighted average, not the average of the two sample proportions. Here $\frac{0.46 + 0.36}{2} = 0.41$ happens to land close, because the samples are of similar size; with 900 and 100 it would not.

§3

Conditions: two of everything, plus independence between the groups.

Written with the study's numbers:

  1. Random: both groups randomly sampled, or subjects randomly assigned to the two conditions.
  2. Independence between groups: no individual appears in both.
  3. 10%: each sample at most a tenth of its own population, checked separately.
  4. Large counts: all four counts at least 10, using the observed successes and failures: 138 and 162, then 90 and 160.

Some treatments check the counts against $\hat{p}_c$ instead; on the AP exam the observed counts are what is expected, and with all four comfortably above 10 the two versions agree. What is not optional is checking all four, and writing them down.

§4

The design decides whether this is the right test at all.

Before any of the above, one question: are there two independent groups?

Two independent samples, or one sample randomly split into two treatment groups, qualify. What does not qualify is a design in which the same individuals are measured twice, or in which individuals are matched into pairs. Those are paired designs, and the two-proportion machinery does not apply: its standard error is derived from the variances adding, which requires independence.

The random-assignment question is separate and decides the conclusion rather than the procedure. If shoppers were randomly assigned to the two systems, a significant result supports a causal claim. If the two groups were simply observed, the same result supports an association, and any number of differences between the groups could be producing it. The test statistic is identical either way; the sentence at the end is not.

§5

Skill Check.

Ten scenarios. Pick the chips that match your answer, then check. A scenario marks complete the first time every part is right. Progress saves on this device.

0 of 10 scenarios complete