One-Proportion Z-Test, Step by Step (Worked Example)

By Jude Wallis · Published

A one-proportion z-test takes four steps: state hypotheses about the population proportion $p$, check random, 10%, and large counts using $p_0$, compute $z = (\hat{p} - p_0)/\sqrt{p_0(1-p_0)/n}$, then find the p-value and conclude in context.

AP Statistics: Unit 3 (topics 3.5 Setting Up a Test for a Population Proportion, 3.6 p-Values, 3.7 Carrying Out a Test for a Population Proportion). This walkthrough covers Unit 3 topics 3.5 to 3.7 of the Fall 2026 AP Statistics course, where the one-sample z-test for a population proportion is set up, carried out, and justified.

The four steps of a one-proportion z-test

A one-proportion z-test asks whether a single population proportion equals some claimed value. Every version of the test runs the same four steps, and AP scoring awards points one step at a time.

  1. State the parameter and the two hypotheses, both about the population proportion.
  2. Check three conditions: random, 10%, and large counts, using the null value.
  3. Compute the standardized test statistic and the p-value.
  4. Conclude by comparing the p-value to α\alpha and writing a sentence in context.

One example runs through this entire page. A game designer says a redesigned puzzle is a coin flip: half of first-time players solve it. In a random sample of 100 first-time players, 62 solve it. So n=100n = 100, the count of successes is 62, and the hypothesized value is p0=0.5p_0 = 0.5 (read "p-naught").

Two symbols do most of the work. pp is the population proportion, the unknown number the claim is about. p^\hat{p} (read "p-hat") is the sample proportion, the fraction of successes you actually observed. Keeping those two apart is what the rest of this page is about.

Step 1: write hypotheses about p, never about p-hat

Define the parameter in words first, then write the two hypotheses.

Let pp be the true proportion of all first-time players who solve the redesigned puzzle. Then

H0:p=0.5Ha:p0.5H_0: p = 0.5 \qquad H_a: p \neq 0.5

The null hypothesis H0H_0 (read "H-naught") sets pp equal to the claimed value p0p_0. The alternative HaH_a states what you are collecting evidence for. Use \neq when the question asks whether the proportion differs, and >> or << when the question names a direction.

Never write H0:p^=0.5H_0: \hat{p} = 0.5. You already know p^\hat{p} exactly: it is 0.62 in this sample. A hypothesis is a claim about something unknown, and the only unknown here is pp. Guidance on wording both hypotheses is in null vs alternative hypothesis.

Pick the direction from the question before you look at the data. Choosing Ha:p>0.5H_a: p > 0.5 because p^\hat{p} landed above 0.5 is circular reasoning, and it halves your p-value for free. The AP course covers this under setting up a test for a population proportion.

Step 2: check the three conditions with the null value

The one-sample z-test for a population proportion requires three conditions, and the AP course lists them explicitly.

  • Random. The data come from a random sample or a randomized experiment.
  • 10%. When sampling without replacement, the population is at least 10 times the sample size, so n0.10Nn \leq 0.10N.
  • Large counts (normality). The expected counts under the null hypothesis are at least 10: np010np_0 \geq 10 and n(1p0)10n(1 - p_0) \geq 10.

For the puzzle example, the 100 players are a random sample, which settles the first condition. They are fewer than 10% of all first-time players as long as the game has at least 1,000 of them. For large counts, np0=100(0.5)=5010np_0 = 100(0.5) = 50 \geq 10 and n(1p0)=100(0.5)=5010n(1 - p_0) = 100(0.5) = 50 \geq 10.

Both counts use p0p_0, not p^\hat{p}. A test assumes the null hypothesis is true while it runs, so every quantity inside the test is computed under that assumption. A confidence interval assumes no null value, which is why its version of this condition uses the observed counts np^n\hat{p} and n(1p^)n(1-\hat{p}) instead. Why 10 successes and 10 failures explains where the threshold comes from.

Show the arithmetic. Writing "large counts met" without the two products is the most common way to lose the condition point.

Step 3: compute the test statistic

The standardized test statistic counts how many standard deviations p^\hat{p} sits from p0p_0:

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

Work the denominator first. It is the standard deviation of the sampling distribution of p^\hat{p} when H0H_0 is true, and it is the piece students get wrong most often.

For the puzzle example, p^=62100=0.62\hat{p} = \frac{62}{100} = 0.62 and

p0(1p0)n=0.5(0.5)100=0.25100=0.0025=0.05\sqrt{\frac{p_0(1 - p_0)}{n}} = \sqrt{\frac{0.5(0.5)}{100}} = \sqrt{\frac{0.25}{100}} = \sqrt{0.0025} = 0.05

Then

z=0.620.50.05=0.120.05=2.4z = \frac{0.62 - 0.5}{0.05} = \frac{0.12}{0.05} = 2.4

A z of 2.4 says the observed sample proportion sits 2.4 standard deviations above the value the null hypothesis predicts. The proportion z-test calculator reproduces this value if you want to check your work.

