Z-Test of a Proportion

From Q
Jump to navigation Jump to search

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

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

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

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

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