I'm just learning about Bayesian networks and d-separation. Let the graph
be a model for conditional dependencies between the random variables $A, B, C, D, E, F, G, H$. From the graph, their joint distribution is given by $$P(a,b,c,d,e,f,g,h) =P(a)P(b)P(c\vert b)P(d\vert c, g, h) P(e\vert a)P(f\vert a, e)P(g\vert f)P(h\vert c,g).$$ (I write $a$ for $A=a$ and so on for convenience.)
Now, I want to infer from the model whether $A$ and $B$ are
- independent,
- conditionally independent given $H$.
If I applied d-separation correctly, then 1. is true and 2. is not. However, I want to confirm that by doing the computation by hand. But I'm having trouble marginalizing the joint distribution function.
For example, for 1. I want to compute
$$P(a,b)=\sum_{c,d,e,f,g,h}P(a,b,c,d,e,f,g,h)$$
and check whether it factors into $P(a)P(b)$.
[edit]
Okay, so for 1. I can just arrange the sums like this:
$$P(a)P(b)\sum_c P(c\vert b) \sum_e P(e\vert a)\sum_f P(f\vert a,e)\sum_g P(g\vert f)\sum_h P(h\vert c,g)\sum_d P(d\vert c, g, h).$$
The conditional probabilities sum to $1$, so $P(a,b)=P(a)P(b)$ and $a$ and $b$ are independent.
But what about 2.? I have to drop the sum over $h$, then I have
$$P(a)P(b)\sum_c P(c\vert b) \sum_e P(e\vert a)\sum_f P(f\vert a,e)\sum_g P(g\vert f) P(h\vert c,g)\sum_d P(d\vert c, g, h)$$
and I don't know how to proceed from here. In the graph, $A$ and $B$ are not d-separated because the path $(A,F,G,C,B)$ is not blocked, so they be conditionally independent given $H$. How can I confirm this by showing that $P(a,b\vert h) \neq P(a\vert h)P(b\vert h)$ by means of the given joint probability function?
