Use a x2 test to test the claim that in the given contigency table, the row variable and the column variable are independent.
Use the sample data below to test whether car color affects the likelihood of being in an accident. Use significance level of 0.01

red blue white
car was in accident 28 33 36
car was not in accident 23 22 30

Please show steps so I can understand the process

2. The null hypothesis is that color does NOT effect the likelihood of an accident. We want to see if there is enough evidence to reject that hypothesis.

Of the 172 total cars, 97 cars have been in accidents and 75 cars have not.

Also there are 51 red cars, 55 blue cars, and 66 red cars.

Now if the color of the car does not effect the likelihood of an accident, we would expect (51/172)*97 red cars to have been in an accident; (55/172)*97 blue cars to have been in an accident; and (66/172)*97 white cars to have been in an accident.

Similary, we would expect (51/172)*75 red cars to have NOT been in an accident; (55/172)*75 blue cars to have not been in an accident; and (66/172)*75 white cars to have not been in an accident.

The test stastitic for this hypothesis test is $Q = \sum_{i=1}^{2} \sum_{j=1}^{3} \frac{(O_{ij}-E_{ij})^{2}}{E_{ij}}$

where $O_{ij}$ is the observed number of cars with property "i" that are of the color "j", and $E_{ij}$ is the expected number of cars with property "i" that are of the color "j". ( $O_{11}$ , for example, would be the observed number of red cars that have been in an accident, and $O_{21}$ would be the observed number of red cars that have NOT been in an accident.)

Calculate q.

Q follows a $\chi^{2}$-distribution with (2-1)*(3-1) = 2 degrees of freedom.

$\chi^{2}_{0.01}(2)$ = 9.210

So if the calculated value of q is greater than 9.210, there is enough evidence to reject the null hypothesis that color does not effect the likelihood of an accident.

3. ## clarification

so is the calculated q=9.210?
and we reject the hypothesis that car color affects the likelihood of being in an accident?
thanks

4. Originally Posted by tennisair
so is the calculated q=9.210?
and we reject the hypothesis that car color affects the likelihood of being in an accident?
thanks
No. I didn't calculate q. But if q > 9.210, you can reject the null hypothesis at the 0.01 significance level. This would mean that there is enough evidence to suggest that color does effect the likelihood of an accident. If q < 9.210, there is not enough evidence to reject the null hypothesis.

5. q seems to be a very small number

6. Thread closed due to risk of edit-deletes by OP.