AP Statistics · Topic 3.5 · Reading guide, about 4 min

Hypotheses and conditions for a one-proportion z-test

How to name the test, write null and alternative hypotheses about p in context, and check the conditions before testing.

In one minute

A hypothesis test starts with a claim about a population and asks whether sample data give convincing evidence against it. Before any calculation, you have to set the question up correctly: say what the parameter is, write the two competing hypotheses, and confirm the data are suited to a normal-based test.

Setup is where many free-response points are won or lost. A correct calculation attached to the wrong hypotheses earns very little.

Key terms

Hypothesis test
A procedure that uses sample data to decide whether there is convincing evidence for a claim about a parameter.
One-sample z-test for pp
The test of a claim about a single population proportion using a normal model.
Null hypothesis H0H_0
The status-quo claim, always stated with equality: H0 ⁣:p=p0H_0\colon p = p_0.
Alternative hypothesis HaH_a
The claim the researcher is looking for evidence of: p<p0p < p_0, p>p0p > p_0 or p≠p0p \ne p_0.
Null value p0p_0
The specific proportion named in the null hypothesis.
One-sided alternative
An alternative that points in one direction, either less than or greater than p0p_0.
Two-sided alternative
An alternative that allows a difference in either direction, p≠p0p \ne p_0.
Expected successes and failures
The counts np0np_0 and n(1−p0)n(1-p_0), which must each be at least 10 for the normal model.

Naming the test and defining the parameter

Begin with the name: "one-sample z-test for pp." Then define pp in context, with the proportion, the response and the whole population: "pp is the proportion of all students at this school who bring lunch from home." The hypotheses are always about this parameter. They are never about p^\hat{p}, because the sample result is known and not in doubt; the question is about the population.

Writing the null and the alternative

The null hypothesis is the status quo, the claim that nothing has changed or the stated value is correct. It always contains equality: H0 ⁣:p=p0H_0\colon p = p_0. The alternative is what the investigator suspects or wants to find evidence for, and its direction comes from the question, not from the data you happened to see.

Read the wording of the question. "Has the proportion changed?" gives p≠p0p \ne p_0. "Is it higher?" or "more than" gives p>p0p > p_0. "Is it lower?" or "less than" gives p<p0p < p_0. Decide the direction before looking at the sample result.

Matching wording to hypotheses
SituationHypotheses
A school says 40% of students bring lunch. The principal wonders whether this has changed.H0 ⁣:p=0.40H_0\colon p = 0.40, Ha ⁣:p≠0.40H_a\colon p \ne 0.40
A manufacturer says the defect rate is 5%. An inspector suspects it is higher.H0 ⁣:p=0.05H_0\colon p = 0.05, Ha ⁣:p>0.05H_a\colon p > 0.05
A coach claims a player makes 70% of free throws. The player thinks the true rate is lower.H0 ⁣:p=0.70H_0\colon p = 0.70, Ha ⁣:p<0.70H_a\colon p < 0.70

Checking the conditions

Three checks, each in context. Random: the sample was randomly selected from the population (or a randomized experiment is used). 10% condition: if sampling without replacement, n≤0.10Nn \le 0.10N, which supports independence. Normality: np0≥10np_0 \ge 10 and n(1−p0)≥10n(1-p_0) \ge 10.

The normality check uses p0p_0, because the test works in a world where H0H_0 is true. That differs from the interval, which uses the observed counts. Both counts matter, and if the claimed proportion is near 0 or 1, you need a large sample.

Worked example: setting up and checking

The principal's claim: 40% of students bring lunch. A random sample of n=120n = 120 students is taken from N=1,800N = 1{,}800, and the principal wants to know whether the true proportion has changed. Here pp is the proportion of all students at this school who bring lunch from home. The hypotheses are H0 ⁣:p=0.40H_0\colon p = 0.40 and Ha ⁣:p≠0.40H_a\colon p \ne 0.40.

Conditions: the students were randomly selected. The 10% condition holds since 120≤0.10(1800)=180120 \le 0.10(1800) = 180. The expected counts are np0=120(0.40)=48≥10np_0 = 120(0.40) = 48 \ge 10 and n(1−p0)=120(0.60)=72≥10n(1-p_0) = 120(0.60) = 72 \ge 10. All conditions are met, so the normal model for p^\hat{p} is appropriate and a one-sample z-test for pp can proceed.

Now a case where the check fails. An inspector tests H0 ⁣:p=0.05H_0\colon p = 0.05 with a random sample of n=150n = 150 items from a very large shipment. Then np0=150(0.05)=7.5np_0 = 150(0.05) = 7.5, which is less than 10, so a normal model is not appropriate and the z-test is not justified. With n=200n = 200, np0=10np_0 = 10 and n(1−p0)=190n(1-p_0) = 190, and both counts are at least 10, so the test would be justified.

How it connects

  • Back to 3.2: the test relies on the sampling distribution of p^\hat{p} with pp replaced by p0p_0.
  • Back to 3.3: an interval checks counts from the sample, while a test checks counts from p0p_0.
  • Forward to 3.6: you will learn what a p-value measures once the test is set up.
  • Forward to 3.7: you will compute the test statistic and conclude.

Common mistakes

  • **Writing hypotheses about p^\hat{p}.** Hypotheses describe the population parameter pp. The sample proportion is data.
  • Picking the alternative after seeing the data. The direction comes from the research question, not from whether p^\hat{p} came out above or below p0p_0.
  • **Putting an inequality in H0H_0.** Always write H0H_0 with equality, such as p=0.40p = 0.40.
  • **Checking np^n\hat{p} instead of np0np_0.** In a test, use the null value for the normality check.

How it shows up on the exam

  • A scenario describes a claim and a sample, and you state the hypotheses with the parameter defined in context.
  • A multiple-choice item asks which pair of hypotheses fits a research question, or which condition check applies.
  • A full test question asks for a name, conditions and then the rest of the test, with the first two parts worth separate credit.

Check yourself

  1. Why does the null hypothesis always contain equality?
  2. A researcher suspects a drug causes more side effects than the stated 8%. Write H0H_0 and HaH_a.
  3. Why do we check np0np_0 and n(1−p0)n(1-p_0) in a test rather than np^n\hat{p}?
  4. What does pp stand for in a test about voter turnout at a college?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.