AP Statistics • Inference for Categorical Data: Proportions

Setting Up a Test for a Population Proportion

Learn how to formulate hypotheses, verify conditions, and structure a one-proportion z-test from start to finish.

A scatter plot with data columns and a percentage symbol.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

The challenge of drawing reliable conclusions about populations from limited samples has driven the development of inferential statistics for well over a century. Early researchers recognized that observed proportions—such as the fraction of defective items in a manufacturing lot or the share of voters favoring a candidate—fluctuate from sample to sample, and that principled methods were needed to distinguish genuine population characteristics from random variation. The hypothesis test for a population proportion emerged as the standard framework for making such decisions, providing a structured way to weigh evidence against a claim about the true proportion p.

1710 • Arbuthnot's Sign Test

John Arbuthnot examined London christening records over 82 years and tested whether the proportion of male births differed from 0.5, producing one of the earliest recorded significance tests.

1900 • Pearson's Chi-Square

Karl Pearson developed the chi-square goodness-of-fit test, laying the groundwork for comparing observed and expected proportions under a null model.

1928 • Neyman–Pearson Framework

Jerzy Neyman and Egon Pearson formalized the concepts of null and alternative hypotheses, Type I and Type II errors, and the notion of statistical power—cornerstones of modern hypothesis testing.

1950s • Standardized Testing Procedures

Textbooks codified the one-proportion z-test as a standard procedure, making hypothesis tests for proportions accessible to practitioners in medicine, quality control, and social science.

The central question that a test for a population proportion addresses is straightforward yet powerful: given a sample proportion p̂ that differs from a hypothesized value p₀, is the discrepancy large enough to constitute convincing evidence against the claim, or could it reasonably be attributed to chance? Setting up the test correctly—choosing the right hypotheses, verifying the necessary conditions, and identifying the appropriate test statistic—is the essential first step in answering that question rigorously.

SECTION 2

Core Principles & Definitions

Before performing any calculations, you must understand the conceptual architecture of a hypothesis test. Every test for a population proportion rests on five interlocking ideas: a parameter of interest, a pair of competing hypotheses, a set of conditions that justify the sampling distribution, a test statistic that measures how far the data fall from the null claim, and a p-value that quantifies the strength of the evidence. Mastering the setup means getting the first three of these elements exactly right so that the remaining two follow naturally.

1

Parameter & Hypotheses

The parameter is the true population proportion p. The null hypothesis H₀ states p = p₀ (no effect). The alternative hypothesis Hₐ can be two-sided (p ≠ p₀), left-tailed (p < p₀), or right-tailed (p > p₀).
2

Conditions for Inference

Three conditions must hold: (1) Random — the data come from a random sample or randomized experiment; (2) 10% condition — n ≤ 10% of the population; (3) Large Counts — np₀ ≥ 10 and n(1 − p₀) ≥ 10.
3

Test Statistic

The z-statistic measures how many standard deviations the sample proportion p̂ is from p₀ under the null. It is computed as z = (p̂ − p₀) / √(p₀(1 − p₀)/n).
4

P-Value & Decision

The p-value is the probability of obtaining a test statistic as extreme as (or more extreme than) the observed value, assuming H₀ is true. If p-value < α, we reject H₀.
✦

KEY TAKEAWAY

Think of a hypothesis test as a trial in court. The null hypothesis is the presumption of innocence—it stands unless the evidence (the data) is compelling enough to overturn it. Setting up the test is like drafting the charges and ensuring the evidence was collected properly: if the charges are poorly written (wrong hypotheses) or the evidence was mishandled (conditions violated), no verdict can be trusted. Your job in the setup phase is to ensure the statistical trial is fair before any calculations begin.

SECTION 3

Visual Explanation — Anatomy of a One-Proportion z-Test Setup

