Set Up the Question Before Looking at the Result
A one-proportion hypothesis test begins with a question about a population, not with a calculation from a sample. That distinction can be easy to lose: the sample supplies evidence, but the hypotheses describe what is being tested about the population. As explained in Writing Null and Alternative Hypotheses for a Proportion and Defining the Parameter in Hypothesis Statements, start by defining \(p\) as the true proportion for the specific population and characteristic in question.
Three setup errors are especially common: writing a hypothesis about \(\hat{p}\) rather than \(p\), putting the observed sample result into \(H_a\), and choosing the alternative direction to match the sample result instead of the research question. Each error confuses the question being tested with the evidence used to answer it.
Error 1: Writing Hypotheses About \(\hat{p}\)
In a one-proportion test, \(p\) is the fixed, unknown true proportion in the population. The sample proportion \(\hat{p}=x/n\) is calculated from the particular sample. If another sample were taken, its \(\hat{p}\) could differ. A hypothesis test uses the observed \(\hat{p}\) to evaluate a claim about \(p\); it does not test whether the sample proportion equals a benchmark.
For example, suppose a question asks whether more than 40% of eligible residents support a proposed transit plan. A correct setup defines \(p\) as the true proportion of eligible residents who support the plan and uses \(H_0:p=0.40\) against \(H_a:p>0.40\). Writing \(H_0:\hat{p}=0.40\) would instead make a claim about one sample statistic. That is not the population claim the question asks about.
A sample proportion can appear in the calculations after the hypotheses are set. For instance, if 126 out of 300 sampled residents support the plan, then \(\hat{p}=126/300=0.42\). That value is the observed sample result. It does not replace \(p\) in the hypotheses, and it does not change the null benchmark.
Error 2: Putting the Sample Result in \(H_a\)
The alternative hypothesis describes the population departure the research question is asking about. It does not record what happened in the sample. Statements such as \(H_a:\hat{p}=0.42\), \(H_a:p=0.42\) because the sample proportion was 0.42, or “\(H_a\): 126 residents support the plan” confuse the observed evidence with the question being tested.
A correct alternative uses \(p\) and a comparison with the benchmark: \(p<p_0\), \(p>p_0\), or \(p\ne p_0\). The sample result belongs later, when calculating the test statistic and p-value. In the transit example, the alternative remains \(H_a:p>0.40\), even though the sample proportion happens to be 0.42. The 0.42 is evidence to assess under the null model, not the alternative hypothesis.
This also explains why the null hypothesis is not rewritten to match the sample. The null supplies the reference value \(p_0\) used by the test. In a standard one-proportion test, it is written \(H_0:p=p_0\). The alternative expresses the research question’s proposed direction or difference from that reference.
Error 3: Choosing the Wrong Direction
The alternative’s direction comes from the wording of the research question, identified before using the sample result. If the question asks whether a proportion is lower, use \(H_a:p<p_0\). If it asks whether the proportion is higher, use \(H_a:p>p_0\). If it asks whether it differs, with either direction relevant, use \(H_a:p\ne p_0\). These choices determine which sample results count as evidence at least as extreme as the observed result.
A tempting but incorrect shortcut is to look at \(\hat{p}\) first and choose a direction that points toward it. A sample proportion above the benchmark does not by itself justify a greater-than alternative. If the original question asks whether the proportion is lower, the correct alternative remains less than—even if the observed sample proportion is higher. The sample may then provide little or no evidence in the direction specified by the question.
Do not treat “not equal” as a backup choice whenever the direction is uncertain. A two-sided alternative asks about departures in either direction. Use it when the question genuinely asks whether the proportion differs from the benchmark, not merely because the sample result points opposite to an anticipated one-sided direction. See Choosing One-Sided or Two-Sided Alternatives for more practice translating research questions into alternatives.
A Reliable Setup Routine
A short routine can prevent all three errors. First identify the population and the characteristic of interest. Next define \(p\) in context. Then write the null benchmark with equality and translate the research question into an alternative. Only after that should you use the observed number of successes and sample size to find \(\hat{p}\) and carry out the test.
Complete: “\(p\) is the true proportion of [specified population] who [meet the specified criterion].”
Use the stated benchmark: \(H_0:p=p_0\).
Choose \(<\), \(>\), or \(\ne\) for \(H_a\) based on the question, not on \(\hat{p}\).
Calculate \(\hat{p}=x/n\) only after the hypotheses are set. Do not insert the sample result into either hypothesis.
Worked Examples
Worked Example: Fixing a Hypothesis About the Sample
A community group wants to know whether more than 35% of eligible households have installed a water-saving showerhead. A random sample of 240 eligible households includes 96 with one installed. A student writes \(H_0:\hat{p}=0.35\) and \(H_a:\hat{p}>0.35\). Identify the errors and write the hypotheses correctly.
Define the parameter: Let \(p\) be the true proportion of eligible households in the community that have installed a water-saving showerhead.
Correct the setup: The question asks whether the population proportion is more than 35%, so the hypotheses are \(H_0:p=0.35\) and \(H_a:p>0.35\). Both hypotheses concern \(p\), not \(\hat{p}\).
Separate the sample result: Here \(x=96\) and \(n=240\), so \(\hat{p}=x/n=96/240=0.40\). The value 0.40 is the observed sample proportion and is evidence for evaluating the hypotheses. It does not belong in \(H_0\) or \(H_a\).
Explain the correction: The student used the sample statistic in both hypotheses. Replacing \(\hat{p}\) with \(p\) makes the claims about the population. The greater-than direction is appropriate because the question asks whether the true population proportion exceeds 0.35, not because the sample proportion is above 0.35.
Worked Example: Do Not Put the Observed Count in the Alternative
A school nurse asks whether fewer than 20% of students at a school have seasonal allergies that require medication during the school day. In a random sample of 150 students, 24 meet that description. One proposed setup is \(H_0:p=0.20\), \(H_a:\text{24 students}\). Another is \(H_0:p=0.20\), \(H_a:p=24/150\). Correct both.
Define the parameter: Let \(p\) be the true proportion of students at this school who have seasonal allergies that require medication during the school day.
Use the question to choose the alternative: “Fewer than 20%” asks whether the population proportion is below 0.20. Thus the correct hypotheses are \(H_0:p=0.20\) and \(H_a:p<0.20\).
Identify the sample evidence: The sample proportion is \(\hat{p}=24/150=0.16\). The observed count, 24, and the observed proportion, 0.16, describe the sample. Neither is an alternative hypothesis. In particular, writing \(H_a:p=24/150\) turns the sample estimate into a claim of exact equality about the population, which is not what the research question asks.
Explain the correction: The alternative expresses a population proportion below the benchmark. The sample result happens to be in that direction, but the alternative would have been \(p<0.20\) even before the sample was collected.
Worked Example: Do Not Reverse the Alternative to Match the Sample
A wildlife team asks whether the true proportion of tagged river turtles that return to a particular nesting site is below the historical benchmark of 50%. From a random sample of 200 tagged turtles in the relevant population, 118 returned. A student sees that the sample proportion is above 50% and proposes a greater-than alternative. Set up and carry out the appropriate one-proportion test at \(\alpha=0.05\).
State: Let \(p\) be the true proportion of tagged river turtles in the population represented by the sampling frame that return to this nesting site. The stated question is whether that proportion is below 0.50, so \(H_0:p=0.50\) and \(H_a:p<0.50\). The observed sample result must not determine the direction.
Plan: Use a one-proportion \(z\)-test. The scenario says the 200 turtles were randomly sampled, supporting the Random condition for the population represented by the sampling frame. The sampling is without replacement from a population of 5,000 tagged turtles, so the 10% condition is met: \(200\leq0.10(5{,}000)=500\). Under the null, the expected success count is \(np_0=200(0.50)=100\), and the expected failure count is \(n(1-p_0)=200(0.50)=100\). Both are at least 10, so the Large Counts condition is met.
Do: Calculate the observed sample proportion and the null standard error:
The test statistic is:
Because \(H_a:p<0.50\), the p-value is the lower-tail probability, \(\text{normalcdf}(-1\text{E}99,2.5456,0,1)\approx0.9945\), rounded. This is a large p-value, so at \(\alpha=0.05\), fail to reject \(H_0\).
Conclude: The sample does not provide convincing evidence that the true proportion of tagged river turtles returning to the nesting site is below 50%. The sample proportion is actually above the benchmark, but that observation does not change the question or its hypotheses. Choosing a greater-than alternative after seeing 0.59 would answer a different research question and would use a direction selected in response to the data.
Common Mistakes and AP Exam Tips
A correct calculation cannot repair hypotheses that do not match the question. Before moving to a test statistic or p-value, check that the parameter, benchmark, and direction are all stated correctly.
- Using \(\hat{p}\) in a hypothesis. This makes the claim about a sample statistic rather than the population. Write \(p\) and define it in context.
- Putting the observed count or proportion into \(H_a\). The sample supplies evidence; it does not define the alternative. Write the population comparison requested by the research question.
- Choosing the direction after seeing the data. This changes the question in response to the observed result. Decide whether the question asks for lower, higher, or different before calculating \(\hat{p}\).
- Using a one-sided alternative for a two-sided question, or vice versa. “Different” means either direction and calls for \(p\ne p_0\). A specific “lower” or “higher” question calls for the corresponding one-sided alternative.
- Leaving \(p\) undefined. A symbol without a population and characteristic is ambiguous. State exactly whose true proportion is being tested and what counts as a success.
Key Takeaway
Hypotheses are about the population proportion \(p\), while \(\hat{p}\) is the sample statistic used as evidence. Keep observed counts and sample proportions out of the hypotheses, and choose the alternative’s direction from the research question before examining the sample result.
Check Your Understanding
For each item, identify or correct the hypothesis setup and explain the reason.
- A student writes \(H_0:\hat{p}=0.60\) to test a claim about the proportion of customers who renew. What symbol should appear in the hypothesis, and what does it represent?
- A survey has \(\hat{p}=0.34\), and the question asks whether the population proportion is lower than 0.40. Write the hypotheses. Should the sample value change the direction?
- A study asks whether a population proportion differs from 0.25. Which alternative is appropriate, and why is a greater-than alternative too narrow?
- A student writes \(H_a:p=18/100\) because 18 of 100 sampled people had the characteristic. Explain why this is not an appropriate alternative for a question asking whether the true proportion exceeds 0.15.
- Before calculating a sample proportion, what information should determine whether \(H_a\) uses \(<\), \(>\), or \(\ne\)?