In: Statistics and Probability
1. In a survey of exercise habits, 15 out of 50 Americans aged 20-29 and 10 out of 60 Americans aged 40-49 reported riding a bicycle at least once a week. Let pA be the true proportion of Americans aged 18-29 who ride a bicycle once a week, and define pB similarly for the 40-49 group.
(a) Construct a 90% two-sided confidence interval for pA − pB.
(b) Construct a 99% confidence interval for pA − pB of the form (a,∞).
(c) Test for a difference in proportions using α = 0.05. Conduct the test by computing a test statistic and comparing it to a critical value.
(d) Redo the test using a P-value.
(e) State your conclusion to the hypothesis test in context.
Part a)
(p̂1 - p̂2) ± Z(α/2) * √( ((p̂1 * q̂1)/ n1) + ((p̂2 * q̂2)/ n2)
)
Z(α/2) = Z(0.1 /2) = 1.645
Lower Limit = ( 0.3 - 0.1667 )- Z(0.1/2) * √(((0.3 * 0.7 )/ 50 ) +
((0.1667 * 0.8333 )/ 60 ) = 0.0006
upper Limit = ( 0.3 - 0.1667 )+ Z(0.1/2) * √(((0.3 * 0.7 )/ 50 ) +
((0.1667 * 0.8333 )/ 60 )) = 0.2661
90% Confidence interval is ( 0.0006 , 0.2661 )
( 0.0006 < ( P1 - P2 ) < 0.2661 )
Part b)
(p̂1 - p̂2) ± Z(α/2) * √( ((p̂1 * q̂1)/ n1) + ((p̂2 * q̂2)/ n2)
)
Z(α/2) = Z(0.01 /2) = 2.576
Lower Limit = ( 0.3 - 0.1667 )- Z(0.01/2) * √(((0.3 * 0.7 )/ 50 ) +
((0.1667 * 0.8333 )/ 60 ) = -0.0746
upper Limit = ( 0.3 - 0.1667 )+ Z(0.01/2) * √(((0.3 * 0.7 )/ 50 ) +
((0.1667 * 0.8333 )/ 60 )) = 0.3413
99% Confidence interval is ( -0.0746 , 0.3413 )
( -0.0746 < ( P1 - P2 ) < 0.3413 )
( -ꝏ , - 0.0746 ) U ( 0.3413 , ꝏ )
Part c)
p̂1 = 15 / 50 = 0.3
p̂2 = 10 / 60 = 0.1667
To Test :-
H0 :- P1 = P2
H1 :- P1 ≠ P2
Test Statistic :-
Z = ( p̂1 - p̂2 ) / √( p̂ * q̂ * (1/n1 + 1/n2) ))
p̂ is the pooled estimate of the proportion P
p̂ = ( x1 + x2) / ( n1 + n2)
p̂ = ( 15 + 10 ) / ( 50 + 60 )
p̂ = 0.2273
q̂ = 1 - p̂ = 0.7727
Z = ( 0.3 - 0.1667) / √( 0.2273 * 0.7727 * (1/50 + 1/60) )
Z = 1.6616
Test Criteria :-
Reject null hypothesis if Z > Z(α/2)
Z(α/2) = Z(0.05/2) = 1.96
Z < Z(α/2) = 1.6616 < 1.96, hence we fail to reject the null
hypothesis
Conclusion :- We Fail to Reject H0
part d)
Decision based on P value
P value = 2 * P ( Z < 1.6616 ) = 0.0966
Reject null hypothesis if P value < α = 0.05
Since P value = 0.0966 > 0.05, hence we fail to reject the null
hypothesis
Conclusion :- We Fail to Reject H0
Part e)
There is no difference in proportion of riding a bicycle at least once a week.