In: Statistics and Probability
~~~~~~~~~~~~TO BE COMPLETED USING RSTUDIO~~~~~~~~~~~~~~
~~~~~~~~~~~~(Please display all RCode used)~~~~~~~~~~~~~~
Independence
Are all employees equally prone to having accidents? To investigate this hypothesis, a researcher looked at a light manufacturing plant and classified the accidents by type and by age of the employee. The observed results of the study are found below:
Age | Under 25 | 25 or over | Total |
Sprain | 1111 | 6161 | 7272 |
Burn | 1818 | 1414 | 3232 |
Cut | 1010 | 1212 | 2222 |
Total | 3939 | 8787 | 126126 |
Determine whether age is independent of accident type using
?=0.04α=0.04. Follow the steps outlined in the assignment
instructions.
(a) Write the null and alternative hypotheses for this test.
(b) Use the matrix instruction to create and display a table of values, with correct labels on rows and
columns.
(c) Obtain the test statistic and the P-value of the test using the chisq.test instruction.
(d) Display the expected values. Are assumptions for the test satisfied?
(e) Is age independent of accident type? Explain.