Two-Sample Proportion Test Setup
What you'll learn: How to set up hypothesis tests that compare proportions between two independent groups.
The Core Idea
You've learned how to test a single proportion against a known value. But what if you want to compare two proportions from different groups? For example: Does the conversion rate differ between website version A and B? Do men and women vote differently on a proposal? This is where the two-sample proportion test comes in.
Just like other two-sample tests you've encountered, you're comparing two independent groups—but now your outcome is categorical (success/failure) rather than continuous.
Formulating the Hypotheses
The setup follows the familiar pattern, but focuses on the difference between two population proportions:
Null Hypothesis (H₀): The two population proportions are equal.
- Mathematically: H₀: p₁ = p₂, or equivalently H₀: p₁ - p₂ = 0
Alternative Hypothesis (H₁): The proportions differ (or one is greater/less than the other).
- Two-tailed: H₁: p₁ ≠ p₂ (testing for any difference)
- One-tailed: H₁: p₁ > p₂ or H₁: p₁ < p₂ (testing for a specific direction)
Example Scenario
Suppose you're testing two ad campaigns. Campaign A showed 120 conversions out of 1000 impressions (p̂₁ = 0.12), and Campaign B showed 150 conversions out of 1000 impressions (p̂₂ = 0.15).
Your hypotheses might be:
- H₀: p₁ = p₂ (no difference in true conversion rates)
- H₁: p₁ ≠ p₂ (the campaigns have different conversion rates)
Key Takeaway: The two-sample proportion test compares proportions from two independent groups by testing whether the difference between population proportions (p₁ - p₂) equals zero, using the same hypothesis-testing framework you've applied to means.