problem-9.11

problem-9.11  The accident data can be entered in using cbind as follows:
> accidents = cbind(
+ none=c(67,42,75,56,57),
+ minor=c(10,6,8,4,15),
+ major=c(5,5,4,6,1))
> rownames(accidents)=c("<18","18-25","26-40","40-65","65>")
> accidents
      none minor major
<18     67    10     5
18-25   42     6     5
26-40   75     8     4
40-65   56     4     6
65>     57    15     1
> chisq.test(accidents)

        Pearson's Chi-squared test

data:  accidents
X-squared = 12.59, df = 8, p-value = 0.1269

Warning message:
Chi-squared approximation may be incorrect in: chisq.test(accidents)