Skip to main content

Two-proportion z-test

The two-proportion z-test compares two population proportions, such as conversion rates in two markets, using a pooled proportion and the normal approximation to compute a z-statistic. A large z indicates a real difference.

ByHoang TruongUpdated

See it move

Loading infographic...

Market A converts 60 of 400 visitors, Market B converts 42 of 350. Pooling gives p̂ = 102/750 = 0.136, with a standard error of 0.0251. The z-statistic, (0.150 − 0.120) ÷ 0.0251, equals 1.20 — well below the 1.96 critical value, so the 3-point gap in conversion rates is not statistically significant.

Where it fits
SubjectData Analysis & StatisticsAdvancedTopicCommon Significance TestsAdvanced

The formula

LaTeX
p^=x1+x2n1+n2\hat p = \dfrac{x_1+x_2}{n_1+n_2}

Variables

Number of successes in sample 1
Number of successes in sample 2
Size of sample 1
Size of sample 2

Combines both samples into one estimate of the common proportion assumed under the null hypothesis.

LaTeX
z=p^1p^2p^(1p^)(1n1+1n2)z = \dfrac{\hat p_1 - \hat p_2}{\sqrt{\hat p(1-\hat p)\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}

Variables

Sample 1 proportion
Sample 2 proportion
Pooled proportion
Size of sample 1
Size of sample 2

Standardises the observed difference in sample proportions to compare against the standard normal distribution.

Two-proportion z-test — Edlintics Glossary