**2. Materials and Methods**

BBN represents the probabilistic relationships between a set of variables in a Directed Acyclic Graph (DAG). The DAG is composed of nodes to denote the variables and links (arrows) to represent the causal connection between the variables. The relationship between the causes and effects is described by Conditional Probability Tables (CPT) to identify the belief that the effect variable will be in a specific state given the state of the cause variable.

If a state of a variable is changed, the change is transmitted through the links, and the network is solved using Bayes' theorem.

$$\mathbf{P(A|B)} = \frac{\mathbf{P(B|A)} \mathbf{P(A)}}{\mathbf{P(B)}} \tag{1}$$

where P(A) is the prior distribution of variable A, P(A|B) is the posterior distribution (the probability of A given new data B), and P(B|A) the likelihood function [24] (p. 6).

Introductions and a detailed formal definition of BBN are given in [25–27].

In energy systems and energy policy, the BBN has been for providing a tool for policymaking in the renewable energy sector [28], decision-making in clean energy investment [29], assessment of power systems [30], and the integration of renewables into the grids [31].

BBN is used in this paper to examine the influences of some WETI indicators on energy sustainability in Saudi Arabia.

The calculation of the WETI is based on 32 indicators, however, twelve key metrics are used in the countries' profiles to exhibit the performance. This paper considers nine key metrics shown in Figure 1, generated using Vensim system dynamics simulation software. The remaining three key metrics of the fourth dimension, the country context, are beyond the current scope.

**Figure 1.** Causes tree energy sustainability using the selected key metrics.

Cases of examples or experiences data are provided to train the BBN to capture the believed states in different scenarios. The datasets measuring the indicators between the years 1990 and 2019 were obtained from various sources cited in Table 1, used to train the constructed BBN. Table 1 contains 25 cases, with each row being a case.


**Table 1.** Energy statistics for the period from 1990 to 2019. The asterisks mean missing data.

The oil refinery capacities were used to indicate the energy storage capacity, and the share of renewables in the electricity mix was used as an input for two indicators: Diversity of electricity generation and low-carbon electricity generation.

The selected metrics were represented using BBN. The states of the variables in the BBN were drawn from the data in Table 1. The states were described as declining, stable, or improving according to the comparison of the measurement of the specified year to the average of the preceding five years. If the change percent is zero, the state is named stable. Positive and negative percentages are named improving or declining depending on the specific indicator, for example, a negative change in CO2 emission is an improvement. The states of the indicators are given in Table 2.

However, the changes in the electricity generation sources were treated differently because the growth in the renewables shares in the electricity mix was negligible from 2008 to 2014, so they were not considered improvements. Then, from 2015 to 2019, the states were based on calculating the annual growth.

The states of the nodes in Figure 2 are shown with equal probability distributions indicating that the BBN needs CPTs and training data to be fully functional. The belief networks are implemented using the Netica toolkit [41].


**Table 2.** States of the key indicators for the period from 1995 to 2019. The asterisks mean missing data.

**Figure 2.** Uncompiled BBN of energy sustainability.

The CPTs for energy security, energy equity, environmental sustainability, and overall energy sustainability were created based on the weights of the variables given in the description of the WETI in Annex A of [8]. For example, the WETI gives the energy security dimension a weight of 30% distributed equally between five indicators, 6% each. Therefore, in CPT of energy security's three indicators used in this paper, equal probabilities of 0.33 were given to the declining, stable and improving statuses, which means, for instance, if the import independence and energy storage are declining but electricity generation diversity is improving, there will be 0.66 declining, 0.33 improving, and 0% stable probabilities.

For the effect variables, the size of the CPTs is the multiplication product of the numbers of the states of the effect and all its cause nodes. For the causes, it can be described by a marginal probability distribution. The probability tables are given in Appendix A.

The available data for the new policies for the period from 2018 to 2037 was mainly obtained from the energy policy simulator [42] jointly developed by Energy Innovation Policy and Technology LLC and King Abdullah Petroleum Studies and Research Center. The energy policy simulator presents data till 2050, nevertheless, the data of 20 cases (2018– 2037) were used to provide a statistically acceptable representation for the near future period. The evaluation of the data to draw the states of the variables was done case by case. For example, the obtained electricity prices were for 2020, 2030, and 2035, so the periods between each interval were split between two states to describe the gradual increase or decrease.

The interconnections between the indicators were considered to recoup the missing data. The energy intensity and the CO2 emission per capita were calculated based on energy efficiency, energy equity, and low-carbon electricity generation. The information of the interconnections is based on an analysis of Saudi Arabia's CO2 emissions drop in 2018 [43]. The energy efficiency was given improving states until 2030 and then stable states to 2037 based on the information in the Saudi Energy Efficiency Program that efficiency will be improved to reach a 20% consumption reduction by 2030 [44].

The states of the indicators are given in Table 3. The CPTs for energy intensity and CO2 per capita are given in Appendix B.


**Table 3.** States of the key indicators for the period from 2018 to 2037.

#### **3. Results**

Figure 3 shows the results of compiling the BBN using the 25 cases from Table 2, which reveal that the likelihood of improvement in energy sustainability was 25.5%, which is comparable to the declining likelihood of 23.8%, while the most likely prospect was the stability of the existing situation with a 50.6% chance.

**Figure 3.** Compiled energy sustainability network for the period from 1995 to 2019.

Netica was used to carry out a sensitivity analysis, which revealed that the dependence of energy sustainability on energy security is comparable to that on environmental sustainability, and the strength of the energy equity effect is half of that of the other two dimensions. By taking the analysis to the level of the indicators, the most influential indicators were the diversity of the electricity supply followed by the energy intensity and then energy storage.

The used toolkit allows examining different scenarios by altering the states of the different variables. For example, a back-casting scenario was created by setting the improvement probability for energy sustainability to 100% and looking at changes imposed in the probabilities of the states of the cause variables (Figure 4). The back-casting results reaffirmed the previous sensitivity analysis. They showed that the most required improvement should be by further 12.5% in the diversity of electricity generation, which tacitly drives another 12.5% improvement in the share of low-carbon electricity generation, then 12.8% in energy intensity, and 8.2% in energy storage.

**Figure 4.** Back-casting 100% improvement probability of energy sustainability network for the period from 1995 to 2019.

Similarly, many small incremental changes in the states of any of the variables can be attempted to examine the most probable routes for the improvement of each dimension or that of the overall energy sustainability.

The compiled BBN for the BAU path did not account for the interconnections between the variables. For example, the impact of low-carbon electricity generation on the CO2 emissions, fuel prices on energy intensity, and electricity generation mix on the affordability. The reason is that the paper studies the specific case of Saudi Arabia's performance, where actual data that already represent the sum measurements are available and do not need further calculation or elicitation.

However, some of the interconnections were estimated to assess the energy sustainability landscape in the light of policy changes in the Saudi 2030 Vision (Figure 5). The improvement likelihood of energy sustainability was 33.6%, with a 53% probability that the performance will be steady during the specified period. The back-casting (Figure 6) and sensitivity analysis showed that the most influential group of indicators is that composed of the diversity of electricity generation, CO2 emission per capita, and energy intensity, respectively, in terms of the magnitudes of their strength. The groups in the second order of influence were energy storage and import independence with comparable strengths.

**Figure 5.** Compiled energy sustainability network for the period from 2018 to 2037.

**Figure 6.** Back-casting 100% improvement probability of energy sustainability network for the period from 2019 to 2030.