The diagram below provides a bird's-eye view of the complete setup process. It traces the logical flow from identifying the research question to stating hypotheses, checking conditions, and arriving at the test statistic formula. Each stage is color-coded to emphasize the distinct conceptual roles played by hypotheses (violet), conditions (cyan), and computation (pink). Study this flowchart as a checklist you should mentally walk through every time you encounter a problem involving a test for a population proportion.

Setting Up a One-Proportion z-Test — Flowchart1. Identify the Parameterp = true population proportion2. State HypothesesH₀: p = p₀Hₐ: p < p₀Hₐ: p > p₀Hₐ: p ≠ p₀3. Check Conditions✓Random: SRS or randomized experiment✓10% Condition: n ≤ 10% of population✓Large Counts: np₀ ≥ 10 and n(1 − p₀) ≥ 104. Compute Test Statisticz = (p̂ − p₀) / √(p₀(1 − p₀) / n)5. Find p-value → Make DecisionCompare p-value to significance level α
The flowchart traces the five stages of setting up and executing a one-proportion z-test. Steps 1–3 (parameter identification, hypotheses, and condition-checking) constitute the setup phase, while steps 4–5 handle computation and decision-making. Most AP scoring rubrics award separate points for each stage, so omitting any step costs credit.

SECTION 4

Mathematical Framework

The mathematical backbone of the one-proportion z-test rests on the sampling distribution of p̂. When data are collected from a random sample and the conditions for inference are met, the Central Limit Theorem guarantees that p̂ is approximately normally distributed. Under the null hypothesis, the mean of this distribution equals p₀ and its standard deviation—often called the standard error under H₀—is computed using p₀ rather than p̂, because we assume H₀ is true when calculating the test statistic.

SAMPLING DISTRIBUTION UNDER H₀

p^ N(p0,√(p0(1−p0)/n))p̂ ~ N(p₀, √(p₀(1 − p₀) / n))

p̂ = sample proportion; p₀ = hypothesized population proportion; n = sample size. This approximation holds when the Random, 10%, and Large Counts conditions are satisfied.

STANDARD ERROR UNDER THE NULL

SE0=√(p0(1−p0)/n)SE₀ = √(p₀(1 − p₀) / n)

Notice that SE₀ uses p₀ (not p̂). This is a critical distinction from confidence intervals, where SE uses p̂. In hypothesis testing, we compute all probabilities assuming H₀ is true.

TEST STATISTIC (z-SCORE)

z=(p^−p0)/√(p0(1−p0)/n)z = (p̂ − p₀) / √(p₀(1 − p₀) / n)

This z-statistic tells you how many standard deviations the observed sample proportion lies from the claimed value p₀. A large |z| provides strong evidence against H₀.

⚠

Why p₀ and not p̂ in the denominator?

In a hypothesis test, you measure how surprising the data are assuming the null is true. Because H₀ asserts that p = p₀, the standard deviation of p̂ is calculated with p₀. When you construct a confidence interval, there is no assumed value, so you use p̂ instead. Mixing these up is one of the most common errors on the AP exam.

SECTION 5

Choosing the Alternative Hypothesis — One-Sided vs. Two-Sided

One of the most consequential decisions in the setup phase is choosing the correct form of the alternative hypothesis. The direction of Hₐ is determined entirely by the research question—never by the data. If a manufacturer claims that no more than 3% of its products are defective, and a consumer advocacy group suspects the true defect rate is higher, the alternative is one-sided to the right (p > 0.03). If a researcher simply wants to know whether the proportion differs from a benchmark without specifying a direction, the alternative is two-sided (p ≠ p₀). Choosing the wrong form distorts the p-value and can lead to an incorrect conclusion.

