AP Statistics · Topic 3.12 · Reading guide, about 5 min

Hypotheses and pooled conditions for comparing proportions

Set up a two-proportion z-test: define both parameters, write H0 and Ha, find the pooled proportion and check every condition.

In one minute

A two-proportion z-test asks whether two groups really differ in the proportion who have some outcome, or whether the gap in your samples could be chance. Before any calculation, you must say what is being tested and show the data are fit for the procedure.

This topic covers the setup: the two parameters, the null and alternative hypotheses, the pooled proportion, and the conditions. The calculation and conclusion come in 3.13.

Key terms

Two-sample z-test for p1 - p2
A significance test that compares the proportions of two populations or two treatments using a standard normal test statistic.
Parameter
A number describing a population or treatment, here p1p_1 and p2p_2. Hypotheses are always about parameters, never about p^\hat{p} values.
Null hypothesis
H0:p1=p2H_0: p_1=p_2, or equivalently p1−p2=0p_1-p_2=0. It always holds the equality and says there is no difference.
Alternative hypothesis
HaH_a is one of p1<p2p_1 < p_2, p1>p2p_1>p_2 or p1≠p2p_1\neq p_2. The direction comes from the question, written before seeing data.
Pooled proportion
p^c\hat{p}_c, the overall success rate when both samples are combined: total successes divided by total sample size.
Randomization
Data come from independent random samples, or from a randomized experiment with subjects randomly assigned to treatments.
10% condition
If sampling without replacement, each sample is less than 10% of its population. It is not needed in a randomized experiment.
Pooled large counts
The four values n1p^cn_1\hat{p}_c, n1(1−p^c)n_1(1-\hat{p}_c), n2p^cn_2\hat{p}_c and n2(1−p^c)n_2(1-\hat{p}_c) must each be at least 10.

Naming the test and the parameters

Say which test you are using: a two-sample z-test for p1−p2p_1-p_2. Then define both parameters in words that mention the populations or treatments. For example, let p1p_1 be the true proportion of all customers who would complete a purchase if shown the new checkout page, and p2p_2 the true proportion who would complete a purchase if shown the old page.

If the study is an experiment, the parameters describe what would happen under each treatment. If it uses two samples, they describe the two populations. Either way, the symbols p^1\hat{p}_1 and p^2\hat{p}_2 belong to the data, not the hypotheses.

Writing the hypotheses

The null hypothesis says the two proportions are equal: H0:p1=p2H_0: p_1=p_2, or H0:p1−p2=0H_0: p_1-p_2=0. The alternative has three possible forms. Use Ha:p1>p2H_a: p_1>p_2 if the question asks whether group 1 has a higher proportion, Ha:p1<p2H_a: p_1 < p_2 if lower, and Ha:p1≠p2H_a: p_1\neq p_2 if it only asks whether they differ. In difference form these are Ha:p1−p2>0H_a: p_1-p_2>0, p1−p2<0p_1-p_2<0 or p1−p2≠0p_1-p_2\neq 0.

Pick the direction from the question, not from which sample proportion happened to be larger. If the question is "does the new page change the purchase rate," that is two-sided. If a researcher expects the new page to help and states that before the study, a one-sided alternative is fine. The hypotheses must stay consistent with the order of subtraction you chose.

The pooled proportion

The test starts by assuming H0H_0 is true, so both populations share a single true proportion. The best estimate of that shared value uses all the data: p^c=n1p^1+n2p^2n1+n2\hat{p}_c=\dfrac{n_1\hat{p}_1+n_2\hat{p}_2}{n_1+n_2}, which is the total number of successes divided by the total sample size.

Never average the two sample proportions unless the sample sizes are equal. A bigger sample deserves more weight, and the combined-counts formula provides exactly that.

Conditions for the two-proportion z-test
ConditionWhat to checkApplies to
RandomizationIndependent random samples, or random assignment to two treatmentsBoth groups
10% conditionEach sample is less than 10% of its populationSamples only, not experiments
Normalityn1p^cn_1\hat{p}_c, n1(1−p^c)n_1(1-\hat{p}_c), n2p^cn_2\hat{p}_c, n2(1−p^c)n_2(1-\hat{p}_c) all at least 10Uses the pooled proportion

Worked example: setting up the test

An online shop runs a randomized experiment (invented data). Of n1=90n_1=90 visitors randomly shown a new checkout page, 63 completed a purchase. Of n2=110n_2=110 visitors randomly shown the old page, 66 completed a purchase. The shop wants to know whether the new page changes the purchase rate.

Test: two-sample z-test for p1−p2p_1-p_2, where p1p_1 is the true proportion of visitors who would buy with the new page and p2p_2 the true proportion who would buy with the old page. Because the question asks whether the page changes the rate, H0:p1=p2H_0: p_1=p_2 and Ha:p1≠p2H_a: p_1\neq p_2.

Data: p^1=63/90=0.7000\hat{p}_1=63/90=0.7000 and p^2=66/110=0.6000\hat{p}_2=66/110=0.6000. The pooled proportion is p^c=(63+66)/(90+110)=129/200=0.6450\hat{p}_c=(63+66)/(90+110)=129/200=0.6450.

Conditions: visitors were randomly assigned, so randomization holds and the 10% check is not needed. Pooled counts: 90(0.645)=58.0590(0.645)=58.05, 90(0.355)=31.9590(0.355)=31.95, 110(0.645)=70.95110(0.645)=70.95 and 110(0.355)=39.05110(0.355)=39.05. All are at least 10, so the normal model is reasonable, and we can go on to compute the test statistic in 3.13.

Why the test pools and the interval does not

The null hypothesis claims the two proportions are equal. A calculation that assumes H0H_0 is true should therefore use one shared proportion, which is why the test pools. An interval makes no such claim, so it uses each sample proportion separately (see 3.10). If you want to practice, take the same data and compute the pooled counts for a test and the observed successes and failures for an interval, and notice that they are different checks.

How it connects

  • Back to 3.5: this is the two-group version of writing hypotheses and checking conditions for a one-proportion z-test.
  • Back to 3.10: the interval uses observed successes and failures; the test uses pooled expected counts.
  • Back to 1.13: random assignment in an experiment is what justifies the randomization condition and allows a cause-and-effect conclusion.
  • Forward to 3.13: the pooled proportion is used to compute the test statistic and the p-value.

Common mistakes

  • Writing hypotheses about statistics. Use p1p_1 and p2p_2, never p^1=p^2\hat{p}_1=\hat{p}_2.
  • Averaging the two sample proportions to pool. Divide total successes by total sample size.
  • Using observed counts for the normality check in a test. Use the pooled-proportion counts.
  • Picking the alternative after seeing which group is higher. The direction should come from the question.

How it shows up on the exam

  • A scenario describes two groups and asks you to state the parameters and hypotheses in context.
  • A short written prompt asks you to verify each condition using the data, including the pooled counts.
  • A multiple-choice item asks for the pooled proportion or which alternative hypothesis fits a question.

Check yourself

  1. In one sentence, why must the null hypothesis hold an equality?
  2. If one sample were twice as large as the other, how would the pooled proportion differ from a plain average?
  3. Why is the 10% condition unnecessary in a randomized experiment?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.