Z-Test of a Proportion

From Q
Jump to: navigation, search

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

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

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

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

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