Three Forms of the Alternative HypothesisLeft-Tailed (Hₐ: p < p₀)p₀p-valueTwo-Tailed (Hₐ: p ≠ p₀)p₀p/2p/2Right-Tailed (Hₐ: p > p₀)p₀p-valueHow to Choose the Correct AlternativeLeft-TailedKey words: less than,decreased, lower, fewerExample: A school claims≥ 90% graduation rate.A researcher suspectsit is lower.Hₐ: p < 0.90Two-TailedKey words: different from,changed, not equal toExample: Is the coinfair? (p might behigher or lowerthan 0.5.)Hₐ: p ≠ 0.50Right-TailedKey words: more than,increased, greater, higherExample: A companyclaims ≤ 5% defective.An inspector thinksit is higher.Hₐ: p > 0.05
The three normal curves show where the shaded p-value region falls for each type of alternative hypothesis. The lower panel provides keyword cues and concrete examples for choosing the correct Hₐ. On the AP exam, the direction of Hₐ must be justified by the context of the problem, not selected after viewing the data.
Alternative FormSymbolic StatementP-Value Calculation
Left-tailedHₐ: p < p₀P(Z ≤ z)
Right-tailedHₐ: p > p₀P(Z ≥ z)
Two-tailedHₐ: p ≠ p₀2 × P(Z ≥ |z|)

Summary of p-value computation for each alternative type

SECTION 6

Worked Example

A large university claims that 70% of its first-year students return for their second year. An education researcher suspects the true retention rate is lower. She takes a simple random sample of 200 first-year students and finds that 126 returned. Set up the hypothesis test at the α = 0.05 significance level and calculate the test statistic.

One-Proportion z-Test — University Retention Rate

  1. 1

    Step 1 — State the Parameter

    Let p = the true proportion of all first-year students at this university who return for their second year.
  2. 2

    Step 2 — State the Hypotheses

    Because the researcher suspects the retention rate is lower than claimed, this is a left-tailed test.
    H₀: p = 0.70 Hₐ: p < 0.70
  3. 3

    Step 3 — Check Conditions

    Random: The problem states the data come from a simple random sample. ✓ 10% Condition: 200 students is less than 10% of the first-year class at a large university. ✓ Large Counts: np₀ = 200 × 0.70 = 140 ≥ 10 and n(1 − p₀) = 200 × 0.30 = 60 ≥ 10. ✓ All three conditions are satisfied, so we may use the normal approximation.
  4. 4

    Step 4 — Compute the Test Statistic

    The sample proportion is p̂ = 126/200 = 0.63. The standard error under the null is SE₀ = √(0.70 × 0.30 / 200) = √(0.00105) ≈ 0.0324. Therefore, z = (0.63 − 0.70) / 0.0324 = −0.07 / 0.0324 ≈ −2.16.
    z ≈ −2.16
  5. 5

    Step 5 — Find the P-Value and Conclude

    Because Hₐ is left-tailed, the p-value = P(Z ≤ −2.16) ≈ 0.0154. Since 0.0154 < 0.05 = α, we reject H₀. There is convincing evidence that the true retention rate is less than 70%.
    p-value ≈ 0.0154 → Reject H₀

SECTION 7

Common Mistakes & How to Avoid Them

Even students who understand the theory frequently lose points on the AP exam because of avoidable procedural errors during the setup phase. The table below catalogs the most common pitfalls and provides the corrective strategy for each. Reviewing these before exam day is one of the highest-leverage study activities you can do.

Common MistakeWhy It's WrongCorrect Approach
Writing hypotheses about p̂ instead of pHypotheses are always about the population parameter, not the sample statistic.Write H₀: p = p₀ and Hₐ in terms of p.
Using p̂ in the standard error formulaThe test assumes H₀ is true, so the SE must use p₀.SE₀ = √(p₀(1 − p₀) / n).
Choosing Hₐ direction after looking at the dataThis inflates the Type I error rate and invalidates the test.The research question determines Hₐ before data collection.
Checking Large Counts with p̂ instead of p₀The condition checks whether the null sampling distribution is approximately normal.Check np₀ ≥ 10 and n(1 − p₀) ≥ 10.
Failing to define the parameter in contextAP rubrics require that p be defined in the context of the problem."Let p = the true proportion of [context]."

