Bayesian Belief Networks using GeNIe

Bayesian Belief Networks (BBNs)

BBNs are a graphical modeling approach that models the conditional probabilistic relationships of certain independent variables. From Pearl, in a BBN model, nodes represent variables or events that may affect or be affected by other variables, while arrows between nodes represent the direct dependencies or causal relationships between the variables. The direction of the arrow indicates the direction of the causal impact or influence. This network structure allows us to represent and reason about the joint probability distribution over all the variables in the network, given the available evidence or observations.

To illustrate the concept of a BBN, let us consider a scenario where we need to model the dependencies between three variables: the state of a sprinkler (on or off), the presence or absence of rain, and whether the grass is wet or not. In this scenario, there are two possible causes for wet grass: an active sprinkler or rain. Moreover, rain has a direct effect on the use of the sprinkler, as the sprinkler is typically not used when it is raining. This scenario can be effectively modeled using a BBN within GeNIe, where each variable has two possible values. The network diagram shown below captures the probabilistic dependencies between the three variables and provides a visual representation of the states of the random variables and their relationships between them.

wetgrass-network

Conditional Probability table for Wet Grass Node

Sprinkler Rain Wet Grass Wet Grass
    Yes No
On True 0.99 0.01
On False 0.9 0.1
Off True 0.8 0.2
off False 0.0 1.0

Conditional Probability table for Sprinkler Node

Rain Sprinkler Sprinkler
  On Off
True 0.4 0.6
False 0.01 0.99

Conditional Probability table for Rain Node

  Rain
True 0.8
False 0.2

By utilizing the conditional probability formula, the BBN model can be used to answer questions about the presence of a cause given the presence of an effect, a concept commonly referred to as inverse probability. For example, we may ask “Given that the grass is wet, what is the probability that it is raining?”. The BBN allows us to calculate this probability by using the conditional probabilities associated with each node in the network as shown below. This type of analysis enables us to make inferences about the likelihood of different causal factors based on observed effects and can be a powerful tool for decision-making and problem-solving in a wide range of contexts.

wetgrass-network-wettrue wetgrass-network-wetfalse

Similarly, if we have information on either the sprinkler or the occurrence of rain, then the likelihood of different causal factors based on observed effects are shown

wetgrass-network-sprinklertrue wetgrass-network-sprinklerfalse

wetgrass-network-raintrue wetgrass-network-rainfalse