Tutorial: Estimating the Difference in Proportions Between Two Communities

Scenario

A study compares the web browser preferences of IT users in two large communities:

  • In Community A, 40% of a sample of 400 IT users prefer one particular browser.
  • In Community B, 30% of a sample of 300 IT users prefer the same browser.

Our goal is to compute a 95% confidence interval for the difference in the proportions between the two communities.


Step-by-Step Solution

1. Point Estimate

Let: - \(\hat{p}_1 = 0.40\) (Community A) - \(\hat{p}_2 = 0.30\) (Community B)

\[ \hat{p}_1 - \hat{p}_2 = 0.40 - 0.30 = 0.10 \quad \text{(or 10%)} \]


2. Standard Error (SE)

Use the formula:

\[ SE = \sqrt{ \frac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \frac{\hat{p}_2(1 - \hat{p}_2)}{n_2} } \]

Substitute values:

\[ SE = \sqrt{ \frac{0.40 \cdot 0.60}{400} + \frac{0.30 \cdot 0.70}{300} } = \sqrt{ 0.0006 + 0.0007 } = \sqrt{0.0013} \approx 0.036 \]


3. Compute the Confidence Interval

At a 95% confidence level, the critical value (z-score) is 1.96.

\[ \text{CI} = (\hat{p}_1 - \hat{p}_2) \pm z \cdot SE = 0.10 \pm (1.96 \cdot 0.036) \] \[ = 0.10 \pm 0.0705 \Rightarrow \text{CI} = (0.0295,\ 0.1705) \]

Convert to percentages:

\[ \text{Confidence Interval} = (2.95\%,\ 17.05\%) \]


Final Interpretation

  • We are 95% confident that the true difference in browser preference rates between the two communities is between 2.95% and 17.05%.
  • Since 0% is not within the interval, we conclude that there is a statistically significant difference in preference rates between these two communities.