Step 4: find the p-value and compare it to alpha

The p-value is the probability, computed assuming H0H_0 is true, of a test statistic at least as extreme as the one you got. The tail you use comes from HaH_a.

  • Ha:p>p0H_a: p > p_0 gives P(Zz)P(Z \geq z).
  • Ha:p<p0H_a: p < p_0 gives P(Zz)P(Z \leq z).
  • Ha:pp0H_a: p \neq p_0 gives P(Zz)+P(Zz)P(Z \leq -|z|) + P(Z \geq |z|), which is twice one tail.

The puzzle test is two-sided, so use both tails. From the z-table, P(Z<2.4)=0.9918P(Z < 2.4) = 0.9918, so one tail is 10.9918=0.00821 - 0.9918 = 0.0082 and the p-value is 2(0.0082)=0.01642(0.0082) = 0.0164.

Now compare to the significance level α\alpha (the Greek letter alpha), the false alarm rate you fixed in advance. With α=0.05\alpha = 0.05 you have 0.0164<0.050.0164 < 0.05, so reject H0H_0. For what that number does and does not say, see what does a p-value mean.

Writing the conclusion in context

A conclusion needs three pieces: the comparison, the decision, and the context. Dropping the context is what turns a full-credit answer into a partial one.

Template. Because the p-value of 0.0164 is less than α=0.05\alpha = 0.05, we reject H0H_0. There is convincing statistical evidence that the true proportion of first-time players who solve the redesigned puzzle differs from 0.5.

If the p-value had come out above α\alpha, the wording changes to "we fail to reject H0H_0" and "there is not convincing statistical evidence that ...". You never accept H0H_0, and you never say the proportion equals p0p_0. A large p-value means the data are consistent with p0p_0, not that p0p_0 is correct.

You can also interpret the p-value itself. If the true solve rate really were 0.5, about 1.64% of random samples of 100 players would produce a sample proportion at least as far from 0.5 as 0.62 is, in either direction.

The mistake that costs the most points: p-hat in the standard error

The single most common error on this test is using p^\hat{p} in place of p0p_0 inside the square root. The whole procedure runs under the assumption that H0H_0 is true, so the standard deviation of p^\hat{p} has to be built from the null value: p0(1p0)/n\sqrt{p_0(1 - p_0)/n}.

Watch what the swap does here. The correct denominator is 0.5(0.5)/100=0.05\sqrt{0.5(0.5)/100} = 0.05, giving z=2.4z = 2.4 and a two-sided p-value of 0.0164. The wrong denominator is 0.62(0.38)/100=0.0023560.04854\sqrt{0.62(0.38)/100} = \sqrt{0.002356} \approx 0.04854, giving z2.47z \approx 2.47 and a two-sided p-value of about 0.0135.

Both versions reject at α=0.05\alpha = 0.05, so this time the mistake hides. It does not always, and it does not even push in a fixed direction. Take n=200n = 200, p0=0.30p_0 = 0.30, and p^=0.37\hat{p} = 0.37: the correct statistic is z2.16z \approx 2.16 with a one-sided p-value of 0.0154, while the p^\hat{p} version gives z2.05z \approx 2.05 and 0.0202. Near a cutoff, a gap that size flips the decision.

The rule worth memorizing is short: **tests use p0p_0, intervals use p^\hat{p}.** An interval has no null value to borrow, so it must estimate the standard error from the sample. That difference is also why a confidence interval and a p-value can disagree in borderline cases. When the claim involves two groups rather than one, switch procedures entirely (one-proportion vs two-proportion z-test).

The full four-step test: 62 solves in 100 players

A game designer says a redesigned puzzle is a coin flip, so half of first-time players solve it. In a random sample of 100 first-time players, 62 solve it. Test at α=0.05\alpha = 0.05 whether the true proportion of first-time players who solve the puzzle differs from 0.5.

  1. State the parameter and hypotheses. Let pp be the true proportion of all first-time players who solve the redesigned puzzle. H0:p=0.5H_0: p = 0.5 and Ha:p0.5H_a: p \neq 0.5, with α=0.05\alpha = 0.05.

  2. Check the conditions. The 100 players are a random sample. They are fewer than 10% of all first-time players. Using p0=0.5p_0 = 0.5, the expected counts are np0=100(0.5)=5010np_0 = 100(0.5) = 50 \geq 10 and n(1p0)=100(0.5)=5010n(1 - p_0) = 100(0.5) = 50 \geq 10.

  3. Find the sample proportion. p^=62100=0.62\hat{p} = \frac{62}{100} = 0.62.

  4. Find the standard deviation of p^\hat{p} under H0H_0. p0(1p0)n=0.5(0.5)100=0.25100=0.0025=0.05\sqrt{\frac{p_0(1 - p_0)}{n}} = \sqrt{\frac{0.5(0.5)}{100}} = \sqrt{\frac{0.25}{100}} = \sqrt{0.0025} = 0.05.

  5. Compute the test statistic. z=0.620.50.05=0.120.05=2.4z = \frac{0.62 - 0.5}{0.05} = \frac{0.12}{0.05} = 2.4.

  6. Find the p-value. The alternative is two-sided, so the p-value is 2×P(Z2.4)2 \times P(Z \geq 2.4). From the z-table, P(Z<2.4)=0.9918P(Z < 2.4) = 0.9918, so P(Z2.4)=10.9918=0.0082P(Z \geq 2.4) = 1 - 0.9918 = 0.0082 and the p-value is 2(0.0082)=0.01642(0.0082) = 0.0164.

  7. Compare and decide. Because 0.0164<0.050.0164 < 0.05, reject H0H_0.

  8. Write the conclusion in context. There is convincing statistical evidence that the true proportion of first-time players who solve the redesigned puzzle differs from 0.5.

