# Materials and methodology

In this research, the road safety data from 1991-2022 were used, to get the longitudinal data set without any breaks in series to explore the _change_ of road safety across countries. Data was processed using R-software. Data was transformed and scaled, irrelevant data was modified and missing data was imputed for the better predictive analysis. The datasets of Eurostat, Estonian Road Authority and Statistics Estonia were used (Eurostat, 2022; Statistics Estonia, 2023). Data of some countries was received from European Transport Safety Council (ETSC) (ETSC, 2022). The investigated variables were the number of fatal accidents per day, number of fatalities, size of the country and the year.

Road safety can be evaluated by the number of (1) road fatalities and (2) fatal road accidents, both per million of inhabitants. Road fatalities means any person killed immediately or dying within 30 days as a result of a road accident. Fatal accident is an accident resulting in a person killed (UNECE Statistics of Road Traffic Accidents)

Regarding the relationship between the road fatalities and fatal road accidents, there is some evidence that the ratio is around 1.07 (_Reported Road Casualties Great Britain, Annual Report_, 2020.; Statistics Estonia, 2022). As the rate takes into account the size of the country, thus fatality rate is rather small when the country's population (in the denominator) is big. Furthermore, road safety change should also be statistically significant (T_esting-for-Statistically-Significant-Changes_; UK Public Data, 2021).

The modelling strategy for the prediction is to use the Poisson distribution. The Poisson distribution is a discrete probability distribution that represents the number of events occurring in a fixed interval of time (a day). The Poisson distribution can be an approximation to the binomial distribution which has also been used in some research. A chi-squared test was used, where a sample from a Poisson distribution is tested against a hypothesized Poisson distribution with a mean (λ). The observed frequencies were compared with expected frequencies from a Poisson distribution with the mean (λ).

Next, the statistical significance test is applied to the change. In research, it's common to observe changes or differences between years. However, just noting a change isn't enough and therefore be sure that the observed change is likely due to a actual effect or just the result of random variation. By applying a statistical significance test to the observed change, we use a mathematical method to judge the likelihood that the change isn't just a random occurrence. Therefore, a p-value is provided to determine the strength of the evidence against a null hypothesis, that there is no effect or change. A smaller p-value suggests that the observed change is less likely to be due to random chance, while a larger p-value indicates the opposite. Statistical significance confirms that the road safety was not caused only by chance. If a p-value is small, then the result is considered statistically significant and thus the change in road safety is not caused by chance and there has been a change in road safety compared to the previous year.

For applying the statistical significance test for the change, firstly, the probability of annual fatalities is calculated as the ratio of deaths to the country's population in two sequential years, the current year and the previous year (equation 1). Then, the z-value is calculated (equation 2) and the statistical significance of annual changes can be calculated (Tables 1 and 2). If |Z| > 1.96, only then the difference is statistically significant.

$$
{p = \frac{fatalities\_current\_year + fatalities\_previous\_year}{population\_current\_year + population\_previous\_year}} {\qquad\qquad} {\left( 1 \right)}
$$
$$
z = \frac{{\left( {\frac{fatalities\_current\_year}{population\_current\_year}}-{\frac{fatalities\_previous\_year}{population\_previous\_year}} \right)}}{\sqrt{{p}*{(1-p)}*{{\left( {\frac{1}{population\_current\_year}}+{\frac{1}{population\_previous_\_year}}\right)}}}} {\qquad\qquad} {\left( 2 \right)}
$$