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

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

Calculate q.

Q follows a -distribution with (2-1)*(3-1) = 2 degrees of freedom.

= 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.