# Forecasting the Number of Road Accidents in Polish Provinces Using Trend Models
## 4 Results  
For the analyzed trend models, in the first step, the formulas for the statistical data analyzed on an annual and monthly basis for each federal state were determined using Excel software. For annual (2001 to 2021) and monthly (January 2007 to December 2021) data, serial graphs were drawn, and trend lines and R-squared values were determined. As can be seen, the R-squared coefficient, a measure of the quality of the model fit, is mostly good or fair for annual data, and mostly poor or satisfactory for monthly data, regardless of the model used. This is mainly due to the seasonality of traffic accident numbers in each state, which is not well accounted for by the methods used. Tables 2 and 3 and Appendix A shows trend model formulas with annual and monthly data for each state analyzed.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Province** & **Model** & **Annual Data** \\ \hline Lower Silesia & Exponential & y = 3660.6e\({}^{-0.032\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.7993 \\ \hline Kuyavia–Pomerania & Exponential & y = 2968.8e\({}^{-0.06\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.9776 \\ \hline Lublin Province & Polynomial of 2 nd degree & y = 1.1254x\({}^{-2}\) - 128.19x + 3070.1 \\ \cline{2-3}  & & R\({}^{2}\) = 0.9649 \\ \hline Lubusz Province & Exponential & y = 937.95e\({}^{-0.019\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.6083 \\ \hline Lodz Province & Exponential & y = 5462.8e\({}^{-0.027\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.6749 \\ \hline Lesser Poland & Exponential & y = 5751.5e\({}^{-0.034\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.7969 \\ \hline Masovia & Logarithmic & y = - 1744 ln(x) + 8908.6 \\ \cline{2-3}  & & R\({}^{2}\) = 0.8619 \\ \hline Opole Province & Exponential & y = 1384.8e\({}^{-0.044\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.9257 \\ \hline Subcarpathia & Exponential & y = 2661.8e\({}^{-0.032\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.849 \\ \hline Podlasie Province & Exponential & y = 1605.6e\({}^{-0.057\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.9468 \\ \hline Pomerania & Exponential & y = 3663.6e\({}^{-0.026\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.7854 \\ \hline Silesian & Polynomial of 2 nd degree & y = - 6.7177x\({}^{-2}\)\(\times\)\({}^{-}\) 86.325x + 6865.4 \\ \cline{2-3}  & & R\({}^{2}\) = 0.9765 \\ \hline Warmia–Masuria & Exponential & y = 2545.8e\({}^{-0.047\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.9269 \\ \hline Holy Cross & Polynomial of 2 nd degree & y = \(-0.2957\times^{2}\)\(\times\)\(63.544\times\) + 2323 \\ \cline{2-3}  & & R\({}^{2}\) = 0.9656 \\ \hline Greater Poland & Potentiometric & y = 6695.8x\({}^{-0.301}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.6259 \\ \hline West Pomerania & Exponential & y = 2381.2e\({}^{-0.04\times}\) \\ \cline{2-3}  & & R\({}^{2}\) = 0.939 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Best trend models for annual data.  
We then used the data in Tables 2 and 3 and Appendix A to determine the number of traffic accident probabilities. For yearly data, this is the period from 2022 to 2031, and for monthly data, it is from January 2022 to December 2023. In this case, the prediction is based on data from police statistics. Prediction results using this method depend on the choice of model and its tuning.  
A trend model with the lowest mean percentage error and mean absolute percentage error was chosen to predict the number of traffic accidents in the analyzed federal states. Based on this, we found that for annual statistical data, the best model is often the exponential model, which has the smallest analyzed error. In addition, polynomial, logarithmic and power  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Province** & **Model** & **Monthly Data** \\ \hline