Two-Sample Z-Interval for Difference in Proportions: Comprehensive Guide

Master two-sample z-intervals for difference in proportions: calculating intervals, interpreting results, and making statistical inferences through these 5 detailed exercises.

Two-Sample Z-Interval Fundamentals
(p̂₁ - p̂₂) ± z* × √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
Z-Interval Formula
Key Definitions:

Sample Proportion (p̂): Number of successes divided by sample size

Difference in Proportions (p̂₁ - p̂₂): Point estimate of true difference

Standard Error: √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

Critical Value (z*): Multiplier for desired confidence level

Success-Failure Condition: np̂ ≥ 5 and n(1-p̂) ≥ 5 for both samples

5-Step Procedure:
  1. Check conditions: Independent samples, success-failure condition
  2. Calculate sample proportions: p̂₁ = x₁/n₁, p̂₂ = x₂/n₂
  3. Find critical value: Based on confidence level
  4. Calculate interval: Point estimate ± margin of error
  5. Interpret results: In context of original question
Tip 1: Always check success-failure condition: np̂ ≥ 5 and n(1-p̂) ≥ 5
Tip 2: The interval estimates p₁ - p₂ (not p₂ - p₁)
Tip 3: If 0 is in the interval, no significant difference exists
When to Use: Comparing proportions from two independent samples
Assumptions: Random samples, independence, normal approximation validity
Solution: Exercises 1 to 3
1 Two-Group Comparison
Exercise 1
In a survey, 120 out of 200 urban residents support a policy, while 80 out of 150 rural residents support it. Construct a 95% confidence interval for the difference in support proportions.
Problem Setup:

Urban: n₁ = 200, x₁ = 120, p̂₁ = 120/200 = 0.60

Rural: n₂ = 150, x₂ = 80, p̂₂ = 80/150 = 0.533

Interval Construction:

95% confidence level, so z* = 1.96

Step 1: Check conditions

Urban: n₁p̂₁ = 200 × 0.60 = 120 ≥ 5 ✓

n₁(1-p̂₁) = 200 × 0.40 = 80 ≥ 5 ✓

Rural: n₂p̂₂ = 150 × 0.533 = 80 ≥ 5 ✓

n₂(1-p̂₂) = 150 × 0.467 = 70 ≥ 5 ✓

Step 2: Calculate point estimate

p̂₁ - p̂₂ = 0.60 - 0.533 = 0.067

Step 3: Calculate standard error

SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

SE = √[(0.60 × 0.40/200) + (0.533 × 0.467/150)]

SE = √[0.0012 + 0.00167] = √0.00287 = 0.0536

Step 4: Calculate margin of error

ME = z* × SE = 1.96 × 0.0536 = 0.105

Step 5: Construct interval

CI = (p̂₁ - p̂₂) ± ME = 0.067 ± 0.105

CI = (-0.038, 0.172)

Step 6: Interpret results

Since 0 is in the interval, no significant difference in support

Urban residents may support the policy 3.8% less to 17.2% more than rural residents

Final Answer:

95% CI for p₁ - p₂: (-0.038, 0.172)

No significant difference in support between urban and rural residents

Applied Rules:

• Success-Failure Condition: np̂ ≥ 5 and n(1-p̂) ≥ 5 for both samples

• Standard Error: SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

• Interpretation: If 0 is in interval, no significant difference

2 Higher Confidence Level
Exercise 2
A study found that 45 of 100 students passed using Method A, while 35 of 80 students passed using Method B. Construct a 99% confidence interval for the difference in pass rates.
Problem Setup:

Method A: n₁ = 100, x₁ = 45, p̂₁ = 45/100 = 0.45

Method B: n₂ = 80, x₂ = 35, p̂₂ = 35/80 = 0.4375

Step 1: Check conditions

Method A: n₁p̂₁ = 100 × 0.45 = 45 ≥ 5 ✓

n₁(1-p̂₁) = 100 × 0.55 = 55 ≥ 5 ✓

Method B: n₂p̂₂ = 80 × 0.4375 = 35 ≥ 5 ✓

n₂(1-p̂₂) = 80 × 0.5625 = 45 ≥ 5 ✓

Step 2: Calculate point estimate

p̂₁ - p̂₂ = 0.45 - 0.4375 = 0.0125

Step 3: Calculate standard error

SE = √[(0.45 × 0.55/100) + (0.4375 × 0.5625/80)]

SE = √[0.002475 + 0.003086] = √0.005561 = 0.0746

Step 4: Find critical value

For 99% confidence: z* = 2.576

Step 5: Calculate margin of error

ME = 2.576 × 0.0746 = 0.192

Step 6: Construct interval

CI = 0.0125 ± 0.192 = (-0.1795, 0.2045)

Step 7: Interpret results

Since 0 is in the interval, no significant difference at 99% confidence

Method A may have 17.95% lower to 20.45% higher pass rate than Method B

Final Answer:

99% CI for p₁ - p₂: (-0.1795, 0.2045)

