In: Statistics and Probability
A study is conducted to assess whether residents in City A spent a different out-of-pocket amount on prescription medications from residents in City B last year. The study is restricted to residents who are 50 years of age or older. Residents are selected at random. For each resident, the total amount of dollars spent on prescription medications over the last year is recorded. The summary statistics of the sample data are given in the table below.
Let μ1 be the mean out-of-pocket amount that residents in City A spent, and μ2 be the mean out-of-pocket amount that residents in City B spent. Run a two-sample t-test assuming equal variances. Use a significance level of 0.05.
City Sample size Sample mean Sample standard deviation
A 40 381 39 B 52 422 45
Write down the null hypothesis. (5 points)
Write down the alternative hypothesis. (5 points)
Calculate the point estimate for μ1 − μ2. (5 points)
Calculate the pooled sample variance. (10 points)
Calculate the standard error of the point estimate in c. (10 points)
Calculate the test statistic. (10 points)
Find out the critical value. (5 points)
Is there a statistically significant difference in the out-of-pocket amount spent on prescription medications between City A and City B? (5 points)
Write down the null hypothesis.
Nul hypothesis:
Ho:μ1=μ2
Alternative hypothesis
Ha::μ1 μ2
Calculate the point estimate for μ1 − μ2. (5 points)
point estimate for μ1 − μ2=sample mean of A -sample mean of B
=381 -422
= -41
Calculate the pooled sample variance
Sp^2=(n1-1)*s1^2+(n2-1)*s2^2/n1+n2-2
=((40-1)*39 ^2+(52-1)*45^2)/((40+52-2))
=1806.6
Calculate the standard error of the point estimate in c.
S(m1-m2)=sqrt(Sp^2/n1+Sp^2/n2)
=sqrt((1806.6/40)+(1806.6/52))
=8.939089
Calculate the test statistic.
t=x1-x2/Sp*sqrt(1/n1+1/n2)
Sp=sqrt(1806.6)=42.50412
t=(381 -422)/(42.50412*sqrt((1/40)+(1/52)))
t=-4.586597
Find out the critical value
df=n1+n2-2
df=40+52-2=90
=T.INV.2T(0.05,90)
=1.986674541
critical t values are:
-1.986674541 and +1.986674541
Is there a statistically significant difference in the out-of-pocket amount spent on prescription medications between City A and City B?
test statistic,t<-1.9867
Reject Ho.
There is sufficient statistical evdience at 5% level of significance to conclude that there a statistically significant difference in the out-of-pocket amount spent on prescription medications between City A and City B