This hypothesis testing is useful when it involves a single sample to inference the population proportion.

Suppose pp denotes the proportion in the population. The test statistic to examine is

z=p^p0p0(1p0)nz=\frac{\hat{p}-p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

where p0p_0 is the claimed population proportion, p^\hat{p} is the sample proportion and nn is the sample size. And zz should follow N(0,1)\mathcal{N}(0,1) under H0H_0 hypothesis.

H0H_0 H1H_1 pp-value Decision Rule, if reject H0H_0
p=p0p=p_0 or pp0p\le p_0 p>p0p\gt p_0 - z>zαz\gt z_\alpha
p=p0p=p_0 or pp0p\ge p_0 p<p0p\lt p_0 - z<zαz\lt -z_{\alpha}
p=p0p=p_0 pp0p\ne p_0 - z>zα/2\vert z\vert \gt z_{\alpha/2}

Confidence Interval

p^±zα/2p^(1p^)n\hat{p} \plusmn z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}