No significant difference in pass rates between methods

Applied Rules:

• Higher Confidence: Larger z* value widens interval

• Interval Width: Increases with confidence level

• Significance: If 0 in interval, no significant difference

3 Political Polling
Exercise 3
A poll shows 65% of 800 men support a candidate, while 70% of 750 women support the same candidate. Construct a 90% confidence interval for the gender difference in support.
Problem Setup:

Men: n₁ = 800, p̂₁ = 0.65, x₁ = 800 × 0.65 = 520

Women: n₂ = 750, p̂₂ = 0.70, x₂ = 750 × 0.70 = 525

Step 1: Check conditions

Men: n₁p̂₁ = 800 × 0.65 = 520 ≥ 5 ✓

n₁(1-p̂₁) = 800 × 0.35 = 280 ≥ 5 ✓

Women: n₂p̂₂ = 750 × 0.70 = 525 ≥ 5 ✓

n₂(1-p̂₂) = 750 × 0.30 = 225 ≥ 5 ✓

Step 2: Calculate point estimate

p̂₁ - p̂₂ = 0.65 - 0.70 = -0.05

Step 3: Calculate standard error

SE = √[(0.65 × 0.35/800) + (0.70 × 0.30/750)]

SE = √[0.000284 + 0.000280] = √0.000564 = 0.0237

Step 4: Find critical value

For 90% confidence: z* = 1.645

Step 5: Calculate margin of error

ME = 1.645 × 0.0237 = 0.039

Step 6: Construct interval

CI = -0.05 ± 0.039 = (-0.089, -0.011)

Step 7: Interpret results

Since 0 is not in the interval, there is a significant difference

Women support the candidate 1.1% to 8.9% more than men

Final Answer:

90% CI for p₁ - p₂: (-0.089, -0.011)

Women support the candidate significantly more than men

Applied Rules:

• Significant Difference: If 0 not in interval

• Direction: Negative interval means p₁ < p₂

• Large Samples: Normal approximation highly reliable

Solution: Exercises 4 to 5
4 Technology Adoption
Exercise 4
A study found that 75 of 150 younger adults (ages 18-35) use social media daily, while 45 of 120 older adults (ages 55+) use it daily. Construct a 95% confidence interval and interpret the results.
Problem Setup:

Younger: n₁ = 150, x₁ = 75, p̂₁ = 75/150 = 0.50

Older: n₂ = 120, x₂ = 45, p̂₂ = 45/120 = 0.375

Step 1: Check conditions

Younger: n₁p̂₁ = 150 × 0.50 = 75 ≥ 5 ✓

n₁(1-p̂₁) = 150 × 0.50 = 75 ≥ 5 ✓

Older: n₂p̂₂ = 120 × 0.375 = 45 ≥ 5 ✓

n₂(1-p̂₂) = 120 × 0.625 = 75 ≥ 5 ✓

Step 2: Calculate point estimate

p̂₁ - p̂₂ = 0.50 - 0.375 = 0.125

Step 3: Calculate standard error

SE = √[(0.50 × 0.50/150) + (0.375 × 0.625/120)]

SE = √[0.00167 + 0.00195] = √0.00362 = 0.0602

Step 4: Find critical value

For 95% confidence: z* = 1.96

Step 5: Calculate margin of error

ME = 1.96 × 0.0602 = 0.118

Step 6: Construct interval

CI = 0.125 ± 0.118 = (0.007, 0.243)

Step 7: Interpret results

Since 0 is not in the interval, there is a significant difference

Younger adults use social media 0.7% to 24.3% more than older adults

Final Answer:

95% CI for p₁ - p₂: (0.007, 0.243)

Younger adults use social media significantly more than older adults

Applied Rules:

• Positive Interval: p₁ > p₂ (first group has higher proportion)

• Significance: Interval not containing 0 indicates difference

• Practical Range: Shows possible magnitude of difference

5 Educational Comparison
Exercise 5
In two schools, 85 of 200 students in School A passed an exam, while 90 of 180 students in School B passed. Construct a 99% confidence interval and determine if there's a significant difference.
Problem Setup:

School A: n₁ = 200, x₁ = 85, p̂₁ = 85/200 = 0.425

School B: n₂ = 180, x₂ = 90, p̂₂ = 90/180 = 0.50

Step 1: Check conditions

School A: n₁p̂₁ = 200 × 0.425 = 85 ≥ 5 ✓

n₁(1-p̂₁) = 200 × 0.575 = 115 ≥ 5 ✓

School B: n₂p̂₂ = 180 × 0.50 = 90 ≥ 5 ✓

n₂(1-p̂₂) = 180 × 0.50 = 90 ≥ 5 ✓

Step 2: Calculate point estimate

p̂₁ - p̂₂ = 0.425 - 0.50 = -0.075

Step 3: Calculate standard error

SE = √[(0.425 × 0.575/200) + (0.50 × 0.50/180)]

SE = √[0.00122 + 0.00139] = √0.00261 = 0.0511

