Riemann surface
matlab

Consider the following Bayesian network, where $F=$ having the flu and $C=$ coughing:
$$P(F)=0.1$$
\begin{aligned} & P(C \mid F)=0.8 \ & P(C \mid \neg F)=0.3 \end{aligned}
a) Write down the joint probability table specified by the Bayesian network.

\begin{aligned} & \mathrm{P}(\mathrm{C})=0.08+0.27=0.35 \ & \mathrm{P}(\mathrm{F} \mid \mathrm{C})=\mathrm{P}(\mathrm{F}, \mathrm{C}) / \mathrm{P}(\mathrm{C})=0.08 / 0.35 \sim 0.23 \ & \mathrm{P}(\mathrm{F} \mid \neg \mathrm{C})=\mathrm{P}(\mathrm{F}, \neg \mathrm{C}) / \mathrm{P}(\neg \mathrm{C})=0.02 / 0.65 \sim 0.03 \end{aligned}
c) Which Bayesian network would you have specified using the rules learned in class?

For the following Bayesian network
we know that $X$ and $\mathrm{Z}$ are not guaranteed to be independent if the value of $Y$ is unknown. This means that, depending on the probabilities, $\mathrm{X}$ and $\mathrm{Z}$ can be independent or dependent if the value of $Y$ is unknown. Construct probabilities where $\mathrm{X}$ and $\mathrm{Z}$ are independent if the value of $\mathrm{Y}$ is unknown, and show that they are indeed independent.

\begin{aligned} & P(X \mid Y)=0.5 \ & P(X \mid \neg Y)=0.5 \end{aligned}
\begin{aligned} & P(Z \mid Y)=0.5 \ & P(Z \mid \neg Y)=0.5 \end{aligned}
\begin{aligned} & \mathrm{P}(\mathrm{X})=\mathrm{P}(\mathrm{Y}) \mathrm{P}(\mathrm{X} \mid \mathrm{Y})+\mathrm{P}(\neg \mathrm{Y}) \mathrm{P}(\mathrm{X} \mid \neg \mathrm{Y})=0.5 \times 0.5+0.5 \times 0.5=0.5 \ & \mathrm{P}(\mathrm{Z})=\mathrm{P}(\mathrm{Y}) \mathrm{P}(\mathrm{Z} \mid \mathrm{Y})+\mathrm{P}(\neg \mathrm{Y}) \mathrm{P}(\mathrm{Z} \mid \neg \mathrm{Y})=0.5 \times 0.5+0.5 \times 0.5=0.5 \ & \mathrm{P}(\mathrm{X}, \mathrm{Z})=\mathrm{P}(\mathrm{X}, \mathrm{Y}, \mathrm{Z})+\mathrm{P}(\mathrm{X}, \neg \mathrm{Y}, \mathrm{Z}) \ & =\mathrm{P}(\mathrm{Y}) \mathrm{P}(\mathrm{X} \mid \mathrm{Y}) \mathrm{P}(\mathrm{Z} \mid \mathrm{Y})+\mathrm{P}(\neg \mathrm{Y}) \mathrm{P}(\mathrm{X} \mid \neg \mathrm{Y}) \mathrm{P}(\mathrm{Z} \mid \neg Z) \ & =0.5 \times 0.5 \times 0.5+0.5 \times 0.5 \times 0.5=0.25 \end{aligned}
Therefore, $\mathrm{P}(\mathrm{X}) \mathrm{P}(\mathrm{Z})=\mathrm{P}(\mathrm{X}, \mathrm{Z})$. We can similarly show that $\mathrm{P}(\mathrm{X}) \mathrm{P}(\neg \mathrm{Z})=$ $\mathrm{P}(\mathrm{X}, \neg \mathrm{Z}), \mathrm{P}(\neg \mathrm{X}) \mathrm{P}(\mathrm{Z})=\mathrm{P}(\neg \mathrm{X}, \mathrm{Z})$ and $\mathrm{P}(\neg \mathrm{X}) \mathrm{P}(\neg \mathrm{Z})=\mathrm{P}(\neg \mathrm{X}, \neg \mathrm{Z})$ to prove that $\mathrm{X}$ and $\mathrm{Z}$ are independent if the value of $\mathrm{Y}$ is unknown.