# Setting Up a Test for a Population Proportion

> AP Statistics · AP 2024-2026 Statistics
> Source: https://www.owlsprep.com/study/ap-statistics-u12-setting-up-a-test-for/

This module teaches you to write valid hypotheses, verify inference conditions, and select appropriate significance levels for one-proportion z-tests, aligned to official AP Statistics scoring rubrics.

**Prerequisites:** [Calculating sample proportions from categorical data](https://www.owlsprep.com/study/ap-statistics-u1-categorical-variables/); [Core principles of statistical significance](https://www.owlsprep.com/study/ap-statistics-u12-intro-to-hypothesis-testing/)

## Learning objectives

- Write formally correct null and alternative hypotheses for one-tailed and two-tailed population proportion tests
- Verify all three mandatory conditions required to run a valid one-proportion z-test
- Explicitly define population parameters to avoid notation point deductions on AP free responses
- Select an appropriate significance level α aligned to the research context priorities

## Writing Valid Hypotheses for a Population Proportion

All AP Statistics hypothesis test responses require you to explicitly define the population parameter first, before writing any hypothesis statements. This eliminates ambiguity and prevents automatic notation point deductions.

**Null Hypothesis for Population Proportion** — A claim that the true population proportion p equals a fixed pre-specified baseline value, representing no effect or no difference from the known reference value.

*Notation:* H_0

$$H_0: p = p_0$$

**Alternative Hypothesis** — A claim that contradicts the null hypothesis, representing the research effect you are attempting to find evidence for. It may be one-sided (<, >) or two-sided (≠).

*Notation:* H_a

**Worked example:** A bakery claims 70% of their weekly sales come from sourdough loaves. A part-time baker believes the true proportion is lower than the claimed value. Write fully valid hypotheses for a significance test.

1. Step 1: Explicitly define the parameter first: Let p = the true proportion of all bakery weekly sales that come from sourdough loaves.
2. Step 2: Write the null hypothesis using the bakery's claimed baseline value:
3. $$H_0: p = 0.70$$
4. Step 3: Write the alternative hypothesis matching the baker's one-sided lower claim:
5. $$H_a: p < 0.70$$

> **Exam tip:** AP rubrics deduct 1 full point if you use the sample statistic \(\hat{p}\) instead of the population parameter p in your hypotheses, no exceptions.

## Verifying the Three Mandatory Inference Conditions

Before you can proceed with any calculations for a one-proportion z-test, you must state and justify all three conditions. AP graders will not award full credit for test setup if any condition is missing or incorrectly justified.

- Random: The data must come from a simple random sample (SRS) or properly randomized experiment to avoid selection bias.
- Independence: When sampling without replacement, the total population size must be at least 10 times the sample size to ensure individual observations are independent.
- Large Counts: The expected number of successes \(n p_0\) and failures \(n(1-p_0)\) under the null hypothesis must both be ≥ 10 to use the normal approximation for the sampling distribution.

> **Critical AP Rubric Rule**
>
> Never use your observed sample proportion \(\hat{p}\) to calculate the large counts values. You must always use the null hypothesized value \(p_0\), this is one of the most commonly missed points on AP free responses.

**Worked example:** You select a random sample of 120 bakery transactions to test the 70% sourdough sales claim. Verify all three conditions for a valid z-test.

1. Step 1: Random: The problem explicitly states the sample is random, so this condition is satisfied.
2. Step 2: Independence: The bakery has far more than 10 * 120 = 1200 total weekly transactions, so the 10% condition holds.
3. Step 3: Large Counts: Calculate expected successes and failures using \(p_0 = 0.7\):
4. $$n p_0 = 120 * 0.7 = 84, \quad n(1-p_0) = 120 * 0.3 = 36$$
5. Both values are ≥ 10, so the large counts condition is satisfied.

## Selecting an Appropriate Significance Level α

The significance level α defines the maximum probability you are willing to accept of incorrectly rejecting a true null hypothesis. It must always be selected before you collect or view any sample data to avoid p-hacking.

**Exam command terms**

AP exam questions use standard phrasing to signal what α value you should use for your test:

- **Standard significance level** — Use the default widely accepted value of α = 0.05

- **Strict threshold for false positives** — Use a smaller α value such as 0.01 to minimize Type I error risk

- **High power to detect a real effect** — Use a larger α value such as 0.10 to reduce Type II error risk

**Worked example:** A consumer safety group tests if the proportion of underweight snack packages from a factory is above the 1% legal limit. They want to minimize false accusations against the factory. Select an appropriate α and justify your choice.

1. Step 1: Identify that the priority is reducing Type I error (incorrectly concluding the proportion is above 1% when it is not).
2. Step 2: Select α = 0.01, which sets a very low threshold for false positives, aligning with the safety group's priority of avoiding unfair accusations.

## One-Tailed vs Two-Tailed Test Setup

The direction of your alternative hypothesis is determined exclusively by the original research question, not by any results you observe in your sample data. Changing the alternative after seeing data is statistically invalid.

**Comparing methods**

The two valid alternative hypothesis formats for population proportion tests are used in distinct scenarios:

- **One-Sided Test** — Uses \(H_a: p < p_0\) or \(H_a: p > p_0\), applied when the research question explicitly specifies a direction of difference from the baseline value.
  - Pros: Higher statistical power to detect a difference in the pre-specified direction
  - Cons: Cannot be used to claim a difference in the opposite direction of your original hypothesis

- **Two-Sided Test** — Uses \(H_a: p \neq p_0\), applied when the research question only asks if the true proportion differs from the baseline, with no specified direction.
  - Pros: Accounts for differences in both higher and lower directions
  - Cons: Lower statistical power for detecting a difference in a single specific direction

**Worked example:** A city transit authority claims 55% of local commuters use the bus system. A researcher wants to test if the true proportion is different from the claimed value, with no prior assumption of direction. Write the correct alternative hypothesis.

1. Step 1: Confirm the research question does not specify if the true proportion is higher or lower than 55%, only that it is different.
2. Step 2: Use a two-sided alternative hypothesis:
3. $$H_a: p \neq 0.55$$

**Check your understanding**

Test your understanding of valid test setup rules:

1. Which of the following is a statistically valid alternative hypothesis for a one-proportion z-test?

   - H_a: \hat{p} = 0.62
   - H_a: p = 0.62
   - H_a: p > 0.62
   - H_a: \hat{p} > 0.62

   *Why:* Hypotheses always refer to the population parameter p, not the sample statistic \(\hat{p}\), and the alternative hypothesis can never contain an equals sign.

## Common pitfalls

- **Wrong:** Writing hypotheses using the sample proportion \(\hat{p}\) instead of the population parameter p
  - Why it fails: AP rubrics deduct 1 full point for this notation error, as hypotheses are statements about population values, not sample results
  - Correct: Explicitly define p first, then write both hypotheses using the population parameter notation
- **Wrong:** Using sample counts \(n\hat{p}\) and \(n(1-\hat{p})\) to check the Large Counts condition
  - Why it fails: The Large Counts condition calculates expected values under the null hypothesis, not observed sample values
  - Correct: Always use the null hypothesized value \(p_0\) to calculate the two large counts values
- **Wrong:** Setting the direction of the alternative hypothesis after viewing sample data
  - Why it fails: This is a form of p-hacking that inflates your chance of a false positive result, making the test statistically invalid
  - Correct: Finalize your null and alternative hypotheses before collecting or accessing any sample data
- **Wrong:** Skipping explicit justification of the 10% independence condition
  - Why it fails: AP graders require you to confirm the population is at least 10 times the sample size to award full credit for independence
  - Correct: Write a clear 1-sentence justification that the population size is ≥ 10n for your sample
- **Wrong:** Setting the null hypothesis value equal to a value calculated from your sample data
  - Why it fails: The null hypothesis is a pre-defined baseline, not a value derived from the data you are testing
  - Correct: The null value \(p_0\) must come from a prior claim, published study, or established baseline, not your sample

## Cheatsheet

| Test Setup Component | Required AP Justification | Mistake to Avoid |
| --- | --- | --- |
| Hypotheses | Define p first, \(H_0: p=p_0\), \(H_a\) matches research direction | Using \(\hat{p}\) instead of p |
| Random Condition | Confirm sample is random/representative | Skipping explicit statement |
| Independence Condition | Population ≥ 10 * sample size | Ignoring the 10% rule |
| Large Counts | \(n p_0 \geq 10\), \(n(1-p_0) \geq 10\) | Using \(\hat{p}\) instead of \(p_0\) |
| Significance Level | Select α before viewing sample data | Changing α after seeing results |

## What's next

Mastering test setup is the highest-weight first step of any one-proportion z-test free response question on the AP exam, as graders award separate points for correct hypotheses, condition checks, and parameter definition before you even calculate a test statistic. Mistakes in setup will automatically lose points even if your later calculations are perfect, so prioritize practicing this step for every inference problem you solve. Next you will learn to calculate the z-test statistic and p-value for a one-proportion test, then move on to drawing correct conclusions from your test results fully aligned to AP rubric standards.

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-statistics-u12-setting-up-a-test-for/
