How to calculate P(X|W,Z) in a Bayesian network?

136 Views Asked by At

Bayesian net

I can see that $P(X,Y,W,Z)$ = $P(X|Y,Z)P(Y|W,Z)P(W)P(Z)$.

I did the following till now to calculate $P(X|W,Z)$:

$P(X|W,Z)$ = $P(X|Y,W,Z)$ + $P(X|\overline{Y},W,Z)$ = $P(X,Y,W,Z)P(Y,W,Z)$ + $P(X,\overline{Y},W,Z)P(\overline{Y},W,Z)$ = $P(X,Y,W,Z)P(Y|W,Z)P(W)P(Z)$ + $P(X,\overline{Y},W,Z)P(\overline{Y}|W,Z)P(W)P(Z)$

Am I proceeding in the right direction? Help!

2

There are 2 best solutions below

0
On BEST ANSWER

Using the D.A.G.; $\require{enclose}\def\P{\operatorname{\sf P}}\begin{array}{c}\enclose{circle}W\lower{2ex}\searrow&&\lower{2ex}\swarrow\enclose{circle}Z\\&Y&\quad\downarrow\\&&\raise{2ex}\searrow X\end{array}$

$X$ is directly influenced by $Y$ and $Z$, and $Y$ is directly influenced by $Z$ and $W$.

Therefore the way $X$ is indirectly influenced by $Z$ and $W$ is through $Y$.

I did the following till now to calculate $\P(X\mid W,Z)$:

$$\P(X\mid W,Z) = \P(X\mid Y,W,Z) + \P(X\mid \overline Y,W,Z) ...$$

Error! That is not how marginalisation works. The principle is that $X=(X\cap Y)\cup(X\cap\overline Y)$

$$\begin{align}\P({X\mid W,Z})&=\P(X,Y\mid W,Z)+\P(X,\overline Y\mid W,Z)\\[1ex]&=\P({X\mid Y,W,Z})\P({Y\mid W,Z})+\P({X\mid \overline Y,W,Z})\P({\overline Y\mid W,Z})\end{align}$$

Now, because $W$ only influences $X$ through $Y$, it is redundant in the conditioning when $Y$ is present. (Whereas $Z$ still directly influences $X$.)

$$\begin{align}\P({X\mid W,Z})&=\P({X\mid Y,Z})\P({Y\mid W,Z})+\P({X\mid \overline Y,Z})\P({\overline Y\mid W,Z})\end{align}$$

1
On

The definition of conditional probability is $P(A\mid B)=\frac{P(A\cap B)}{P(B)}$.

So, $P(X\mid W,Z)=\frac{P(X,W,Z)}{P(W,Z)}$. The denominator is easy to calculate. For the numerator, the event $X\cap W\cap Z$ is stating that $X,W$, and $Z$ all occur. There are 2 cases: Either $Y$ happens or it does not, and you can compute the probability of $X\cap W\cap Z$ both under the presence of $Y$ and in the absence of $Y$.

Can you take it from here?