Zdata=ˆp-p0√p0·q0n
where ˆp is the observed sample proportion of successes, p0 is the value of p hypothesized in H0, q0=1-p0, and n is the sample size. Zdata represents the number of standard deviations (σˆp) the sample proportion ˆp lies above or below the hypothesized proportion p0. Extreme values of ˆp will be associated with extreme values of Zdata. The Z test for the proportion may be performed using either the p-value method or the critical-value method. For the critical-value method, we compare the values of Zdata and Zcrit. If Zdata falls in the critical region, we reject H0.