A. Introduction to Bayes Nets Copyright © 2024 Norsys Software Corp.

3. Probabilistic Inference

This tutorial expands on topics introduced in the previous tutorial. We will be discussing some of the common thoughts and issues that you should be aware of in examining a Bayes net and using it to draw inferences.

All the information contained in a Bayes net can be observed by examining three things.

  1. First, there is the network structure, consisting of the nodes and their links, which you can see in the network diagram currently being displayed.
  2. Second, are the properties of each node, which you can see in their node dialog box, obtained by double-clicking on the node.
  3. Third, are the actual relationships between the nodes. These are the conditional probabilities that relate two nodes.

  4. 3.1 Compiling, revisited

    Before you can do any inference on a net, you must compile the net. Compiling a large net can take a lot of time, and if auto-updating is turned on, every time you add evidence, the net is completely updated again. Hence, on a large net, or on a very slow computer, you may wish to add all your evidence before doing the compilation step.

    To compile the network for use, click on its window to make it active, and choose Network->Compile (or use the shortcut button: ).

    After compiling, the appropriate data structures for fast inference will have been built internally, and the bars in each node will have darkened, indicating that they and the numbers beside them are now valid data. They indicate the probabilities of each state of the node.

    Suppose we want to "diagnose" a new patient. When she first enters the clinic, without having any information about her, we believe she has lung cancer with a probability of 5.5%, as can be seen on the Lung Cancer node (the number may be higher than that for the general population, because something has led her to the chest clinic). This is an important point. Before you can draw valid conclusions from using a Bayes net, be certain that you understand the reasoning that went into the construction of the net, and from what sample population, the initial or prior probabilities are drawn.

    If our patient has an abnormal x-ray, that information can be entered by clicking on the word "Abnormal" of the "XRay Result" node:


    (in a real-world belief network, you would probably be able to enter in exactly what way the x-ray was "abnormal").

    All the probability numbers and bars will change to take into account the finding. Now the probability that she has lung cancer has increased to 48.9%:

    3.2 Explaining Away

    If you further indicate that she has made a visit to Asia recently, by clicking on "Visit", the probability of lung cancer decreases to 37.1%, because the abnormal XRay is now partially explained away by a greater chance of Tuberculosis (which she could catch in Asia):


    Note: old fashioned medical expert systems had problems with this kind of reasoning, since each of the findings "Abnormal XRay" and "Visit to Asia" by themselves either increase, or else leave the same, the probability of lung cancer.

    The general pattern for "explaining away" is as follows:


    Before we have any evidence for C, A and B are independent. That is, changing one has no affect on the other. But as soon as we have evidence for C, any change in the probability of A has an opposite change in B and vice versa. They are competing explanations of C. This is because if we acquire evidence of A, then that explains away C, and the chances of B are diminished. This is an important feature of good causal reasoning. It follows naturally from the laws of Bayesian statistics.

    3.3 Serial Blocking

    Serial blocking is a phenomenon whereby the head of a causal chain can be blocked from influencing the tail, when definite evidence is acquired for an intervening node.


    Assuming that we are uncertain about B, if we get evidence for C, that increases the chances of B, which in-turn increases the chances of A. However, if B is determined, that is, we observe its state (with certainty (i.e., the probability of it being in the observed state is 100%), then any changes to C can have no affect on A. Nor can any changes to A affect C. So we say that the certainty of B "blocks" any dependence formerly shared between A and C. To be precise, there may be dependencies introduced by other relationships in the net, but not via B.

    Terminology Note. We can also describe a serial blocking situation by saying that "C is conditionally independent from A, given B."

    3.3 Divergent Blocking

    Divergent blocking is similar to serial blocking, but it occurs when the subnet is one of diverging nodes:


    Assuming that we are uncertain about B, if we get evidence for A, that increases the chances of B, which in-turn increases the chances of C. However, if B is determined, that is, we observe its state (with certainty (i.e., the probability of it being in the observed state is 100%), then any changes to A can have no affect on C. Likewise, by symmetry, no change in C can affect A. So we say that the certainty of B "blocks" any dependence formerly possessed by its children. Again, to be precise, there may be dependencies introduced by other relationships in the net, but not via B.

    Terminology Note. We can also describe a divergent blocking situation by saying that "A is conditionally independent from C, given B."


    When looking at a Bayes net, it is a good idea to be aware of potentialities for "explaining away" or blocking. It allows you to see how evidential information can flow (propagate) through the net.

Return to Tutorial Home