Tests for Proportions

One-sample and two-sample z-tests

Hypothesis Tests for Proportions

One-Sample z-Test for Proportion

Test: Does sample provide evidence that population proportion differs from claimed value?

Hypotheses:

  • H₀: p = p₀
  • Hₐ: p ≠ p₀ (or p > p₀ or p < p₀)

Conditions:

  • Random sample
  • np₀ ≥ 10 and n(1-p₀) ≥ 10 (use p₀, not p̂!)
  • n < 10% of population

Test Statistic

z=p^p0p0(1p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

Note: Use p₀ (null value) in SE, not p̂

Under H₀: z follows standard normal distribution

P-Value Calculation

Two-sided (Hₐ: p ≠ p₀): P-value = 2 × P(Z ≥ |z|)

Right-sided (Hₐ: p > p₀): P-value = P(Z ≥ z)

Left-sided (Hₐ: p < p₀): P-value = P(Z ≤ z)

Calculator: normalcdf

Example 1: Two-Sided Test

Claim: Coin is fair. Flip 100 times, get 58 heads. Test at α = 0.05.

STATE:

  • Parameter: p = true proportion of heads
  • H₀: p = 0.5
  • Hₐ: p ≠ 0.5
  • α = 0.05

PLAN:

  • One-sample z-test for proportion
  • Random: Assume ✓
  • Normal: 100(0.5) = 50 ≥ 10, 100(0.5) = 50 ≥ 10 ✓
  • Independent: 100 < all possible flips ✓

DO:

p^=58100=0.58\hat{p} = \frac{58}{100} = 0.58

z=0.580.50.5(0.5)100=0.080.05=1.6z = \frac{0.58 - 0.5}{\sqrt{\frac{0.5(0.5)}{100}}} = \frac{0.08}{0.05} = 1.6

P-value = 2 × P(Z ≥ 1.6) = 2(0.0548) ≈ 0.1096

CONCLUDE: P-value = 0.1096 > 0.05, fail to reject H₀. Insufficient evidence coin is unfair.

Example 2: One-Sided Test

Company claims > 80% customer satisfaction. Survey 200, find 168 satisfied.

STATE:

  • p = true proportion satisfied
  • H₀: p = 0.8
  • Hₐ: p > 0.8
  • α = 0.05

PLAN:

  • One-sample z-test for proportion
  • Conditions: ✓ (check all three)

DO:

p^=168200=0.84\hat{p} = \frac{168}{200} = 0.84

z=0.840.80.8(0.2)200=0.040.02831.41z = \frac{0.84 - 0.8}{\sqrt{\frac{0.8(0.2)}{200}}} = \frac{0.04}{0.0283} \approx 1.41

P-value = P(Z ≥ 1.41) ≈ 0.079

CONCLUDE: P-value = 0.079 > 0.05, fail to reject H₀. Insufficient evidence satisfaction exceeds 80%.

Two-Sample z-Test for Proportions

Compare two proportions:

Hypotheses:

  • H₀: p₁ = p₂ (or p₁ - p₂ = 0)
  • Hₐ: p₁ ≠ p₂ (or p₁ > p₂ or p₁ < p₂)

Test Statistic:

z=(p^1p^2)0p^c(1p^c)(1n1+1n2)z = \frac{(\hat{p}_1 - \hat{p}_2) - 0}{\sqrt{\hat{p}_c(1-\hat{p}_c)\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}

Where pooled proportion:

p^c=x1+x2n1+n2\hat{p}_c = \frac{x_1 + x_2}{n_1 + n_2}

Key: Pool data under assumption p₁ = p₂ (H₀)

Conditions for Two-Sample Test

Both samples:

  • Random/independent
  • n₁p̂c ≥ 10, n₁(1-p̂c) ≥ 10
  • n₂p̂c ≥ 10, n₂(1-p̂c) ≥ 10
  • n₁ < 10%N₁, n₂ < 10%N₂

Example 3: Two-Sample Test

Treatment vs Placebo:

  • Treatment: 45/100 improved
  • Placebo: 30/100 improved

STATE:

  • p₁ = proportion improved with treatment
  • p₂ = proportion improved with placebo
  • H₀: p₁ = p₂
  • Hₐ: p₁ > p₂
  • α = 0.05

PLAN:

  • Two-sample z-test
  • Conditions: ✓

DO:

p^1=0.45,p^2=0.30\hat{p}_1 = 0.45, \quad \hat{p}_2 = 0.30

p^c=45+30100+100=75200=0.375\hat{p}_c = \frac{45 + 30}{100 + 100} = \frac{75}{200} = 0.375

z=0.450.300.375(0.625)(1100+1100)=0.150.00472.19z = \frac{0.45 - 0.30}{\sqrt{0.375(0.625)(\frac{1}{100} + \frac{1}{100})}} = \frac{0.15}{\sqrt{0.0047}} \approx 2.19

P-value = P(Z ≥ 2.19) ≈ 0.014

CONCLUDE: P-value = 0.014 < 0.05, reject H₀. Sufficient evidence treatment proportion exceeds placebo.

Calculator Commands (TI-83/84)

One-sample: STAT → TESTS → 5:1-PropZTest

  • p₀, x, n, direction
  • Calculate

Two-sample: STAT → TESTS → 6:2-PropZTest

  • x₁, n₁, x₂, n₂, direction
  • Calculate

Common Mistakes

❌ Using p̂ instead of p₀ in SE for one-sample
❌ Not pooling for two-sample test
❌ Checking conditions with p̂ instead of p₀
❌ Wrong P-value for one-sided vs two-sided
❌ Forgetting to check conditions

When to Use

One-sample: Comparing proportion to claimed value

Two-sample: Comparing two independent groups

Paired: If data paired, analyze differences (not proportions)

Quick Reference

One-sample:

  • Test statistic: z=p^p0p0(1p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}
  • Use p₀ in SE

Two-sample:

  • Test statistic uses pooled p̂c
  • Pool assuming H₀: p₁ = p₂ is true

Conditions: Random, normal (np ≥ 10, n(1-p) ≥ 10), independent

Remember: For proportions, use z-test (not t). Check conditions with null hypothesis values!

📚 Practice Problems

No example problems available yet.