# Bayesian Modeling of Traffic Accident Rates in Poland Based on Weather Conditions
## 3 Results
### Posterior Predictive Checks
#### 3.1.3 Model 3  
As presented in Figure 18, the density comparison between observed and predicted accident counts provides insight into model performance across different ranges of accidents. The model captures the overall shape of the accident distribution, though with some areas of divergence. The positive correlation in the relationship between actual and predicted values demonstrates the model's ability to track general trends in weekly accident counts. This analysis highlights potential areas for refinement, particularly for weeks with unusually high or low accident counts.  
Figure 16: Observed vs. predicted yearly county-level accident rates for Model 2. The log-log scatter plot demonstrates a strong positive correlation, with points clustering around the identity line (red dashed). The coefficient of determination (\(R^{2}=0.833\)) indicates a very good model fit and a slight improvement in predictive performance compared to Model 1.  
Figure 17: Posterior distributions for Model 2 parameters: (**a**) Intercept posterior density showing a well-defined, narrow distribution with high estimate precision. (**b**) Socioeconomic predictors, including population density—positive effect (top), passenger car ownership—strong positive effect (middle), and road density—negative effect (bottom). (**c**) Weather predictors showing mean temperature—negative effect (top), mean humidity—positive effect (middle), and total precipitation—negative effect (bottom) on accident counts across counties.  
The posterior distribution for the intercept, as presented in Figure 19, exhibits stability with a narrow credible interval, indicating a well-estimated baseline accident count. Among the weather predictors, temperature emerges as the most influential factor, with a consistently positive effect on weekly accident counts. Humidity also demonstrates a positive association with accident counts, while precipitation shows a slight negative relationship. The narrow credible intervals for all parameters indicate high precision in our estimates.  
Figure 19: Posterior distributions for model parameters: (**a**) Posterior density for the model intercept (**a**), showing a narrow, approximately normal distribution with a high-precision estimate of weekly accident counts across Poland. (**b**) Posterior densities for the three weather predictors: mean temperature (top), mean humidity (middle), and total precipitation (bottom). Temperature shows a strong positive effect, humidity demonstrates a moderate positive effect, while precipitation has a slight negative effect.  
Figure 18: Model 3 posterior predictive checks: (**a**) Comparison of observed accident frequency distribution (blue) versus model-predicted distribution (red), showing the model capturing the central tendency with notable discrepancies in the 300–400 accident range, where the model predicts higher frequencies than observed. (**b**) Scatter plot of observed versus predicted weekly accident counts with the identity line (red dashed). Points clustering around this line indicate accurate predictions, with increasing variance at both lower and higher accident counts, suggesting areas for potential model improvement. The coefficient of determination (\(R^{2}=0.607\)) indicates moderate model fit.