# A Dynamic Assessment Methodology for Accident Occurrence Probabilities of Gas Distribution Station
## 2 Methodology
### Probability Estimation Methods for REs
#### 2.2.1 Frequentist Estimation Methods  
For REs with abundant failure data, the results of probabilistic estimation derived from frequentist estimation, specifically maximum likelihood estimation, are considered reliable. Sample data can be categorized into homogeneous and non-homogeneous types, where homogeneous samples refer to those failure samples sharing the same or similar operating conditions and working environments [32]. For equipment with homogeneous large sample failure data, the point estimate (\(\hat{\lambda}\)) and 90% confidence intervals [\(\lambda_{0.05}\), \(\lambda_{0.95}\)] for the running failure rate can be calculated as follows:  
\[\left\{ \begin{array}{l}\hat{\lambda}=n/\tau=\sum_{i}n_{i}/\sum_{i}\tau_{i}\\ \lambda_{0.05}=\chi_{0.05}^{2}(2n)/2\tau\\ \lambda_{0.95}=\chi_{0.95}^{2}(2n+2)/2\tau\end{array} \right. \tag{1}\]  
where \(n\) denotes the total number of failures; \(\tau\) denotes the total time in service; the subscript \(i\) represents a single sample; and \(\chi\) denotes the chi-squared distribution. And  
Figure 2: Mapping of a BT model to a BN. the calculation equations for the probability of failure on demand (\(\hat{p}\), [\(p_{0.05}\), \(p_{0.95}\)]) with homogeneous large sample failure data are as follows:  
\[\left\{ \begin{array}{l}\hat{p}=m/M=\sum_{j}m_{j}/\sum_{j}M_{j}\\ p_{0.05}=\frac{mF_{0.05}(2m,\ 2M-2m+2)}{(M-m+1)+mF_{0.05}(2m,\ 2M-2m+2)}\\ p_{0.95}=\frac{(m+1)F_{0.95}(2m+2,\ 2M-2m)}{(M-m)+(m+1)F_{0.95}(2m+2,\ 2M-2m)} \end{array} \right. \tag{2}\]  
where \(m\) denotes the observed number of failures; \(M\) denotes the observed number of demands; and the subscript \(j\) denotes a single sample. Non-homogeneous samples, on the other hand, encompass failure samples from diverse stations, each characterized by unique operating conditions and environments [32]. To address the complexities arising from the variability in failure rates and data volumes among these samples, as evident in Figure 3, we necessitate a probabilistic statistical theory-based approach. This approach assumes that each sample's failure rate follows a distinct probability density function, facilitating the initial estimation of failure rates. Subsequently, quantifying the variability among samples becomes a crucial step in enhancing the accuracy and reliability of the consolidated estimation. Ultimately, through the application of advanced statistical techniques, we derive a robust and reliable \"average\" failure rate, along with its corresponding 90% confidence interval [29]. This methodology serves as a solid foundation for subsequent probabilistic risk analyses, providing robust data support that underscores their validity and reliability. The specific calculation process is outlined below. Step 1: Assuming that the failure rate of each sample obeys the distribution of probability density function \(\pi(\lambda)\), the average failure rate \(\theta\) and the variance \(\sigma^{2}\) are as follows:  
\[\theta=\int_{0}^{\infty}\lambda\cdot\pi(\lambda)d\lambda \tag{3}\]  
\[\sigma^{2}=\int_{0}^{\infty}(\lambda-\theta)^{2}\cdot\pi(\lambda)d\lambda \tag{4}\]  
Step 2: Calculate an initial value \(\hat{\theta}_{1}\) of the failure rate for non-homogeneous samples:  
\[\hat{\theta}_{1}=\frac{total\ number\ of\ failures}{Total\ time\ in\ service}=\sum_{i=1}^{k}n_{i}/\sum_{i=1}^{k}\tau_{i} \tag{5}\]  
Figure 3: Non-homogeneous sample failure data.