Step 4: Find critical value

For 99% confidence: z* = 2.576

Step 5: Calculate margin of error

ME = 2.576 × 0.0511 = 0.132

Step 6: Construct interval

CI = -0.075 ± 0.132 = (-0.207, 0.057)

Step 7: Interpret results

Since 0 is in the interval, there is no significant difference at 99% confidence

School A may have 20.7% lower to 5.7% higher pass rate than School B

Final Answer:

99% CI for p₁ - p₂: (-0.207, 0.057)

No significant difference in pass rates between schools at 99% confidence

Applied Rules:

• Higher Confidence: Makes it harder to detect differences

• Wider Interval: 99% CI is wider than 95% CI

• Practical Significance: Even non-significant results may be meaningful

Comprehensive Two-Sample Z-Interval Guide
CI = (p̂₁ - p̂₂) ± z* × √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]
Complete Formula
Point Estimate
p̂₁ - p̂₂
Difference in sample proportions
Standard Error
SE = √[SE₁² + SE₂²]
Variability of difference
Margin of Error
ME = z* × SE
Uncertainty multiplier
Key Interval Concepts:

Population Proportions (p₁, p₂): True proportions in respective populations

Sample Proportions (p̂₁, p̂₂): Observed proportions in samples

Sampling Distribution: (p̂₁ - p̂₂) ~ N(p₁-p₂, SE²) when conditions are met

Independence: Samples must be independent of each other

Random Sampling: Both samples must be randomly selected

Interpretation Guidelines:

If 0 is in the interval: No significant difference between proportions

If 0 is not in the interval: Significant difference exists

If interval is entirely positive: p₁ > p₂

If interval is entirely negative: p₁ < p₂

Memory Tip: "If zero fits, no difference sits" - Zero in interval means no significant difference
Memory Tip: "Subtract same way every time" - Always p₁ - p₂ in same order
Memory Tip: "Larger confidence = wider interval" - Higher confidence level creates wider range
Common Mistakes: Forgetting to check conditions, misinterpreting signs, confusing sample and population
Reporting Best Practices: Include confidence level, interval bounds, and contextual interpretation

Questions & Answers

Question: Why do we use separate standard errors for each sample rather than pooling them like in hypothesis tests? What's the difference?

Answer: This is a great question that highlights an important distinction between confidence intervals and hypothesis tests:

Confidence Intervals: We estimate the difference p₁ - p₂ without assuming anything about the true values. We use the individual sample proportions to estimate their own standard errors:

SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

Hypothesis Tests: We test H₀: p₁ = p₂, so we assume they're equal under the null hypothesis. We pool the samples to get a better estimate of the common proportion:

p_pool = (x₁ + x₂)/(n₁ + n₂)

SE = √[p_pool(1-p_pool)(1/n₁ + 1/n₂)]

Intuitive Reasoning: In confidence intervals, we're trying to estimate the true difference without restrictions. In hypothesis tests, we're testing a specific assumption (that the proportions are equal), so we use that assumption to improve our estimate of the standard error.

This approach ensures that the confidence interval and hypothesis test are consistent with their respective goals.

Question: How does sample size affect the width of a two-sample proportion confidence interval? Can you explain the mathematical relationship?

Answer: Sample size has a direct impact on interval width through the standard error:

Mathematical Relationship:

SE = √[(p̂₁(1-p̂₁)/n₁) + (p̂₂(1-p̂₂)/n₂)]

As n₁ and n₂ increase, the denominators increase, making the fractions smaller, which makes the entire standard error smaller.

Quantitative Effect:

  • If sample sizes quadruple, SE decreases by half
  • Interval width decreases by half
  • For example: If n₁ = 100 and n₂ = 100, then n₁ = 400 and n₂ = 400 would halve the SE

Practical Implications:

  • Larger samples = More precise estimates
  • Narrower intervals = More confident in the estimate
  • Diminishing returns as samples get very large

Cost-Benefit: Doubling precision requires quadrupling sample size, so there's a trade-off between precision and resource requirements.

Question: How do I interpret a confidence interval that includes both positive and negative values? What does this tell me about the relationship between the groups?

Answer: When a confidence interval for p₁ - p₂ includes both positive and negative values, it contains zero, which has important implications:

Statistical Interpretation:

  • No significant difference: The data doesn't provide strong evidence that p₁ ≠ p₂
  • Compatible with equality: The true difference could plausibly be zero
  • Uncertain direction: We can't confidently say which proportion is larger

Practical Meaning:

  • The observed difference could be due to random sampling variation
  • Any apparent difference might not be real
  • More data might be needed to detect a true difference

Example: If CI = (-0.05, 0.10), this means:

  • Group 1 could be 5% lower than Group 2
  • Group 1 could be 10% higher than Group 2
  • They could be essentially equal
  • We cannot conclude which group has the higher proportion

Decision Making: When the interval includes zero, we typically conclude that there's no statistically significant difference between the groups, but this doesn't prove they're equal—just that we lack evidence of a difference.