Example
A researcher claims that the true percentage of voters who are in favor of a new law is more than 60%. In a random sample of 1,000 voters, 623 voters state that they support the new law. Test the researcher’s claim at the 5% significance level.
Step 1a. We choose one of the three \(H_a\)’s
\[
\begin{array}{ccc}
\begin{array}{l}
H_a: p < p_0
\end{array}
&
\begin{array}{l}
H_a: p > p_0
\end{array}
&
\begin{array}{l}
H_a: p \ne p_0
\end{array}
\end{array}
\]
In our example, it says “test the researcher’s claim,” which is that “the true percentage of voters who are in favor of a new law is more than 60%.” The symbol for “more than” is “\(>\).” So we choose
\[H_a: p > p_0\]
Step 1b. We find the value of \(p_0\).
We want to test that the true percentage of voters who are in favor of the new law is more than 60%. But 60% in decimal form is 0.60, so \(p_0\) is 0.60.
Step 1c. We write down \(H_0\)* and \(H_a\).
\[
\begin{array}{l}
H_0: p = 0.60\\
H_a: p > 0.60
\end{array}
\]
(*Some professors/books put in \(H_0\) the “opposite” of the symbol in \(H_a\). So here, they’d want \(H_0: p\leq 0.60\).)
Step 2. We compute the sample proportion.
\[
\hat p = \frac{x}{n},
\]where $x$ is the number of “successes” in the sample and $n$ is the sample size. In our example, we have $x=623$ and $n=1000$, so
\[
\hat p = \frac{623}{1000}=0.623.
\]
Step 3. We compute the z-test statistic value
The formula for that is
\[
z = \frac{\hat p – p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}.
\]
Here,
\[
z= \frac{0.623 – 0.60}{\sqrt{\frac{0.60(1-0.60)}{1000}}}\approx 1.48.
\]
Step 4. We use the standard normal distribution to get our \(p\)-value.
It’s all about the symbol in \(H_a\): here we have a “\(>\),” which means that our \(p\)-value is the area above our test statistic value, or \(P(Z \ge 1.48)\).
“\(P(Z \ge 1.48)\)” means “the area above 1.48 in a standard normal distribution.” We can find this by using software, or a standard normal distribution table (Z-table).
So,
\[
p\text{-value} = P(Z \ge 1.48) \approx 0.069.
\]
Step 5. We write our conclusion.
This is the rule we use (and that is used in all standard hypothesis tests):
If \(p\text{-value} \le \alpha\), we reject \(H_0\); there is sufficient evidence to support \(H_a\) at significance level \(\alpha\).
If \(p\text{-value} \gt \alpha\), we do not reject \(H_0\); there is not sufficient evidence to support \(H_a\) at the significance level \(\alpha\).
In our example, \(\alpha=5\%=0.05\).
Since \(p\text{-value}=0.069 \gt \alpha=0.05\), we do not reject \(H_0\); there is insufficient evidence to support the claim that more than 60% of voters are in favor of the new law at the 5% significance level.
So this is how we do a one-sample proportion test (also known as “z-test for a population proportion”).