Five most common setup mistakes on the AP Statistics exam

📝

EXAM TIP

AP free-response graders use a checklist rubric. You earn points for each correctly completed element: defining the parameter in context, stating both hypotheses symbolically, naming the procedure, and verifying all three conditions with calculations. Even if your final numerical answer is correct, you can lose the majority of the points by skipping these setup elements. Treat the setup as a structured protocol—never skip steps, even if they seem obvious.

SECTION 8

Connecting to Confidence Intervals and Two-Proportion Tests

The one-proportion z-test does not exist in isolation; it is part of a broader family of inference procedures that share the same logical architecture but differ in their parameters, standard errors, and applications. Understanding these connections deepens your grasp of inference and prepares you for more advanced topics in the AP Statistics curriculum and beyond.

FeatureOne-Proportion z-TestOne-Proportion z-IntervalTwo-Proportion z-Test
PurposeTest a claim about pEstimate p with a rangeCompare p₁ and p₂
Standard ErrorUses p₀Uses p̂Uses pooled p̂c
Large Counts Checknp₀ and n(1 − p₀)np̂ and n(1 − p̂)n₁p̂c, n₁(1−p̂c), n₂p̂c, n₂(1−p̂c)
Outputp-value and decisionInterval estimatep-value and decision
DualityReject H₀ at α ⟺ p₀ not in (1−α) CIContains all p₀ not rejected at αReject ⟺ 0 not in CI for p₁ − p₂

Comparison of three proportion-based inference procedures

A powerful insight is the duality between tests and intervals: for a two-sided test, rejecting H₀ at significance level α is mathematically equivalent to finding that p₀ does not fall within the corresponding (1 − α)×100% confidence interval. This means that if your 95% confidence interval for p is (0.58, 0.68), you would reject H₀: p = 0.70 at α = 0.05 because 0.70 lies outside the interval. Recognizing this connection can help you check your work and provides an elegant bridge between the two main pillars of inference.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

When setting up a one-proportion z-test, the standard error in the denominator of the test statistic is calculated using p₀ rather than p̂. Which of the following best explains why?
  • A. p₀ is always larger than p̂, which makes the standard error more conservative.
  • B. The test statistic measures how far p̂ is from p₀ under the assumption that H₀ is true, so all calculations use the null value p₀.
  • C. Using p̂ would require a t-distribution instead of the z-distribution.
  • D. p₀ is the parameter and parameters are always preferred over statistics in formulas.
  • E. Using p̂ in the standard error would violate the 10% condition.
Show answer (B)
The correct answer is B. In hypothesis testing, we calculate the probability of seeing data as extreme as ours assuming H₀ is true. Because H₀ asserts p = p₀, the sampling distribution of p̂ is centered at p₀ with standard deviation √(p₀(1 − p₀)/n), and we must use this null-based standard error. Choice A is incorrect because p₀ is not always larger than p̂—their relative sizes depend on the data. Choice C is incorrect because the distinction between z and t distributions arises from estimating variability for means, not from using p̂ versus p₀ in proportions. Choice D incorrectly generalizes—parameters are not universally preferred; the reason is specifically about the assumption underlying the test. Choice E is incorrect because the 10% condition concerns sample size relative to population size, not which value appears in the standard error.

Question 2: BASIC CALCULATION

A pollster wants to test whether the proportion of voters in a city who favor a new transit policy differs from 0.50. In a random sample of 400 voters, 224 favor the policy. What is the value of the test statistic?
  • A. z = 1.96
  • B. z = 2.00
  • C. z = 2.40
  • D. z = 2.80
  • E. z = 3.20
