Educerie · AP · Statistics
AP Statistics 3.12
Setting Up a Test for the Difference Between Two Population Proportions
How can we determine whether the difference between two groups is statistically significant?
What you will learn
- Know that the two-sample z-test for the difference between two population proportions compares two groups on one yes-or-no variable
- Understand that H0 says the proportions are equal and Ha gives the direction from the wording
- Know that the combined proportion is the total successes over the total sample size
- Understand that the normality check uses the four expected counts with the combined proportion
You must be able to
- Name the procedure in full
- Define p1 and p2 in context with a clear group order
- Write H0 and Ha in either equivalent form
- Calculate the combined proportion
- Verify randomization, the 10% condition and the four counts
- Tell a randomized experiment from two independent samples
In the exam. Section I multiple choice: pick the hypotheses for a two-group study, name the right procedure, find the combined (pooled) proportion, or choose the condition that is checked with it. Section II: Question 3 in the course description's sample paper is a two-proportion -test on an experiment. The procedure, hypotheses, parameters and conditions are separate points, so the setup is worth about half the question. Skills: identify the method (2.C), identify the hypotheses (2.E), verify conditions (4.E).
1Test or interval?
Both compare two proportions.
- An interval estimates the size of the difference: "estimate the difference", "how much higher".
- A test decides whether there is a difference: "Is there convincing evidence that ?"
If a question asks whether the data provide convincing evidence, answer with a test.
2The parameters
Define and . Each needs the proportion, the response variable and the population or treatment. Name the groups so that the order is clear.
Example A (invented, experiment). 150 students taking an online module are randomly assigned to one of two study formats: 75 to a flashcard quiz format and 75 to a reading format. The response is whether a student finishes the module in a week. The designer thinks the quiz format will be better.
- = the proportion of students like these who would finish the module within a week with the quiz format.
- = the proportion of students like these who would finish within a week with the reading format.
Example B (invented, two independent samples). A transport survey takes a random sample of 160 commuters in City M and an independent random sample of 200 commuters in City N, each far less than 10% of its city's commuters, and records whether each commutes by bicycle. The survey asks whether the proportions differ.
- = the proportion of all commuters in City M who commute by bicycle.
- = the proportion of all commuters in City N who commute by bicycle.
In an experiment, the "population" is the set of units that the treatments could be applied to ("students like these"). It was not randomly sampled, but the parameter is still about the treatments.
3The hypotheses
The null hypothesis says there is no difference. It can be written in two equivalent ways:
The alternative has three forms, and they also have two equivalent ways.
| Wording | Equivalent | |
|---|---|---|
| "group 1 is higher" | ||
| "group 1 is lower" | ||
| "the proportions differ" |
Example A: the designer expects the quiz format (group 1) to do better.
Example B: the survey asks only whether the proportions differ.
Rules to follow:
- Hypotheses are about parameters. No .
- Label the groups, and keep the order. means something different if the groups are swapped.
- The direction comes from the question, written before the data. When no direction is stated, use two-sided.
You may be asked to state them in words: "The null hypothesis is that the proportion of students like these who finish with the quiz format equals the proportion who finish with the reading format. The alternative is that the quiz proportion is greater."
4The conditions, and the combined proportion
There are three conditions.
- Randomization. Two independent random samples, or a randomized experiment (treatments randomly assigned).
- 10% condition. When sampling without replacement, each sample is at most 10% of its population. This is unnecessary for a randomized experiment.
- Normality. The expected counts, assuming is true, are at least 10: , , and .
Here is the combined (pooled) proportion. If is true, both groups share a single proportion. The best estimate of it comes from putting the two samples together:
This is the key difference from an interval. An interval checks the observed counts in each sample. A test checks the expected counts, using the pooled proportion, because the whole test assumes .
5Checking the conditions on the examples
Example A. In the experiment, 51 of the 75 in the quiz group and 39 of the 75 in the reading group finished.
- Randomization: the 150 students were randomly assigned to the two formats.
- 10%: not needed, since this is a randomized experiment.
- Normality: and in each group. All four are at least 10.
Example B. In the survey, 44 of 160 commuters in City M and 62 of 200 in City N commute by bicycle.
- Randomization: two independent random samples.
- 10%: each sample is less than 10% of its city's commuters (the sizes are given).
- Normality: , , and . All four are at least 10.
For Example B the pooled proportion is 0.2944 before rounding. Keep several decimals in the working.
6The setup in order
Question 3 awards points in this order. Write them in it.
- Name the procedure.
- Define the parameters.
- State the hypotheses.
- Verify the conditions with numbers.
Then the calculation and conclusion (3.13).
Practice questions
30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.