In: Statistics and Probability
A record of violent crimes for a random sample of cities from the list of U.S. cities with the fewest crimes is shown below. At significance level 0.05, is there sufficient evidence to indicate a relationship between the city and the type of crime committed? (Contingency table )
Forcible Rape |
Robbery |
Aggravated assault |
|
Cary, NC |
14 |
35 |
70 |
Amherst, NY |
10 |
33 |
76 |
Simi Valley, CA |
14 |
37 |
77 |
Norman, OK |
47 |
36 |
53 |
Claim: There is a relationship between the city and the type of crime committed.
The null and alternative hypothesis is
H0: There is no relationship between the city and the type of crime committed.
H1: There is a relationship between the city and the type of crime committed.
Level of significance = 0.05
Test statistic is
O: Observed frequency
E: Expected frequency.
E = ( Row total*Column total) / Grand total
Robbery | Aggravated assault | |||
Forcible Rape | Total | |||
Cary, NC | 14 | 35 | 70 | 119 |
Amherst, NY | 10 | 33 | 76 | 119 |
Simi Valley, CA | 14 | 37 | 77 | 128 |
Norman, OK | 47 | 36 | 53 | 136 |
Total | 85 | 141 | 276 | 502 |
O | E | (O-E) | (O-E)^2 | (O-E)^2/E |
14 | 20.1494 | -6.1494 | 37.81515 | 1.876738 |
35 | 33.4243 | 1.575697 | 2.482822 | 0.074282 |
70 | 65.42629 | 4.573705 | 20.91878 | 0.31973 |
10 | 20.1494 | -10.1494 | 103.0104 | 5.112329 |
33 | 33.4243 | -0.4243 | 0.180033 | 0.005386 |
76 | 65.42629 | 10.57371 | 111.8032 | 1.708843 |
14 | 21.67331 | -7.67331 | 58.87964 | 2.716689 |
37 | 35.95219 | 1.047809 | 1.097903 | 0.030538 |
77 | 70.3745 | 6.625498 | 43.89722 | 0.623766 |
47 | 23.02789 | 23.97211 | 574.6621 | 24.95505 |
36 | 38.1992 | -2.1992 | 4.836495 | 0.126612 |
53 | 74.77291 | -21.7729 | 474.0595 | 6.339991 |
Total | 43.89 |
Degrees of freedom = ( Number of rows - 1 ) * ( Number of column
- 1) = ( 4 - 1) * (3 - 1) = 3 * 2 = 6
Critical value = 12.592
( From chi-square table)
Test statistic > critical value we reject null hypothesis.
Conclusion:
There is a relationship between the city and the type of crime committed.