Show answer (C)
The correct answer is C. First, p̂ = 224/400 = 0.56 and p₀ = 0.50. The standard error under H₀ is SE₀ = √(0.50 × 0.50 / 400) = √(0.000625) = 0.025. Therefore z = (0.56 − 0.50) / 0.025 = 0.06 / 0.025 = 2.40. Choice A (1.96) is a critical value, not the test statistic for these data. Choice B (2.00) would result from an arithmetic error in the numerator or denominator. Choice D (2.80) and Choice E (3.20) are too large and would require a larger difference between p̂ and p₀ or a smaller standard error.

Question 3: INTERMEDIATE

A biologist claims that more than 60% of a certain species of frog in a wetland are carriers of a particular parasite. She captures a random sample of 80 frogs and finds that 55 are carriers. Which of the following correctly states the hypotheses and identifies a condition that is NOT satisfied?
  • A. H₀: p = 0.60, Hₐ: p > 0.60; the Large Counts condition fails because n(1 − p₀) = 32 < 10.
  • B. H₀: p = 0.60, Hₐ: p > 0.60; all three conditions are satisfied.
  • C. H₀: p = 0.60, Hₐ: p ≠ 0.60; all three conditions are satisfied.
  • D. H₀: p = 0.60, Hₐ: p > 0.60; the 10% condition fails because the population of frogs may be small.
  • E. H₀: p̂ = 0.6875, Hₐ: p̂ > 0.6875; all conditions are satisfied.
Show answer (B)
The correct answer is B. The biologist suspects the proportion is greater than 0.60, so Hₐ: p > 0.60 (right-tailed). Checking conditions: Random is stated; 10% Condition—80 is likely less than 10% of the wetland frog population; Large Counts—np₀ = 80(0.60) = 48 ≥ 10 and n(1 − p₀) = 80(0.40) = 32 ≥ 10. All conditions are met. Choice A misidentifies 32 as failing the Large Counts condition (32 ≥ 10 passes). Choice C uses a two-tailed alternative, which contradicts the directional claim 'more than 60%.' Choice D raises a legitimate concern about population size but the problem context (a wetland species) reasonably implies a population well above 800. Choice E incorrectly writes hypotheses about the sample statistic p̂ rather than the parameter p.

Question 4: APPLIED

4 pts
A pharmaceutical company states that its new allergy medication is effective for 80% of patients. A health insurance company suspects the true effectiveness rate is lower. The insurer surveys a random sample of 250 patients who used the medication and finds that 187 reported it was effective. (a) Define the parameter of interest and state the null and alternative hypotheses. (b) Verify whether the conditions for a one-proportion z-test are met. (c) Calculate the test statistic. (d) Using a significance level of α = 0.05, describe how you would use the test statistic to make a conclusion. (You do not need to find the exact p-value, but describe the process.)
Show answer
Rubric (4 points): Point 1 — Parameter and Hypotheses (1 point): Let p = the true proportion of all patients for whom the allergy medication is effective. H₀: p = 0.80, Hₐ: p < 0.80. The alternative is left-tailed because the insurer suspects effectiveness is lower than 80%. Must define p in context and use the correct direction for Hₐ. Point 2 — Conditions (1 point): Random: The problem states a random sample was taken. ✓ 10% Condition: 250 patients is less than 10% of all patients who have used the medication (a pharmaceutical product used by thousands). ✓ Large Counts: np₀ = 250(0.80) = 200 ≥ 10 and n(1 − p₀) = 250(0.20) = 50 ≥ 10. ✓ All three conditions are satisfied. Point 3 — Test Statistic (1 point): p̂ = 187/250 = 0.748. SE₀ = √(0.80 × 0.20 / 250) = √(0.00064) ≈ 0.02530. z = (0.748 − 0.80) / 0.02530 = −0.052 / 0.02530 ≈ −2.06. Point 4 — Decision Process (1 point): Because this is a left-tailed test, the p-value is P(Z ≤ −2.06). Using a z-table or calculator, this is approximately 0.0197. Since 0.0197 < 0.05 = α, we reject H₀. There is convincing evidence at the 5% significance level that the true proportion of patients for whom the medication is effective is less than 0.80.

