In: Statistics and Probability
Here's data on randomly sampled seat belt users in New York City where seat belts are required and in Boston where they are not required.
Drivers | Wearing Seat Belts |
|
NYC | 220 | 183 |
Boston | 117 | 68 |
Let
p1 = proportion of NYC drivers wearing seat belts
p2 = proportion of Boston drivers wearing seat belts
Find
We have to check there is significance between New York City drivers wearing seat belts and in Boston drivers wearing seat belts.
Set hypothesis:
H0: There is no significance difference between NYC drivers wearing seat belts and Boston drivers wearing seat belts (i.e p1 = p2)
Ha: There is significance difference between NYC drivers wearing seat belts and Boston drivers wearing seat belts (i.e p1 ≠ p2)
We are using two sample proportion test,
Test statistic:
Where p1 = proportion of NYC drivers wearing seat belts = 183 / 220 = 0.8318
P2 = proportion of Boston drivers wearing seat belts = 68 / 117 = 0.5812
Calculate SE,
SE = sqrt{ p * ( 1 - p ) * [ (1/n1) + (1/n2) ] }
So,
p = (p1 * n1 + p2 * n2) / (n1 + n2)
= [(0.8318*220 + 0.5812*117) / (220 + 117)]
p = 0.744807
Therefore,
SE = sqrt{ p * ( 1 - p ) * [ (1/n1) + (1/n2) ] }
= sqrt{0.744807*(1-0.744807)*[(1/200) + (1/117)]
SE = 0.049987
Calculate Test statistic,
P-value:
Since we have two-tailed test, the P-value is the probability that the z-score is less than -5.0240 and Greater than 5.0240
Find, P(z<-5.0240) + P(z>5.0240) = <0.0001.
Note: This p-value we have to calculate by using google link as below.
https://www.socscistatistics.com/pvalues/normaldistribution.aspx.
Decision: P-value is less than 0.05 then reject H0.
i.e p1 ≠ p2
Conclusion:
There is significance difference between NYC drivers wearing seat belts and Boston drivers wearing seat belts