\begin{frame}
	\myheading{Module 19.5: Different types of reasoning in a Bayesian network}
\end{frame}

\begin{frame}
	\begin{block}{New Notations}
		\begin{itemize}
			\onslide<1->{\item We will denote $P(I=0)$ by $P(i^{0})$}
			\onslide<2->{\item In general, we will denote $P(I=0, D=1, G=B, S=1, L=0)$ by $P(i^{0},d^{1},g^{b},s^{1},l^{0})$}
		\end{itemize}
	\end{block}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{-0.2in}
			\input{modules/Module4/tikz_images/table_net.tex}
			\begin{align*}
			  	P(l^1)&=\sum_{I,D,G,S} P(I,D,G,S,l^1)\\
		  		&=\sum_{I\epsilon(0,1)}\sum_{D\epsilon(0,1)}\sum_{G\epsilon(A,B,C)}\sum_{S\epsilon(0,1)} P(I,D,G,S,l^1)\\
			  	&=50.2\%
			 \end{align*}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\textbf{Causal Reasoning}
			\begin{itemize}\justifying
				\onslide<1->{\item Here, we try to predict downstream effects of various factors}
				\onslide<2->{\item Let us consider an example}
				\onslide<3->{\item What is the probability that a good student will get a good recommendation letter, $P(l^{1})$?\\}
				
				%\onslide<4->{\item Now what if we start adding information about the factors that could influence $l^{1}$}
			\end{itemize}
			\begin{align*}
				\onslide<4->{P(l^{1})=0.9(P(g^1))+0.6(P(g^2))\\
				+0.01(P(g^3))\\}
				\only<5>{\text{where } P(g^1)=0.3(P(i^0,d^0))+...\\
				+0.5(P(i^1,d^1))\\}
				\only<6>{\text{and so on}}
			\end{align*}
%			\onslide<4->{$P(l^{1})=0.9(P(g^1))+0.6(P(g^2))+0.01(P(g^3))$\\}
%			\onslide<5>{where $P(g^1)=0.3(P(i^0,d^0))+...+0.5(P(i^1,d^1))$}
			\onslide<7>{$P(l^1)= 0.502$}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{align*}
				\tiny& P(l^1)= 0.502\\
     			& P(l^1|i^0)= 0.389 (drops) \\
    			& P(l^1|i^0,d^0)= 0.513 (increases)
			\end{align*}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Causal Reasoning}
			\begin{itemize}\justifying
				\onslide<1->{\item Now what if we start adding information about the factors that could influence $l^{1}$}
				\onslide<2->{\item What if someone reveals that the student is not intelligent?}
				\onslide<2->{\item Intelligence will affect the score and hence the grade.}
				\onslide<3->{\item What if the course was easy?}
				\onslide<4->{\item A not so intelligent student may still be able to get a good grade and hence a goodl letter.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Evidential Reasoning}
			\begin{itemize}
				\onslide<1->{\item Here, we reason about causes by looking at their effects.}
				\onslide<2->{\item What is the probability of the student being intelligent.}
				\onslide<3->{\item What is the probability of the course being difficult?}
				\onslide<4->{\item Now let us see what happens if we observe some effects.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{align*}
			     & P(i^1)= 0.3\\
			     & P(d^1)= 0.4  \\
			     & P(i^1|g^c)= 0.079 (drops) \\
			     & P(d^1|g^c)= 0.629 (increases) \\
			     & P(i^1|l^0)= 0.14 (drops)\\
			     & P(l^1|l^0,g^0)= 0.079\\ 
			     & (same as P(i^1|g^0))
		     \end{align*}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Evidential Reasoning}
			\begin{itemize}
				\onslide<1->{\item What if someone tells us that the student secured $C$ grade?}
				\onslide<2->{\item What if instead of getting to know the grade, we get to know that the student got a poor recommendation letter?}
				\onslide<3->{\item What if we know about the grade as well as the recommendation letter?}
				\onslide<4->{\item The last case is interesting! (We will return to it later.)}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{align*}
				& P(i^1)= 0.3\\
				& P(i^1|g^c)= 0.079 (drops) \\
				& P(i^1|g^c,d^1)= 0.11 (improves) \\
			\end{align*}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Explaining Away}
			\begin{itemize}
				\onslide<1->{\item Here, we see how different causes of the same effect can interact.}
				\onslide<2->{\item We already saw how knowing the grade influences our estimate of intelligence.}
				\onslide<3->{\item What if we were told the course was difficult?}
				\onslide<4->{\item Our belief in the student's intelligence improves.}
				\onslide<5->{\item Why? Let us see.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{align*}
			 	& P(i^1)= 0.3\\
			 	& P(i^1|g^3)= 0.079 \\
			 	& P(i^1|g^3,d^1)= 0.11\\
			  	& P(i^1|g^2)= 0.175 \\
			  	& P(i^1|g^2,d^1)= 0.34 
			 \end{align*}
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Explaining Away}
			\begin{itemize}
				\onslide<1->{\item Knowing that the course was difficult explains away the bad grade.}
				\onslide<2->{\item \"Oh! Maybe the course was just too difficult and the student might have got a bad grade despite being intelligent!\"}
				\onslide<3->{\item The explaining away effect could be even more dramatic.}
				\onslide<4->{\item Let us consider the case when the grade was $B$.}				
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}

\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{align*}
			     & P(d^1)= 0.40\\
			     & P(d^1|g^0)= 0.629 \\
			     & P(d^1|s^1,g^0)= 0.76
	         \end{align*} 
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\textbf{Explaining Away}
			\begin{itemize}
				\onslide<1->{\item Suppose we know that the student had a high SAT Score. What happens to our belief about the difficulty of the course?}
				\onslide<2->{\item Knowing that the SAT score was high tells us that the student seems intelligent and perhaps the reason why he scored a poor grade is that the course was difficult.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\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}

