Two-Proportion z-Test — Definition, Formula & Example
A two-sample z-test for the difference between two population proportions is a hypothesis test that uses data from two independent samples to decide whether two groups have different success rates. One example is whether a higher percentage of students pass with one study method than with another.
Given independent random samples of sizes and with and successes, the test evaluates against , , or . It uses the test statistic . Because assumes the proportions are equal, is computed from the pooled proportion . When is true and are all at least 10, has an approximately standard normal distribution.
Key Formula
Where:
- = sample proportions, and
- = number of successes in each sample
- = sample sizes
- = pooled (combined) sample proportion
- = test statistic, compared to the standard normal distribution
Worked Example
Problem: Students are randomly assigned to two study methods. With flashcards, 120 of 200 students pass. With rereading notes, 100 of 200 pass. At , is there convincing evidence that the pass rates differ?
Step 1: State the hypotheses and . Then find the sample proportions and the pooled proportion. Check the conditions: and are both at least 10.
Step 2: Compute the standard error from the pooled proportion. Then compute .
Step 3: The test is two-sided, so the p-value counts both tails of the standard normal curve.
Answer: The test gives and p-value . This is less than 0.05, so you reject . There is convincing evidence that the pass rates for the two study methods differ.
Why It Matters
This test appears regularly on AP Statistics free-response questions. You must state hypotheses, check conditions, compute , and write a conclusion in context. The same calculation drives A/B testing at tech companies, such as comparing click-through rates for two web page designs. It is also used in clinical trials that compare recovery rates between a treatment group and a placebo group.
Common Mistakes
Mistake: Using the unpooled standard error in the test.
Correction: The null hypothesis assumes , so the test combines both samples into one estimate, . The unpooled standard error belongs to the two-proportion confidence interval, which does not assume the proportions are equal.
