## 2 Methodology
### Dynamic Analysis of Coupled Risk Dynamics Based on Dynamic Bayesian Networks  
The dynamic analysis of coupled risks based on dynamic Bayesian networks includes three aspects before, during, and after an accident.  
1. A priori analysis (causal inference):  
A priori analysis is based on the combination of risk factors in different states to infer the final result of the overall project risk. A priori analysis predicts the probability distribution of the general risk event F under the combination of each risk factor \(C_{1}\), \(C_{2}\),... \(C_{i}\),..., \(C_{n}\). The prior probability of each risk factor is entered into the network model, and the probability distribution of F is shown in Equation (21).  
\[P(F=State_{f})=\sum_{1}^{m^{n}}P(f=State_{f}|C_{1}=c_{j},C_{2}=c_{j},\ldots C_{ n}=c_{j})\times P(C_{1}=c_{j},C_{2}=c_{j},\ldots C_{n}=c_{j}) \tag{21}\]  
where \(n\) is the number of nodes; \(c_{j}\) is the \(j\)th state of the root node (\(j\) = 1,2,...,m); \(State_{f}\) is the \(f\)th state of the leaf node (\(f\) = 1,2,...,\(F\)); \(P(f=State_{f}|C_{1}=c_{j},C_{2}=c_{j},\ldots C_{n}=c_{j})\) is the conditional probability distribution when \(f\) = \(State_{f}\); and \(P(C_{1}=c_{j},C_{2}=c_{j},\ldots C_{n}=c_{j})\) is the joint probability distribution.  
Figure 5: State transition diagram of two-state factors of sewage pump equipment.  
Sensitivity analysis can determine the importance of risk influencing factors or hazardous events, identify important targets to focus on safety design or risk monitoring, and help managers make the right decisions for risk management [28; 29].  
Information entropy is a statistic that describes the dispersion of random variables; the greater the information entropy, the greater the uncertainty. The information entropy of the construction accidents probability in DFPs adjacent to existing underpass tunnels is calculated using Equation (22). Mutual information indicates the amount of information shared between two or more variables. Moreover, the larger the mutual information, the stronger the correlation between the variables. The mutual information also enables finding the key risk factors that greatly impact the overall risk. For example, the mutual information between variables \(F\) and \(C\) can be calculated using Equation (23).  
\[H(F)=-\sum_{f}P(f)\log P(f) \tag{22}\]  
\[H(C:F)=\sum_{f\in F}\sum_{c\in C}p(c,f)\log_{2}\biggl{(}\frac{p(c,f)}{p(c)p(f)} \biggr{)} \tag{23}\]  
where \(p(c,f)\) is the joint probability distribution of \(C\) and \(F\), and \(p(c)\) and \(p(f)\) are the marginal distribution probabilities of \(C\) and \(F\), respectively.  
3. A posteriori analysis (causative analysis):  
The posterior analysis aims to obtain the posterior probability distribution of each risk factor at the time of the accident to detect the suspected cause quickly. Based on the model structure and parameters, the most likely combination of causes in the event of a construction accident in a DFP adjacent to existing underpass tunnels (i.e., the causes derived from the conclusions and assisting engineers in real-time accident diagnosis) is determined. According to Section 2.2.1, the calculation equation is as follows:  
\[P(C_{i}=c_{j}\Big{|}F=State_{f})=\frac{P(C_{i}=c_{j})P(\,F=State_{f}\Big{|}C_{i} =c_{j})}{P(F=State_{f})} \tag{24}\]  
where \(P(C_{i}=c_{j}\Big{|}F=State_{f})\) is the posterior probability distribution of the \(i\)th risk factor \(C_{i}\) when \(F=State_{f}\).