p^=0.62\hat{p} = 0.62, standard deviation 0.050.05, z=2.4z = 2.4, two-sided p-value =2(0.0082)=0.0164= 2(0.0082) = 0.0164. Because 0.0164<0.050.0164 < 0.05, reject H0H_0 and conclude the solve rate differs from 0.5.

A one-sided test, where only one tail counts

A campus bike-share operator states that 30% of trips end at the main library rack. A student pulls a random sample of 200 trips from the system log and finds 74 that end there. Test at α=0.05\alpha = 0.05 whether the true proportion of all trips ending at the library rack is greater than 0.30.

  1. State the parameter and hypotheses. Let pp be the true proportion of all bike-share trips that end at the library rack. H0:p=0.30H_0: p = 0.30 and Ha:p>0.30H_a: p > 0.30, with α=0.05\alpha = 0.05.

  2. Check the conditions. The 200 trips are a random sample and are fewer than 10% of all trips in the system log. Using p0=0.30p_0 = 0.30, np0=200(0.30)=6010np_0 = 200(0.30) = 60 \geq 10 and n(1p0)=200(0.70)=14010n(1 - p_0) = 200(0.70) = 140 \geq 10.

  3. Find the sample proportion. p^=74200=0.37\hat{p} = \frac{74}{200} = 0.37.

  4. Find the standard deviation under H0H_0. 0.30(0.70)200=0.21200=0.001050.0324\sqrt{\frac{0.30(0.70)}{200}} = \sqrt{\frac{0.21}{200}} = \sqrt{0.00105} \approx 0.0324.

  5. Compute the test statistic. z=0.370.300.03242.16z = \frac{0.37 - 0.30}{0.0324} \approx 2.16.

  6. Find the p-value. The alternative points up, so only the upper tail counts: P(Z2.16)=10.9846=0.0154P(Z \geq 2.16) = 1 - 0.9846 = 0.0154.

  7. Compare and conclude. Because 0.0154<0.050.0154 < 0.05, reject H0H_0. There is convincing statistical evidence that more than 30% of bike-share trips end at the library rack.

  8. Check the trap. Using p^=0.37\hat{p} = 0.37 in the denominator would give 0.37(0.63)/2000.0341\sqrt{0.37(0.63)/200} \approx 0.0341, z2.05z \approx 2.05, and a p-value of 0.0202: a different statistic from the same data.

p^=0.37\hat{p} = 0.37, z2.16z \approx 2.16, one-sided p-value =0.0154= 0.0154. Because 0.0154<0.050.0154 < 0.05, reject H0H_0.

Frequently asked questions

Do I use p-naught or p-hat in the standard error?

Use p0p_0 for a hypothesis test and p^\hat{p} for a confidence interval. The test computes everything as if H0H_0 were true, so the standard deviation of p^\hat{p} is p0(1p0)/n\sqrt{p_0(1 - p_0)/n}. An interval has no hypothesized value available, so it estimates the standard error as p^(1p^)/n\sqrt{\hat{p}(1 - \hat{p})/n}.

What if the large counts condition fails?

If np0<10np_0 < 10 or n(1p0)<10n(1 - p_0) < 10, the normal approximation to the sampling distribution of p^\hat{p} is not reliable, so the z-test result cannot be trusted. Say so explicitly rather than reporting a z anyway. On the AP exam, stating that a condition is not met is the correct answer when it is not met.

Can I write the hypotheses using p-hat?

No. p^\hat{p} is a number you computed from your sample, so there is nothing to hypothesize about it. Hypotheses always concern the population parameter pp, and a response that tests p^\hat{p} does not earn the point even if the arithmetic that follows is correct.

How do I decide between a one-sided and a two-sided alternative?

Read the question, not the data. Wording such as "differs from" or "is not equal to" calls for \neq and two tails. Wording such as "more than" or "less than" calls for >> or << and one tail. Deciding after seeing which way p^\hat{p} fell inflates your false alarm rate.

What does failing to reject actually let me claim?

Only that your data did not give convincing evidence against p0p_0. It is not evidence that p=p0p = p_0. A small sample can fail to reject a null hypothesis that is genuinely false, which is a Type II error, so a non-significant result is a statement about your evidence rather than about the world.