# Z-Test of a Proportion

Jump to navigation Jump to search

Where $\displaystyle{ g }$ is the observed proportion and $\displaystyle{ e }$ is the expected proportion, $\displaystyle{ n }$ is the sample size and $\displaystyle{ d_{eff} }$ is Extra deff:

$\displaystyle{ z = \frac{g - e}{\sqrt{d_{eff}g(1-g)/n}} }$

where $\displaystyle{ p \approx 2(1-\Phi(|z|)= }$ if $\displaystyle{ g \ne e }$ and NaN otherwise.

An alternative version of this test uses Bessel's correction:

$\displaystyle{ z = \frac{p - e}{\sqrt{d_{eff}g(1-g)/(n-1)}} }$