Two-proportion z statistic
Test whether two independent population proportions differ.
Two-proportion z statistic is one of 2 inference formulas in the statistics section of this library, and it is used at ap · university level.
Why two-proportion z statistic works
The null hypothesis says both groups share a single success rate, so the best estimate of that rate uses every observation from both groups combined. The pooled value then builds one standard error for the difference, and the two reciprocal sample sizes add because the groups are independent.
What each symbol means
$\hat p$ is the pooled success proportion under the equal-proportions null.
Two-proportion z statistic: when it holds
Samples must be independent and expected success and failure counts sufficiently large.
When it stops applying
It assumes two independent samples with enough expected successes and failures in each group under the pooled rate. It does not apply when the same people are measured under both conditions, where the pairing carries the information and McNemar's test is the correct procedure.
Two-proportion z statistic: a worked example
Pool successes across both groups only for the null-test standard error.
The mistake to avoid
What people do: Using each group's own sample proportion inside the standard error for a hypothesis test.
Why it goes wrong: That is the formula for a confidence interval, where no common rate is assumed. In a test the null supplies extra information, and ignoring it produces the wrong standard error and the wrong p-value.
Do this instead: Pool the successes and the trials across both groups first, then use that single proportion in both places inside the square root.
Two-proportion z statistic: step by step
- Name the unknown, and the unit the answer has to come out in.
- Match the symbols to your values. $\hat p$ is the pooled success proportion under the equal-proportions null.
- Check the conditions before substituting. Samples must be independent and expected success and failure counts sufficiently large.
- Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most statistics slips.
Where this formula fits
- Subject
- Statistics formulas — 21 entries in this library
- Topic
- Inference
- Level
- AP · University
Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where two-proportion z statistic comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.
- Standard Deviation — the lesson behind this formula: measure typical distance from the mean.
- Statistics Calculator — check your substitution and the value it produces.
- Study statistics — the subject guide that explains the ideas these formulas compress.
- Statistics Practice — questions that make you retrieve the formula instead of recognising it.
- All 21 statistics formulas — the full grouped reference, or the complete formula library.
Questions about two-proportion z statistic
Why pool for the test but not for the interval?
Because the test assumes the two rates are equal and the interval does not. Under the null there is one common rate worth estimating from all the data; when estimating a difference, each group speaks for itself.
How many successes are enough?
The usual guideline is at least ten successes and ten failures in each group. Below that, the normal shape is a poor stand-in for the discrete counts and an exact method is safer.
Is this equivalent to a chi-square test on a two-by-two table?
Yes, for a two-sided test. With 30 of 100 against 45 of 100, the statistic is about -2.191 and its square is 4.80, matching the chi-square value of 4.80 exactly.
What does the zero in the numerator represent?
It is the difference claimed by the null hypothesis, namely no difference at all. If you were testing a specific nonzero gap, you would subtract that value instead and stop pooling.