Question 5: CRITICAL THINKING

4 pts
A political analyst wants to test whether a candidate's support has changed from the historically observed level of 45% in a particular district. She surveys 150 randomly selected registered voters and finds that 78 support the candidate. (a) Set up the appropriate hypotheses and justify your choice of a one-sided or two-sided test. (b) A colleague argues that because 78/150 = 0.52 is higher than 0.45, the alternative should be Hₐ: p > 0.45 (a one-sided test to the right). Explain why this reasoning is statistically inappropriate. (c) If the analyst uses α = 0.01 instead of α = 0.05, explain how this changes the probability of a Type I error and a Type II error, assuming all other aspects of the test remain the same. (d) Suppose the Large Counts condition were not satisfied. Describe an alternative approach the analyst could use to test the same hypotheses.
Show answer
Rubric (4 points): Point 1 — Hypotheses with justification (1 point): Let p = the true proportion of registered voters in the district who support the candidate. H₀: p = 0.45, Hₐ: p ≠ 0.45. A two-sided test is appropriate because the analyst wants to know whether support has 'changed'—which includes the possibility of increasing or decreasing. The research question does not specify a direction. Point 2 — Critique of data-driven Hₐ selection (1 point): The colleague's reasoning is flawed because the direction of the alternative hypothesis must be determined by the research question before examining the data, not by the observed sample proportion. Choosing Hₐ: p > 0.45 because the data show p̂ > 0.45 is a form of 'data snooping' that inflates the true Type I error rate beyond the nominal α. The alternative must reflect the analyst's pre-data research question, which was about any change, not specifically an increase. Point 3 — Effect of changing α (1 point): Decreasing α from 0.05 to 0.01 reduces the probability of a Type I error (rejecting H₀ when it is true) from 5% to 1%. However, this comes at a cost: it increases the probability of a Type II error (failing to reject H₀ when it is false), which means the test has less statistical power. In practical terms, the analyst would need stronger evidence (a more extreme test statistic) to reject H₀ at the 1% level. Point 4 — Alternative method when Large Counts fails (1 point): If the Large Counts condition is not met, the normal approximation to the sampling distribution of p̂ is unreliable. An alternative approach is to use a simulation-based method (randomization test or permutation test). The analyst would simulate many samples of size 150 under the null hypothesis (p = 0.45), compute p̂ for each simulated sample, and build an empirical sampling distribution. The p-value would then be the proportion of simulated p̂ values that are at least as extreme as the observed p̂ = 0.52. Another valid approach would be an exact binomial test, which uses the binomial distribution directly without the normal approximation.

SUMMARY

Lesson Summary

Summary

Setting up a test for a population proportion requires a disciplined, multi-step process. You begin by defining the parameter p in context, then state the null hypothesis H₀: p = p₀ and an alternative hypothesis Hₐ whose direction (left-tailed, right-tailed, or two-tailed) is determined by the research question—never by the data. Before any calculations, you verify three conditions: the Random condition, the 10% condition, and the Large Counts condition (np₀ ≥ 10 and n(1 − p₀) ≥ 10). Only then do you compute the z-test statistic using z = (p̂ − p₀) / √(p₀(1 − p₀)/n), where the standard error uses p₀ because all calculations assume H₀ is true.

Remember the key distinctions: hypotheses are about the population parameter p (never p̂), the direction of Hₐ comes from the research question (never the data), and the p-value quantifies the strength of evidence against H₀. A small p-value (less than α) leads you to reject H₀ and conclude there is convincing evidence for Hₐ; otherwise, you fail to reject H₀. This framework extends naturally to confidence intervals and two-proportion z-tests, making it the foundation for all proportion-based inference in AP Statistics.

Varsity Tutors • AP Statistics • Setting Up a Test for a Population Proportion