## 2 Methodology
### Finite Mixture Model  
The FMM is defined as a probabilistic model which can be used to represent the presence of subpopulations within the overall dataset. For instance, in the current dataset, it is believed that there are heterogeneities due to aggregating various datasets such as highway systems, barrier types and seasonality. Although using barrier types or highway systems could account for some heterogeneity in the dataset, just considering those aspects could not account for the full range of heterogeneity. This is especially true as there are several unseen factors that the available predictors as hierarchies could not account for. Not accounting for this heterogeneity issue, due to data subsets having different residuals distribution, biased or erroneous estimates would emerge.  
Traditional modeling assumes that all the data comes from the same distribution. Researchers often account for the data heterogeneity by assigning subjective hierarchies. However, no real information is available to determine which observations should be assigned to which distribution. Finite mixture models could be used for those cases to describe the unknown distributions. The finite mixture model with k components could be written as [8]:  
\[h(y|x,\Psi)=\sum_{k=1}^{K}\pi_{k}f(y|x,\theta_{k}) \tag{1}\]  
with conditions of:  
\[\pi_{k}\geq 0\text{, }and\sum_{k=1}^{K}\pi_{k}=1 \tag{2}\]  
where \(h\) is a density of \(y\) as dependent variable, \(x\) is a vector of independent variables, \(\pi_{k}\) is the probability of component \(k\), and \(\theta_{k}\) is the component-specific parameter for the density function \(f\).  
Due to the response characteristics being non-negative, discrete and posing over dispersion, the negative binomial (NB) model is a good choice for modeling traffic barrier EPDO crashes. Here the NB probability density for a cluster \(k\) is defined based on \(\mu_{ij}\) and \(\psi\) as:  
\[Pr(Y=y_{i}|\mu_{i},\psi)=\frac{\Gamma(y_{ik}+\psi_{k})}{\Gamma(\psi_{k})\Gamma (y_{ik}+1)}\bigg{(}\frac{\psi_{k}}{\mu_{ik}+\psi_{k}}\bigg{)}^{\psi}\bigg{(} \frac{\mu_{ik}}{\mu_{ik}+\psi_{k}}\bigg{)}^{y_{ik}} \tag{3}\]  
where the expected value of EPDO, \(y_{i}\), is estimated based on \(\mu_{ij}\), _and_\(\psi_{j}\). \(\Gamma(.)\) is the standard gamma function, \(\psi_{i}\) is dispersion parameter. \(\mu_{ij}\) is mean parameter which is written based on \(\beta_{j}\), the vector of regression coefficients, as:  
\[\mu_{ij}=exp\Big{(}x_{il}^{\mathrm{T}}g_{j}\Big{)} \tag{4}\]  
and the variance of \(y_{i}\) is written as:  
\[Var(y_{i})=\mu_{ij}\ +\frac{\mu_{ij}}{\psi_{j}} \tag{5}\]  
The above equation highlights that for NB, the variance is larger than the mean.  
Then NB as a type of generalized linear model is used to explain the relationship between the count response, \(y\), and various model covariates of \(x=\left[1,x^{1},\ldots,x^{P}\right]^{T}\) as follows [9]:  
\[E(Y|x)=g^{-1}\left(x^{T}\beta\right), \tag{6}\]  
where \(g\) is a link function, and \(\beta=\left[\beta^{0},\beta^{1},\ldots,\beta^{P}\right]^{T}\) are regression coefficients. For this study, \(Y\) follows the negative binomial model with the log link function as  
\[Y\sim NB\left(\mu_{ij},\ \psi_{j}\right) \tag{7}\]  
where \(\mu_{ij}\), _and_\(\psi_{j}\) were defined earlier. It is worth mentioning that the relationship below exists between the dispersion parameter of \(\psi\) and the overdispersion parameter of \(\alpha\) as:  
\[\alpha\ =\psi^{-1} \tag{8}\]  
From the above equation, if \(\psi\) or the dispersion moves toward zero, the model would become the Poisson model.