Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use R code. Dataset survey in MASS package contains the responses of 237 Statist

ID: 3310867 • Letter: U

Question

Use R code. Dataset survey in MASS package contains the responses of 237 Statistics students at the University of Adelaide to a number of questions. One tested if how much the student smokes (smoke) and how often the student exercises (exer) are independent using chi-sq test. The result, however, got a warning message: In chisq.test(tbl) : Chi-squared approximation may be incorrect. So, 'none' and 'some' categories in 'exer' variable are combined. the following table is the reallocated data:

[,1] [,2]

Heavy 7 4

Never 87 102

Occas 12 7

Regul 9 8

Report the test statistic using the table above. (up to three decimal places, please)

From the previous question, what is the expected value of cell (1,1) (Heavy & [,1])?  (up to three decimal places, please)

Explanation / Answer

applyin chi square test on above data:

test statistic =3.233

expected value of cell (1,1) =5.360

Observed O [,1] [,2] Total heavy 7 4 11 never 87 102 189 occas 12 7 19 regualr 9 8 17 Total 115 121 236 Expected E=rowtotal*column total/grand total [,1] [,2] Total heavy 5.360 5.640 11 never 92.097 96.903 189 occas 9.258 9.742 19 regualr 8.284 8.716 17 Total 115 121 236 chi square =(O-E)^2/E [,1] [,2] Total heavy 0.5017 0.4768 0.978 never 0.2821 0.2681 0.550 occas 0.8118 0.7715 1.583 regualr 0.0619 0.0588 0.121 Total 1.658 1.575 3.2328
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote