Two-proportion z test

Definition taught in Hypothesis tests, part of Statistical inference

Two-proportion z test

Type Definition
Taught in Hypothesis tests
Part Statistical inference
Worked examples 1

For independent X_1\sim\operatorname{Bin}(n_1,p_1) and X_2\sim\operatorname{Bin}(n_2,p_2), let \widehat p=(X_1+X_2)/(n_1+n_2). The statistic for H_0:p_1=p_2 is

Z=\frac{\widehat p_1-\widehat p_2}{\sqrt{\widehat p(1-\widehat p)\,(1/n_1+1/n_2)}},

approximately standard normal under H_0 for large samples.

Examples

A two-by-two table is a two-proportion test

Of 70 viewers of one channel, 40 are left-wing; of 100 viewers of another, 50 are. Compute the Pearson statistic for independence of channel and allegiance, and check that it equals the square of the pooled two-proportion z statistic, 0.918.

The table and its fitted counts R_iC_j/170 are

Left Not left Total
Channel 1 40 (37.06) 30 (32.94) 70
Channel 2 50 (52.94) 50 (47.06) 100
Total 90 80 170

Every cell differs from its fitted count by 2.94 in absolute value, so

T=2.94^2\Bigl(\frac1{37.06}+\frac1{32.94}+\frac1{52.94}+\frac1{47.06}\Bigr)=0.843.

The pooled two-proportion statistic is z=0.918, and 0.918^2=0.843. The two statistics agree, and \chi^2_1 is the law of the square of a standard normal. The chi-squared p-value, 0.36, is the two-sided z test’s; the one-sided z test halves it.

Used in

See also

Null and alternative hypotheses · Critical region · p-value · Type I and type II errors · Neyman–Pearson approach · Power function · One-sample t test · Two-sample t test

Glossary and index