Significance tests for difference of two proportions
Significance test for two proportions
The goal of a significance test for two proportions is to decide whether an observed difference between two sample proportions reflects a real difference between the two population proportions, or whether the sample difference could reasonably be explained by natural sampling variation.
For this test, the null hypothesis says there is no difference between the population proportions:
Conditions for using the two-proportion z test
Large counts (normality) condition
To use the normal approximation, all four of the following quantities must be at least :
Randomness and independence
- Each sample should be a random sample (ideally a simple random sample).
- The two samples must be independent of each other.
- If sampling is done without replacement, each population size and should be at least times the corresponding sample size (the “10% condition”).
Choosing the alternative hypothesis
The alternative hypothesis depends on what the question is asking.
Practice problem
Example:
After a major wildfire, an organization surveyed two different local districts to see how many homeowners were able to get the emergency help that they needed. In a random sample of homeowners from district A, said that they were able to get the help that they needed. In another random sample of homeowners from district B, said they were able to get the help they needed. The confidence interval for is .
Part a.
Does the data that is given provide convincing evidence that a greater proportion of district A homeowners were able to get help than district B homeowners?
Define the parameters:
- Let represent the true proportion of homeowners in district A who were able to get the help they needed.
- Let represent the true proportion of homeowners in district B who were able to get the help they needed.
State the hypotheses:
The alternative hypothesis is one-sided because the question is specifically asking whether the proportion in district A is greater than the proportion in district B. The key question is whether the observed sample difference is large enough to be unlikely under , given the natural variation we expect from random sampling.
Check the large counts (normality) condition:
First compute the pooled proportion:
Now check each value:
Since all four values are at least , the large counts condition is met.
Check the independence requirement:
The independence requirement is that each sample size should be less than of its population size. Although the exact number of homeowners in each district is not given, it is reasonable to assume each district has far more than and homeowners, so the condition is likely satisfied.
Complete the test with a TI-84 calculator:
- Step 1: Press STAT, scroll over to TESTS, scroll down to 6: 2-PropZTest, and press ENTER.
- Step 2: Input the following data:
- = number of successes in sample 1 (using district A data: )
- = size of sample 1 ()
- = number of successes in sample 2 (using district B data: )
- = size of sample 2 ()
- Choose alternative hypothesis:
The calculator gives:
Compare the p-value to :
Solution:
Since the p-value is less than , we reject the null hypothesis. There is evidence that a greater proportion of district A homeowners were able to get the help they needed compared to district B homeowners.
Part b.
Is the result consistent with the confidence interval that is given above?
Solution:
The problem states that a confidence interval for is .
This interval contains (since ), which means that a two-sided test at the level would not reject .
That does not contradict Part a, because Part a used a one-sided alternative (). The interval is mostly positive and only barely dips below , which matches the idea that the data lean toward even though a two-sided interval still includes .
Part c.
If the null hypothesis had been that the two proportions were equal, what type of error (Type I or Type II) could have potentially been made based on the conclusion?
Solution:
A type I error happens when we reject the null hypothesis even though it is true (a false positive). A type II error happens when we fail to reject the null hypothesis even though it is false (a false negative).
Here, we rejected , so the only possible error consistent with that decision is a type I error.