top of page

1. Significant Variables: Chi-Square Analysis

Since our variables were categorical, this made our data binary. In order to test if any of the variables we thought would have a dependent relationship to the severity of traffic accidents based on fatal or non-fatal we ran a chi-square test using R. For our chi-square analysis, we determined our alpha level to be 0.05, meaning that the resulting p-values of severity against needs to be less than the alpha level to be deemed significantly dependent on our explanatory variables. our explanatory variables were the season on the accident (between warm months and cold months), the day of the week of the accidents (between weekdays or weekends), if speeding was involved, the road location of accidents (between intersections or mid-blocks, the hours of the day (between morning rush hours, evening rush hours, and off hours), and by road types (between minor arterial, major arterial, local, collector, or expressway roads). 

#season.png
#weekday.png

Season, 

day of the week,

speeding, and road Location

Figure 1. Results of the chi-square independence test for variables of season, day of the week, speeding, and road location against the severity of accidents using R. 

#speeding.png
#roadlocation.png

Table 1. Summary table of the p-value results of the chi-square test of independence for variables of season, road location, speeding as a factor, day of the week, time of day, and road type against the severity of accidents using R. Highlighted results in yellow indicate that dependence is significant at the alpha level of 0.05

As a result, we see that fatalities were significantly dependent by road location if speeding was a factor, and time of day (Table 1). There was no significance independence based on season day of the week, and by road types, meaning that whether or not fatalities occurred at accidents were independent of these variables (Table 1). 

chi square table.PNG
bottom of page