How do I calculate the diagnostic inference for Bayes Net with multiple evidence and hidden variable?

156 Views Asked by At

I have a Bayes Net for a tsunami alarm at nuclear power plants that looks like this:

Top node is "Tsunami" = (T or F) is the ground truth of whether there is a Tsunami approaching. There is a "Wave Sensor Faulty" node, child of top node, which if True means the sensor is faulty. Node "Is Tsunami", child of both top node and sensor node, is the reading from the sensor with binary values True or False. Child of "Is Tsunami" node is "Alarm" node (True = rings or False= does not ring). There is an "AlarmIsFaulty" node with binary values True or False that has no parents but is the parent of the "Alarm node". So in total there are 5 edges flowing in the general direction from "Tsunami" to "Alarm".
I have conditional probability distribution tables for each node based on given probabilities which I cannot show here since it is homework.

My homework question asks what is the probability of there being a tsunami given that the alarm rings, the sensor is not faulty and the alarm is not faulty?

On page 514 of AI: Modern Approach textbook by Russell and Norvig, they have a similar example of a burglar, earthquake, alarm and two people who call when they hear the alarm. For the probability that the alarm has sounded, but neither a burglary nor an earthquake has occurred, and both John and Mary call they describe it with a joint probability:
P (j, m, a, ¬b, ¬e) = P (j | a)P (m | a)P (a | ¬b ∧ ¬e)P (¬b)P (¬e) = 0.90 × 0.70 × 0.001 × 0.999 × 0.998 = 0.000628 . So I tried to do the same for my question. P(tsunami=T, alarm=T, sensorFaulty=F, alarmFaulty=F)

and tried to describe the joint probability as the product of conditional probabilities based on the network structure:

P(alarm=T | sensorFaulty=F, alarmFaulty=F, tsunami=T)

but there is a hidden variable, the actual reading from the sensor.
So I include this: P(alarm = T | isTsunami=T, sensorFaulty=F, alarmFaulty=F, tsunami=T) = x

So now the right hand side of the given bar is:

P(isTsunami=T | sensorFaulty=F, tsunami=T) = y and P(alarmFaulty=F) = z for which I have conditional probability values x, y, z from my table.

But I also have to consider P(alarm=T | isTsunami=F, sensorFaulty=F, alarmFaulty=F, tsunami=T) = x' which has the right hand side of P(isTsunami=F | sensorFaulty=F, tsunami=T) = y' and P(alarmFaulty=F) = z for which I also have values for 'x, 'y and z from my CPD (conditional probability distribution).

I want to use Bayes' rule of prior * likelihood for the unnormalized probability and then normalize it by diving by total probability of the data but do not know how to do it with multiple pieces of evidence and a hidden variable. All my lecture videos only show how to do it with at most 2 pieces of evidence and the book does not actually step through an example.

Can somebody show me how to find that diagnostic reference of P(tsunami=T | alarm=T, sensorFaulty=F, alarmFaulty=F)?

Is the calculation actually kind of unwieldy? I would normalize by P(alarm=T) under any circumstance but then would have to account for all the different conditions in which this occurs. The next section is on sampling for making inferences so I ask.

1

There are 1 best solutions below

3
On BEST ANSWER

Let \begin{align} A &:= Tsunami \\ B &:= WaveSensorFaulty \\ C &:=isTsunami \\ D &:= AlarmFaulty \\ E &:= AlarmRings \end{align}

You are interested in writing the joint distribution $p(A,B,C,D,E)$ as a product of the conditional distributions available to you.

First, \begin{align} p(A,B,C,D, E) &= p(E \mid A,B,C,D) \cdot p(A,B,C,D) \\ &= p(E \mid C, D) \cdot p(A,B,C,D) \end{align} where the first step is the definition of conditional probability, and the second step is due to the Bayes net structure. The second factor can be further decomposed as \begin{align} p(A, B, C ,D) &= p(D \mid A, B, C) \cdot p(A,B,C) \\ &= p(D) \cdot p(A, B, C) \end{align} by similar reasoning. Next, \begin{align} p(A,B,C) &= p(C \mid A, B) \cdot p(A,B) \\ &= p(C \mid A,B) \cdot p(B \mid A) \cdot p(A). \end{align}

Combining the above steps gives the desired factorization of $p(A, B, C, D, E)$. A similar factorization would hold if replacing $A$ with $\lnot A$, etc.


The desired probability is $p(A \mid \lnot B, \lnot D, E)$. This can be rewritten as $$p(A \mid \lnot B, \lnot D, E) = \frac{p(A, \lnot B, \lnot D, E)}{p(\lnot B, \lnot D, E)}.$$ The numerator can be computed by summing over the two outcomes for $C$, i.e. $$p(A, \lnot B, \lnot D, E) = p(A, \lnot B, C, \lnot D, E) + p(A, \lnot B, \lnot C, \lnot D, E).$$ Similarly the denominator can be computed by summing over the four outcomes for $A$ and $C$.