(7 points) There is a popular story (among data miners) that there is a correlation between men buying diapers and buying beer while shopping. A student tests this theory by surveying 131 male shoppers as they left a grocery store. The results are summarized in the contingency table. Test for a dependent relationship between buying beer and buying diapers. Conduct this test at the 0.10 significance level.
Bought Diapers Did Not Buy Diapers Totals
Beer 7 46 53
No Beer 11 67 78
Totals 18 113 131
(a) Find the expected frequencies.
Bought Diapers Did Not Buy Diapers Beer
No Beer
(b) Find the test statistic.
(c) Find the critical value.
contingency table
"\\def\\arraystretch{1.5}\n \\begin{array}{c:c:c}\n & diapers & not\\space diapers\\\\ \\hline\n beer & 7 & 46 \\\\\n \\hdashline\n not \\space beer & 11 & 67\n\\end{array}"
a) Find the expected frequencies.
"\\def\\arraystretch{1.5}\n \\begin{array}{c:c:c}\n & diapers & not\\space diapers\\\\ \\hline\n beer & \\frac{(7+11)\\cdot (7+46)}{131}=7.282 & \\frac{(46+7)\\cdot(46+67)}{131} =45.718\\\\\n \\hdashline\n not \\space beer & \\frac{(11+7)\\cdot (11+67)}{131}=10.718 & \\frac{(67+11)\\cdot (67+46)}{131}=67.282\n\\end{array}"
(b) Find the test statistic
"\\chi^{2*}=\\frac{(7-7.282)^2}{7.282}+\\frac{(46-45.718)^2}{45.718}+\\frac{(11-10.718)^2}{10.718}+\\frac{(67-67.282)^2}{67.282}="0.021
(c) Find the critical value
Degrees for freedom DF="(2-1)\\cdot(2-1)=1"
Critical value
"\\chi^2_{kr}=qchisq(1-0.1,1)=2.706"
"\\chi^{2*}<\\chi^2_{kr}" then H0 hypothesis of independence beer and diapers purchases not rejected on level of confidence 1-0,1=0.9
Comments
Leave a comment