\begin{frame}
	\myheading{Module 17.6: Independencies encoded by a Bayesian network (Case 1: Node and its parents)}
\end{frame}

\begin{frame}
\begin{block}{Why do we care about independencies encoded in a Bayesian network?}
\begin{itemize}
\item<2-> We saw that if two variables are independent then the chain rule gets simplified, resulting in simpler factors which in turn reduces the number of parameters.
\item<3-> In the extreme case, we say that in the Bayesian network model, each factor was very simple (just $P(X_i|Y)$ and as a result each factor just added 3 parameters
\item<4-> The more the number of independencies, the fewer the parameters and the lesser is the inference time
\item<5-> For example, if we want to the compute the marginal $P(S)$ then we just need to sum over the values of $I$ and not on any other variables
\item<6-> Hence we are interested in finding the independencies encoded in a Bayesian network
\end{itemize}
\end{block}
\end{frame}



\begin{frame}
	\begin{block}{}
		In general, given $n$ random variables, we are interested in knowing if
		\begin{itemize}
			\onslide<1->{\item $X_{i} \perp X_{j}$}
			\onslide<2->{\item $X_{i} \perp X_{j} | Z$, where $Z \subseteq {X_{1},X_{2},...,X_{n}}/{X_{i},X_{j}}$}
			\onslide<3->{\item Let us answer some of the questions for our student Bayesian Network}
		\end{itemize}
	\end{block}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{center}
%				\includegraphics[scale=0.35]{images/image9_sharelatex}
				\input{modules/Module6/tikz_images/deep_thin_net.tex}
			\end{center}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}\justifying
				\onslide<1->{\item To understand this let us return to our student example}
				\onslide<2->{\item First, let us see some independencies which clearly do not exist in the graph}
				\onslide<3->{\item Is $L \perp G$? (No, by construction)}
				\onslide<4->{\item Is $G \perp D$? (No, by construction)}
				\onslide<5->{\item Is $G \perp I$? (No, by construction)}
				\onslide<6->{\item Is $S \perp I$? (No, by construction)}
				\only<7>{\item \textbf{Rule?}}
				\onslide<8->{\item \textbf{Rule: } A node is not independent of its parents}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.1in}
			\input{modules/Module6/tikz_images/deep_thin_net.tex}
			\begin{itemize}\justifying
		     	\onslide<8->{\item No, the instructor is not going to look at the SAT score but the grade}
		     	\only<9>{\item \textbf{Rule?}}
		     	\onslide<10->{\item \textbf{Rule}: A node is not independent of its parents even when we are given the values of other variables}
		    \end{itemize}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\begin{itemize}\justifying
				\onslide<1->{\item Let us focus on $G$ and $L$.}
				\onslide<2->{\item We already know that $G \not\perp L$.}
				\onslide<3->{\item What if we know the value of $I$? Does $G$ become independent of $L$?}
				\onslide<4->{\item No (intuitively, the student may be intelligent or not but ultimately, the letter depends on the performance in the course.)}
				\onslide<5->{\item If we know the value of $D$, does $G$ become independent of $L$.}
				\onslide<6->{\item No (intuitively, the course may be easy or hard but the letter would depend on the performance in the course)}
				\onslide<7->{\item What if we know the value of $S$? Does $G$ become independent of $L$?}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{center}
%				\includegraphics[scale=0.35]{images/image9_sharelatex}
				\input{modules/Module6/tikz_images/deep_thin_net.tex}
			\end{center}
			\begin{itemize}\justifying
			    \only<5>{\item \textbf{Rule?}}
				\onslide<6->{\item \textbf{Rule:} A node is not independent of its parents even when we are given the values of other variables
}
			\end{itemize}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			%\textbf{The same argument can be made about the following pairs}
			\begin{itemize}\justifying
				\onslide<1->{\item The same argument can be made about the following pairs}
				\onslide<2->{\item $G\not\perp D$ (even when other variables are given)}
				\onslide<3->{\item $G \not\perp I$ (even when other variables are given)}
				\onslide<4->{\item $S \not\perp I$ (even when other variables are given)}
				
				%\onslide<6->{\item No, the instructor is not going to look at the SAT Score, but on the grade}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
