# Bayesian-Based Traffic Safety Evaluation Study for Driverless Infiltration
## 2 Materials and Methods
### Bayesian Network Modelling of Causal Risk  
#### 2.2.1 Bayesian Network  
A basic feature of the Bayesian analysis is the prediction. It utilizes prior existing knowledge and data, updates the probability model through the Bayesian theorem, and obtains predictions for future events or unknown quantities. It plays an important role in many practical applications, helping people make wise decisions and plans. \begin{table}
\begin{tabular}{c c c} \hline
**Level** & **Category** & **Subcategory** \\ \hline \hline \multirow{6}{*}{Unsafe behavior} & \multicolumn{3}{c}{C1 avoiding static obstacles; stop line parking; no contraflow, speed limit} \\  & \multicolumn{3}{c}{C2 lane keeping on straight curves; change lanes} \\  & \multicolumn{3}{c}{C3 steering performance} \\  & \multicolumn{3}{c}{C4 emergency braking} \\ \hline \multirow{6}{*}{Prerequisites for Unsafe acts} & \multicolumn{3}{c}{P11 perceived risks} & \multicolumn{3}{c}{P1 sensors, cameras} \\  & \multicolumn{3}{c}{P2 pedestrians, vehicles; barricades, driveways; traffic sign} \\  & \multicolumn{3}{c}{P3 technical long-tail issues} \\ \cline{2-3}  & \multicolumn{3}{c}{D1 GPS positioning; navigation maps; dynamic programming} \\  & \multicolumn{3}{c}{D2 AI learning decision software} \\  & \multicolumn{3}{c}{D3 communications data transmission; network security} \\  & \multicolumn{3}{c}{D4 driving rules knowledge base} \\ \hline \multirow{6}{*}{External factors} & \multicolumn{3}{c}{R1 coefficient of road surface adhesion} \\  & \multicolumn{3}{c}{R2 road curvature} \\  & \multicolumn{3}{c}{R3 elevation} \\  & \multicolumn{3}{c}{R4 increased visibility} \\ \cline{1-1} \cline{2-3}  & \multicolumn{3}{c}{E1 illegal driving of other vehicles} \\ \cline{1-1} \cline{2-3}  & \multicolumn{3}{c}{E2 pedestrian offence} \\ \cline{1-1} \cline{2-3}  & \multicolumn{3}{c}{E3 animals on the road} \\ \hline \end{tabular}
\end{table} 
Table 2: Classification and coding of factors causing driverless accidents. Figure 2: Evaluation system for traffic safety risk indicators of driverless highway. The Bayesian Network (BN), also known as the belief network or directed acyclic graphical model (DAG), is a probabilistic graphical model, according to the topology of the probability graph, to examine a set of random variables {\(X_{p}\), \(x\ldots X\)} and its n sets of Conditional Probability Distributions (CPDs). The nodes in the directed acyclic graph of a Bayesian network represent random variables, which can be observable variables, or hidden variables, unknown parameters, and so on. An arrow connecting two nodes represents that the two random variables are causally (or non-conditionally) independent. If two nodes are connected by a single arrow, meaning that one node is the \"parents\" and the other is the \"children\", the two nodes will produce a conditional probability value. In summary, the Bayesian network consists of a directed acyclic graph (DAG) and a conditional probability table (CPT). The BN expression is Equation (1). \[\text{A}=\{(\text{M}\text{\textminus}\text{K}),\text{P}\} \tag{1}\]  
where M is the structural network node, K is the directed acyclic graph, and P is the conditional probability distribution of the node. Bayesian networks mainly use local distributions (conditional probability distributions) to describe joint distributions. That is, by integrating local interactive relationships between described variables to obtain global variable relationships. This makes Bayesian networks suitable for research on problems dealing with ambiguity and uncertainty. The full probability expression is shown in Equation (2). \[\text{P}(\text{Y})=\sum_{i=1}^{n}\text{P}(X_{i})\,\text{P}(\text{Y}\mid X_{i}) \tag{2}\]  
The set of discrete node variables is M = {\(X_{1}\), \(X_{2}\), \(\ldots\), \(X_{n}\)}, \(X_{n}\) denotes the node variables of BN, and the CPT of each node includes all the conditional probabilities P of the parent node inside it, which can be computed by Bayesian formulae, expressed as shown in Equation (3).