Welcome to the World of Comparisons!

In our previous chapters, we looked at a single group to see if it met a certain standard. But in the real world, we are often more interested in comparing two groups. Does a new medicine work better than an old one? Do students who use a certain app study more than those who don't? To answer these questions, we perform a Two-Sample z-test for the Difference Between Two Proportions. Don't worry if the name sounds long—we are going to break it down piece by piece!

3.12: Setting Up a Test for the Difference Between Two Proportions

Before we crunch any numbers, we have to state what we are looking for. This starts with our Hypotheses.

1. The Null Hypothesis (\(H_0\)): This is the "no change" or "no difference" statement. We assume that the two population proportions are exactly the same.
\(H_0: p_1 - p_2 = 0\) (or \(H_0: p_1 = p_2\))

2. The Alternative Hypothesis (\(H_a\)): This is what we are actually trying to find evidence for. It can take three forms depending on our question:
Right-tailed: \(H_a: p_1 - p_2 > 0\) (Group 1 has a higher proportion than Group 2)
Left-tailed: \(H_a: p_1 - p_2 < 0\) (Group 1 has a lower proportion than Group 2)
Two-tailed: \(H_a: p_1 - p_2 \neq 0\) (The proportions are just "different")

The Secret Ingredient: The Combined (Pooled) Proportion

In a hypothesis test, we assume the null hypothesis is true. If we assume \(p_1 = p_2\), it makes sense to combine our two samples into one big group to get a better estimate of that shared proportion. This is called the combined (or pooled) sample proportion, written as \(\hat{p}_c\).

Formula: \(\hat{p}_c = \frac{X_1 + X_2}{n_1 + n_2}\)
Think of this as: (Total successes) divided by (Total sample size).

Key Takeaway: Always use the pooled proportion for the standard error and the Large Counts condition when performing a hypothesis test for two proportions!

The "Rules of the Road": Verifying Conditions

To ensure our results are valid, we must check three conditions (often called the Random, 10%, and Normal conditions):

Randomization: The data must come from two independent random samples or a randomized experiment where treatments were randomly assigned.
10% Condition: If sampling without replacement, the sample sizes must be less than 10% of their respective populations (\(n_1 < 0.10N_1\) and \(n_2 < 0.10N_2\)).
Large Counts (Normality): We need to expect at least 10 "successes" and 10 "failures" in both groups, using the pooled proportion \(\hat{p}_c\).
Check: \(n_1\hat{p}_c \geq 10\), \(n_1(1-\hat{p}_c) \geq 10\), \(n_2\hat{p}_c \geq 10\), and \(n_2(1-\hat{p}_c) \geq 10\).

3.13: Carrying Out the Test

Once the conditions are met, we calculate our Standardized Test Statistic (\(z\)). This tells us how many standard deviations our observed difference \((\hat{p}_1 - \hat{p}_2)\) is from the hypothesized difference (which is zero).

The Formula

\(z = \frac{(\hat{p}_1 - \hat{p}_2) - 0}{\sqrt{\hat{p}_c(1-\hat{p}_c)(\frac{1}{n_1} + \frac{1}{n_2})}}\)

Step-by-Step Process:
1. Identify: Name the procedure (Two-sample z-test for \(p_1 - p_2\)) and state hypotheses.
2. Verify: Check the Random, 10%, and Large Counts conditions.
3. Calculate: Find the \(z\)-statistic and the resulting p-value (using technology or Table A).
4. Conclude: Compare your p-value to the significance level (\(\alpha\), usually 0.05).

Interpreting the p-value

If the p-value is low (less than \(\alpha\)), the null hypothesis must go! We reject \(H_0\) and say we have convincing evidence for \(H_a\).
If the p-value is high (greater than \(\alpha\)), we fail to reject \(H_0\). We do not have enough evidence to support \(H_a\).

Common Mistake Alert: Never say you "accept" the null hypothesis. We simply haven't found enough evidence to throw it out. It's like a court case: "Not Guilty" doesn't mean "Innocent"; it just means "not enough evidence to convict."

Example Scenario

A researcher wants to know if a higher proportion of students study with music today compared to ten years ago.
Group 1 (Today): \(n_1 = 100, \hat{p}_1 = 0.60\)
Group 2 (Ten years ago): \(n_2 = 100, \hat{p}_2 = 0.50\)
Pooled Proportion: \(\hat{p}_c = \frac{60 + 50}{100 + 100} = 0.55\)
The researcher would use \(0.55\) to check the Large Counts condition and to calculate the standard error in the denominator of the \(z\)-test.

Quick Review Box

• Hypotheses: \(H_0: p_1 = p_2\); \(H_a: p_1 \neq, <, \text{ or } > p_2\).
• Pooling: Only use \(\hat{p}_c\) for tests, not for confidence intervals (which you learned in 3.10).
• Conditions: Random, 10%, and Large Counts (using pooled \(\hat{p}_c\)).
• Conclusion: Always link your p-value to \(\alpha\) and speak in the context of the problem.

Did you know? The reason we pool the data is to reduce the variability of our estimate. Since we are assuming the two groups are actually the same under \(H_0\), combining them gives us a larger sample size, which makes our standard error more accurate!

Summary of Practice Skills

When answering exam questions (especially Free-Response Question 3):
Justify: Don't just list conditions; show the math for the Large Counts check.
Interpret: Explain what the p-value means (e.g., "The probability of seeing a difference this large or larger by chance alone, assuming the proportions are equal...").
Communicate: Avoid using "it." Say "The proportion of all students who..." to be specific!