In: Statistics and Probability
A random sample of 220 women and 210 me coffee drinkers were questioned. The result was that 71 of the women and 58 of the men preferred decaffeinated coffee. Create a 95% Confidence interval around the difference of the means of the 2 groups. Does the data establish that the proportion of women coffee drinkers who prefer decaf coffee is the same as the corresponding proportion for men?
Here the proportion that women who prefer decaf coffee is ;
x= 71
n1= 220
= 0.3227273
Similarly proportion that women who prefer decaf coffee is ;
y= 58
n2= 210
= 0.2761905
Here to test whether the data establish that the proportion of women coffee drinkers who prefer decaf coffee is the same as the corresponding proportion for men;
The null hypothesis will be
And the alternative hypothesis given as
Now obtaining pooled sample proportion
p = (p1 * n1 + p2 * n2) / (n1 + n2)
=(71+58)/(220+210)
= 0.3
Now calculating
= 0.1026911
The test statistic is given as
= ( 0.3227273 - 0.2761905) / 0.1026911
= 0.4531727
Calculating the p-value for z = 0.4531727, since the test is two tail test
2P(Z > |z|) = 0.6504
At 5 % level of significance
p-value > = 0.05
We fail to reject null hypothesis .
There is sufficient evidence that the proportion of women coffee drinkers who prefer decaf coffee is the same as the corresponding proportion for men;
Obtaining 95% confidence interval
Upper limit
=
= 0.1329874
Lower limit
= =
-0.03991384
The confidence interval is given as
( -0.03991384, 0.1329874)
( Verifying using R-output
)