Question: please fill in the blanks below (5)(c) (3 points) 'Manually' calculate the chi-squared statistic and p-value of the table from (5)(a). The *addmargins()* function can
please fill in the blanks below

(5)(c) (3 points) 'Manually' calculate the chi-squared statistic and p-value of the table from (5)(a). The *addmargins()* function can be used to add row and column sums to the table; useful for calculating the expected values for each cell. You should be able to match the chi-squared and p-values from (5)(b). The underlying code for the *chisq. test()* function can be viewed by entering *chisq. test* - without parentheses - in the Console. You are given code below to create the table, add row and column sums and calculate the expected values for the for the first two (2) of three (3) rows. You will need to add code to calculate the expected values for the third row and the chi-squared. The *pchisq()* function can be used to return the p-value. "{r test5c}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
