# Paired Z-Test of Proportions

Jump to navigation Jump to search

Where $\displaystyle{ g_1 }$ and $\displaystyle{ g_2 }$ are the two proportions and $\displaystyle{ s_{g_1 - g_2} }$ is an estimate of the standard error of the difference between the proportions:

$\displaystyle{ z=\frac{g_1-g_2}{\sigma_{g_1-g_2}} }$

where:

$\displaystyle{ p \approx 2(1-\Phi(|z|)) }$ if $\displaystyle{ g_1 \ne g_2 }$ and NaN otherwise,
$\displaystyle{ s_{g_1 - g_2} }$ is computed as the Standard Error of $\displaystyle{ d }$,
the value for the $\displaystyle{ i }$th observation is computed as $\displaystyle{ d_i = x_1 - x_2 }$,
$\displaystyle{ x_1,x_2 \in {\{0,1\}} }$ are the observed values on the two variables.