## Exercise 2.9 Conditional independence
(Source: Koller.) Are the following properties true? Prove or disprove. Note that we are not restricting
attention to distributions that can be represented by a graphical model. 
* a. True or false? $(X\perp W|Z,Y)\land(X\perp Y|Z)\Rightarrow(X\perp Y,W|Z)$
* b. True or false?$(X\perp Y|Z)\land(X\perp Y|W)\Rightarrow(X\perp Y|Z,W)$

### Solution
#### (a)
We have two information about conditional independence: The first one is

$$
X\perp W |Z, Y.
$$

Based on this, we can state:
\begin{equation}
p(x, w |z, y) = p(x |z, y) p(w|z, y) 
\end{equation}

The second one is:

$$
X\perp Y|Z
$$

Based on this, we can state that:

\begin{equation}
p(x, y|z) = p(x|z)p(y|z)
\end{equation}

Now we have to see if $X\perp Y, W|Z$ is true.

\begin{equation}
p(x, y, w|z) = p(w|y, x, z)p(y|x, z)p(x|z) = p(x|z)p(y|z)p(w|y, z) = p(x|z)p(y, w|z)
\end{equation}

- The first passage is the chain rule of probability
- The second makes use of the conditional independences given to us ($Y$ does not dependent on $X$ given $Z$ and $W$ does not depend on $X$ given $Z$ and $Y$)
- The third puts the joint distribution back together. So the proposition is **True**.

#### (b)
Prove this proposition is false with a counter example. Start by defining $X$, $Y$ and $Z$ to be iid random variables with the following distribution:

\begin{equation}\left\{
\begin{array}{l}
P(X=1) = 0.5 \\ 
P(X=-1) = 0.5
\end{array}\right.
\end{equation}

Also, define $W=XYZ$. First prove that the two conditional independences $X\perp Y|Z$ and $X\perp Y|W$ are true.

04800cb9967fe9f7dd7c22611a37ea11b7d34349
ipynb
Jupyter Notebook
murphy-book/chapter02/q09.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
2019-03-25T22:22:23.000Z
2019-09-29T20:46:58.000Z
murphy-book/chapter02/q09.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
murphy-book/chapter02/q09.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
2021-12-24T01:14:12.000Z
2021-12-24T01:14:12.000Z
Qwen/Qwen-72B
1. YES
2. YES