What this test does
A one-sample z test for a population proportion checks whether a claimed population proportion p is supported by sample data.
The method uses the fact that, for a large sample, the sample proportion p̂ is approximately normal.
When the “large sample” normal model is reasonable
A common guideline is that the sample size is large enough (under the null value p0) when both expected counts are at least 5:
n·p0 ≥ 5 and n·(1−p0) ≥ 5.
\[
\begin{aligned}
\text{Check:}\quad n\cdot p_0 &\ge 5 \\
n\cdot(1-p_0) &\ge 5
\end{aligned}
\]
Test statistic (z) for a proportion
From a sample with x successes out of n trials, the sample proportion is p̂ = x/n.
Under the null hypothesis H0: p = p0, the standard error is computed using p0.
\[
\begin{aligned}
\hat{p} &= \frac{x}{n} \\
\text{SE}_0 &= \sqrt{\frac{p_0(1-p_0)}{n}} \\
z &= \frac{\hat{p}-p_0}{\text{SE}_0}
\end{aligned}
\]
The p-value approach (step-by-step)
Step 1. State H0 and H1.
H0 uses equality (or ≤/≥). The alternative H1 determines whether the test is two-tailed, left-tailed, or right-tailed.
Step 2. Verify the large-sample condition using p0.
\[
\begin{aligned}
n\cdot p_0 &\ge 5 \\
n\cdot (1-p_0) &\ge 5
\end{aligned}
\]
Step 3. Compute z.
\[
\begin{aligned}
z &= \frac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}}
\end{aligned}
\]
Step 4. Compute the p-value from the standard normal distribution.
Let Z ~ N(0,1). The p-value is the probability (computed under H0) of observing a value at least as extreme as the test statistic.
\[
\begin{aligned}
\text{Two-tailed (}H_1: p \ne p_0\text{):}\quad &p\text{-value} = 2\cdot P(Z \ge |z|) \\
\text{Left-tailed (}H_1: p < p_0\text{):}\quad &p\text{-value} = P(Z \le z) \\
\text{Right-tailed (}H_1: p > p_0\text{):}\quad &p\text{-value} = P(Z \ge z)
\end{aligned}
\]
Step 5. Make a decision at significance level α.
\[
\begin{aligned}
\text{Reject }H_0 &\text{ if } p\text{-value} \le \alpha \\
\text{Do not reject }H_0 &\text{ if } p\text{-value} > \alpha
\end{aligned}
\]
Interpreting the result
A decision to reject H0 means the sample provides statistically significant evidence (at level α) in the direction of H1.
A decision to not reject H0 means the sample does not provide enough evidence to support that alternative at the chosen α.
Reminder: α is the Type I error rate (rejecting a true H0). If you also assume a specific ptrue,
you can estimate β (Type II error) and power (1 − β) using a normal approximation for p̂ under ptrue.