AP Statistics · Unit 3 · Inference for Categorical Data: Proportions
3.12 Setting up a two-proportion test
Write hypotheses for a comparison of two population proportions, check the conditions for a two-proportion z-test, and recognize when that test is the right procedure.
1/5Hypotheses compare two population proportions with each other
- Hypotheses compare two population proportions with each other
- The direction of the alternative comes from the claim
- Valid inference needs random, independent samples
- The large counts condition keeps the normal model reasonable
- The correct procedure is a two-proportion z-test
- Check your recall
- Practice: 10 questions
Part 1 of 5: Hypotheses compare two population proportions with each other
Suppose a school wants to know whether freshmen and seniors differ in how often they buy lunch. Each group has its own true proportion. A significance test asks whether the data give convincing evidence about how those two proportions compare.
The null hypothesis says there is no difference between the two population proportions. We write it as . Here and are the true proportions in population 1 and population 2.
The alternative hypothesis is what the data might support instead. It can be two-sided, . It can also be one-sided, using or .
Key terms · tap one for its definition
null hypothesis
The null hypothesis, , is the claim of no difference, here that the two population proportions are equal.
alternative hypothesis
The alternative hypothesis, , is the competing claim that the population proportions differ in the direction the research question gives.
Part 2 of 5: The direction of the alternative comes from the claim
Once the symbols are defined, the sign in depends on the wording of the claim. The direction is set by the research question, never by which sample proportion happens to be larger. Decide it before looking at the data.
Matching claim wording to the alternative hypothesis
- Claim wording
- The proportions differ
- Alternative hypothesis
- Claim wording
- Group 1 is higher than group 2
- Alternative hypothesis
- Claim wording
- Group 1 is lower than group 2
- Alternative hypothesis
Worked example
Writing the hypotheses
- Define as the true proportion of all seniors who plan to attend college.
- Define as the true proportion of all freshmen who plan to attend college.
- The null hypothesis states no difference: .
- The claim says seniors are higher, so .
Answer: and , with for seniors and for freshmen.
Watch the order of the groups. Reversing which group is group 1 flips the sign of a one-sided alternative. A claim that group 1 is higher becomes a claim that group 2 is lower.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: C · Worked explanation
Part 3 of 5: Valid inference needs random, independent samples
A test is only trustworthy when its conditions hold, so we check them next. The data must come from two random samples, or from random assignment in an experiment. Randomness lets us generalize to the populations or draw conclusions about cause.
Observations must also be independent. When sampling without replacement, check the 10% condition: each sample is less than 10% of its population. The two groups must be independent samples. No person in one group may be linked to a person in the other.
Key terms · tap one for its definition
10% condition
The 10% condition is the requirement that each sample is less than 10% of its population, so observations are approximately independent.
independent samples
Independent samples are two samples in which the individuals chosen for one sample give no information about the individuals in the other.
Part 4 of 5: The large counts condition keeps the normal model reasonable
The last condition makes sure the sampling distribution of is approximately normal. Under , both populations share one proportion. We estimate it with the combined proportion, , where and are the success counts.
The large counts condition asks that , , , and are all at least 10.
To check it, multiply each sample size by and by . Small samples, or a proportion near 0 or 1, are the usual causes of failure. When the counts are too small, the normal model gives unreliable p-values.
Worked example
Checking large counts
- Combine the samples: .
- For sample 1: and .
- For sample 2: and .
- Compare each value with 10.
Answer: All four values are at least 10, so the large counts condition is met.
Key terms · tap one for its definition
combined proportion
The combined proportion, , is the total number of successes in both samples divided by the total sample size, also called the pooled proportion.
large counts condition
The large counts condition is the requirement that both samples have at least 10 expected successes and 10 expected failures when computed with .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: The correct procedure is a two-proportion z-test
With hypotheses written and conditions checked, the remaining task is naming the procedure. A two-proportion z-test compares two population proportions. It uses the difference and a standard normal model.
Choose it when the data match all of these features:
- Two groups, each summarized by a proportion
- One categorical variable with two outcomes, called success and failure
- Independent random samples or randomized groups
- A claim about whether the two proportions differ
One sample compared with a stated value calls for a one-proportion test instead. Paired data call for a different method altogether.
Key term
two-proportion z-test
The two-proportion z-test is a significance test of that uses a z statistic and the standard normal model.
Check your recall[13 marks]
5 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Identify[3 marks]
Identify the parameters and the hypotheses for testing whether a higher proportion of students who use a study app than students who do not use it pass a quiz.
Show mark schemeHide mark scheme
Model answer
Let be the true proportion of app users who pass and the true proportion of non-users who pass. and .
- 1 mark for defining both population proportions in context
- 1 mark for writing
- 1 mark for writing the one-sided
- 2.Describe[3 marks]
Describe the conditions that must be checked before using a two-proportion z-test.
Show mark schemeHide mark scheme
Model answer
The data must come from random samples or a randomized experiment. Observations must be independent, with each sample under 10% of its population and the two groups independent of each other. All expected success and failure counts must be at least 10.
- 1 mark for stating the random sampling or random assignment condition
- 1 mark for stating independence, including the 10% condition and independent groups
- 1 mark for stating the large counts condition with at least 10 expected successes and failures
- 3.Determine[3 marks]
Determine whether the large counts condition is met when 45 of 90 individuals in sample 1 and 30 of 110 individuals in sample 2 are successes.
Show mark schemeHide mark scheme
Model answer
. Then , , and . All are at least 10, so the condition is met.
- 1 mark for finding
- 1 mark for calculating all four expected counts
- 1 mark for concluding that all are at least 10 so the condition is met
- 4.Justify[2 marks]
Justify why a two-proportion z-test is not appropriate when the same 50 people are asked before and after a campaign whether they recycle.
Show mark schemeHide mark scheme
Model answer
The same people are in both groups, so the samples are paired and not independent. The test requires two independent samples.
- 1 mark for identifying that the same individuals appear in both groups
- 1 mark for linking this to the failure of independence between samples
- 5.Explain[2 marks]
Explain why the direction of the alternative hypothesis should come from the research question rather than from the sample results.
Show mark schemeHide mark scheme
Model answer
Hypotheses are claims about population proportions that are set before collecting data. Choosing the direction after seeing the data would build the answer into the test.
- 1 mark for stating that hypotheses are set before seeing the data
- 1 mark for explaining that choosing the direction from the sample would bias the test

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyIdentify[1 mark]
Show answer and explanation
Answer: C · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: B · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation
MediumIdentify[2 marks]
Show answer and explanation
Answer: A · Worked explanation
Medium[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardIdentify[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation