Unit 3 · Topic 3.10 Beta

Constructing a Confidence Interval for the Difference Between Two Population Proportions

To estimate p_1 − p_2 , use the two-sample z interval (p-hat_1 − p-hat_2) ±z*√((p-hat_1(1 − p-hat_1))/(n_1) + (p-hat_2(1 − p-hat_2))/(n_2)) after checking random, 10% and large counts for each sample.

Practice 2: Collect DataPractice 3: Analyze DataPractice 4: Interpret Results

Part 1 · Hook

Why this matters

A transit agency asks random samples of city and suburban residents whether they would ride a new train line: 62% of 400 city residents say yes, and 54% of 300 suburban residents do. The gap in the samples is 8 percentage points. But how big is the gap for everyone in the region? A confidence interval for the difference gives a range of plausible values.

Part 2 · Before you start

What this builds on

Part 3 · Prerequisite check

Quick check before you start

1. What critical value z∗z^* goes with 95% confidence?

  1. 1.961.96
  2. 1.6451.645
  3. 2.5762.576
  4. 0.950.95
Show the answer

95% in the middle leaves 2.5% in each tail; z∗=1.96z^* = 1.96.

  • Correct: 1.961.96:
  • 1.6451.645:
  • 2.5762.576:
  • 0.950.95:

2. For independent samples, the standard deviation of p^1−p^2\hat{p}_1 - \hat{p}_2 is found by

  1. adding the two variances, then taking the square root
  2. subtracting the two standard deviations
  3. adding the two standard deviations
  4. averaging the two standard deviations
Show the answer

Variances add for independent samples.

  • Correct: adding the two variances, then taking the square root:
  • subtracting the two standard deviations:
  • adding the two standard deviations:
  • averaging the two standard deviations:

Part 4 · See it

See it first

Number line showing a 95% confidence interval for the city minus suburbs difference in proportions: a dot at the estimate 0.08 and a bar from 0.006 to 0.154, a margin of error of 0.074 on each side, with a dashed line at 0 just left of the bar.
The 95% interval for pcity−psubp_{\text{city}} - p_{\text{sub}}: the sample difference 0.08 plus or minus a margin of error of 0.074. LevlPrep original diagram.

Part 5 · Step by step

How it works, step by step

  1. You want the true difference p1−p2p_1 - p_2 but only have two samplesthe sample difference p^1−p^2\hat{p}_1 - \hat{p}_2 is the point estimate
  2. Sample differences vary with standard deviation p1(1−p1)n1+p2(1−p2)n2\sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}}replace each pp by its p^\hat{p} to get the standard error, since the pps are unknown
  3. The sampling distribution is approximately normal when the four counts reach 10go z∗z^* standard errors each way: (p^1−p^2)(\hat{p}_1 - \hat{p}_2)±z∗p^1(1−p^1)n1+p^2(1−p^2)n2\pm z^* \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}
  4. The method captures the true difference in about 95% of samplessay "we are 95% confident that the interval captures the true difference in proportions", naming the order of subtraction

Part 6 · Key ideas

Key ideas

  • Two-sample z interval: (p^1−p^2)(\hat{p}_1 - \hat{p}_2)±z∗p^1(1−p^1)n1+p^2(1−p^2)n2\pm z^* \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}.
  • Conditions: two independent random samples or two randomly assigned groups; each sample under 10% of its population; at least 10 successes and 10 failures in each sample.
  • Interpret: "We are 95% confident that the interval from ... to ... captures the true difference in the proportions of ... (group 1 minus group 2)."
  • Random assignment allows a cause-and-effect conclusion; random sampling allows generalizing to the populations.

Part 7 · Misconception

A common mistake

The wrong idea: A 95% interval for p1−p2p_1 - p_2 means 95% of the people in group 1 are that much more likely to say yes.

What actually happens: The interval estimates one number, the true difference in the two population proportions. It says nothing about individuals; the 95% describes how often the method captures that number.

Part 8 · Check yourself

Check yourself

Exam-style questions. Anything you miss goes into your review queue.

Table

App use at city and rural stores

A grocery chain takes a random sample of 300 shoppers at its city stores and a separate random sample of 220 shoppers at its rural stores. It asks each shopper whether they order with the chain's app. (Invented data.)
Survey results
StoresUse the appSample sizeSample proportion
City1803000.60
Rural992200.45

1. What is the point estimate of pC−pRp_C - p_R, the difference between the true proportions of city and rural shoppers who use the app?

  1. 0.5370.537
  2. 0.5250.525
  3. 8181
  4. 0.150.15
Show the answer

The point estimate is p^C−p^R\hat{p}_C - \hat{p}_R.

  • 0.5370.537: That is the proportion for both samples together, 279520\frac{279}{520}. It mixes the groups instead of comparing them.
  • 0.5250.525: That averages the two sample proportions. The estimate of a difference is a difference.
  • 8181: That subtracts the counts, 180−99180 - 99. The samples have different sizes, so compare proportions, not counts.
  • Correct: 0.150.15: Right: p^C−p^R\hat{p}_C - \hat{p}_R=0.60−0.45= 0.60 - 0.45=0.15= 0.15.

2. Which statement correctly checks the large counts condition for a confidence interval for pC−pRp_C - p_R?

  1. The counts 180, 120, 99 and 121 are each at least 10
  2. 300(0.5)=150300(0.5) = 150 and 220(0.5)=110220(0.5) = 110 are each at least 10
  3. Each sample proportion is between 0.1 and 0.9
  4. The two sample sizes, 300 and 220, are each at least 30
Show the answer

An interval uses p^1\hat{p}_1 and p^2\hat{p}_2: n1p^1n_1\hat{p}_1, n1(1−p^1)n_1(1 - \hat{p}_1), n2p^2n_2\hat{p}_2, n2(1−p^2)n_2(1 - \hat{p}_2) are each at least 10.

  • Correct: The counts 180, 120, 99 and 121 are each at least 10: Right: for an interval, use the observed successes and failures in each sample: 300−180=120300 - 180 = 120 and 220−99=121220 - 99 = 121.
  • 300(0.5)=150300(0.5) = 150 and 220(0.5)=110220(0.5) = 110 are each at least 10: There is no reason to use 0.5. An interval uses each sample's own p^\hat{p}.
  • Each sample proportion is between 0.1 and 0.9: That is not the condition. The counts of successes and failures must each reach 10.
  • The two sample sizes, 300 and 220, are each at least 30: Comparing nn with 30 is not the check for proportions. Count successes and failures in each sample.

3. What is the standard error of p^C−p^R\hat{p}_C - \hat{p}_R? Give three decimal places.

Type a number. A table answer and a calculator answer are both accepted.

Show the answer

SE\text{SE}=0.60(0.40)300+0.45(0.55)220= \sqrt{\frac{0.60(0.40)}{300} + \frac{0.45(0.55)}{220}}=0.0008+0.001125= \sqrt{0.0008 + 0.001125}=0.0439= 0.0439.

  • Answer: 0.044

4. Construct a 95% confidence interval for pC−pRp_C - p_R. Give each end to three decimal places.

Type the interval as "from a to b".

Show the answer

0.15±1.96(0.0439)0.15 \pm 1.96(0.0439)=0.15±0.086= 0.15 \pm 0.086, from 0.064 to 0.236.

  • Answer: from 0.064 to 0.236

5. Interpret the 95% interval from 0.064 to 0.236 in context.

Write the conclusion in context.

Show the answer

Name the level, the interval and the parameter in context: the true difference, city minus rural.

  • A full-credit answer: We are 95% confident that the interval from 0.064 to 0.236 captures the true difference in the proportions of all city shoppers and all rural shoppers who use the app (city minus rural).

6. A researcher takes independent random samples of 400 nurses and 350 teachers and asks whether each works a second job. She wants to estimate how much the true proportions differ. Which procedure fits?

  1. Two one-sample z intervals, checked for overlap
  2. A two-sample z interval for pN−pTp_N - p_T
  3. A one-proportion z test of H0:p=0.5H_0: p = 0.5
  4. A one-sample z interval for pp, using the 750 people combined
Show the answer

Estimate a difference of two proportions with a two-sample z interval.

  • Two one-sample z intervals, checked for overlap: Overlap of two intervals is a rough and misleading comparison. One interval for the difference answers the question directly.
  • Correct: A two-sample z interval for pN−pTp_N - p_T: Right: two independent random samples, a categorical variable, and an estimate of a difference.
  • A one-proportion z test of H0:p=0.5H_0: p = 0.5: Nothing here is about 0.5, and the goal is to estimate, not to test one proportion.
  • A one-sample z interval for pp, using the 750 people combined: Combining the samples estimates one overall proportion. The question compares two groups.

7. Independent random samples give p^1=0.42\hat{p}_1 = 0.42 with n1=500n_1 = 500 and p^2=0.35\hat{p}_2 = 0.35 with n2=450n_2 = 450. What is the margin of error of a 95% confidence interval for p1−p2p_1 - p_2? Give three decimal places.

Type a number. A table answer and a calculator answer are both accepted.

Show the answer

1.960.42(0.58)500+0.35(0.65)4501.96\sqrt{\frac{0.42(0.58)}{500} + \frac{0.35(0.65)}{450}}=1.96(0.0315)= 1.96(0.0315)=0.062= 0.062.

  • Answer: 0.062

Part 9 · Summary

Summary

To estimate p1−p2p_1 - p_2, use the two-sample z interval (p^1−p^2)(\hat{p}_1 - \hat{p}_2)±z∗p^1(1−p^1)n1+p^2(1−p^2)n2\pm z^* \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}} after checking random, 10% and large counts for each sample. Interpret it as capturing the true difference in proportions, in context and with the order of subtraction named.

Part 10 · Up next

What comes next

Part 11 · Connections

Connections