You're trying to compare proportions from two independent samples: people from New York and people from Chicago, each answering whether they prefer their own city's pizza. The numbers in parentheses, like (23 + 15 + 12) = 50 and (20 + 5 + 18) = 43, are just different categories or subgroups that are being summed up. They might represent age groups, boroughs, etc., but you can ignore their individual meaning here — what matters is the total number of "yes" responses in each group:
- New York: 50 said yes out of 100.
- Chicago: 43 said yes out of 100.
So you're comparing:
- p1 = 50/100 = 0.50 (New York)
- p2 = 43/100 = 0.43 (Chicago)
Find the test statistic Z-Value:
We're doing a two-proportion z-test with null hypothesis.
H0 : p1 = p2
Ha : p1 does not equal p2 (claiming opinions are different).
Compute the pooled proportion:
Phat = (x1 + x2)/(n1 + n2) = (50+43)/(100+100) = 93/200 = 0.465
Compute the standard error (SE):
SE = √ phat(1 - phat)(1/n1 + 1/n2) = √(0.465)(0.535)(1/100 + 1/100) = √(0.248775)(0.02) = √0.0049755 = 0.0705
Compute z-value:
z = (p1hat - p2hat)/SE = (0.50 - 0.43)/(0.0705) = 0.07/0.0705 ≈ 0.993
What about the claim? Let's now assess whether the difference is statistically significant.
Option A: Use critical values
For a two-tailed test at significance level α = 0.05, the critical z-values are: ± 1.96.
Since our z-value is 0.993, which lies within the range -1.96 < z < 1.96, we fail to reject the null hypothesis.
Option B: Use p-value
A z-score of 0.993 corresponds to a p-value = 0.32 (from z-tables).
Since p = 0.32 > 0.05, again, we fail to reject the null hypothesis.
Final Conclusion:
There is not enough evidence to say that the opinions are different between the two cities. The observed difference could easily be due to random chance.