\documentclass[11pt]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{epsfig}
%\usepackage{pgf}
\usepackage{graphicx} 
 \usepackage{amssymb}
\usepackage{url}
\usepackage{xyling}
\usepackage[all]{xy}
%\usepackage{prof}
%\usepackage{pgf}
%\usepackage{tikz}
%\usepackage{tkz-berge}

	\oddsidemargin  0.0in
	\evensidemargin 0.0in
	\textwidth      6.5in
	\headheight     0.0in
        \headsep        0.0in
	\topmargin      0.0in
	\textheight=9.0in
\title{10-601 Machine Learning: Assignment 5}
\date{}
\begin{document}
\maketitle
\vspace{-.4in}
\begin{itemize}
\item The assignment is due at 3:00pm (beginning of class) on \textbf{Monday, March 3, 2008}.
\item Since you only have one week, it will be worth \textbf{40 points}.
\item Write your name at the top right-hand corner of each page submitted.
\item Each student must hand in a hard-copy writeup.  See the course webpage for collaboration policies.
\end{itemize}

%%%%%%%%%%%%%%%%
\section*{Q1: Representing and learning Bayes nets [25 pts]}

\begin{enumerate}
\item Download JavaBayes from here: \url{http://www.cs.cmu.edu/~javabayes/}.  To run JavaBayes, go into the Classes directory and run \texttt{java JavaBayes}.
\item Load the JohnMaryCall network into JavaBayes.
\item Using the ``Edit Function'' button, look at the CPT's of the various nodes (by clicking on the nodes and then hitting ``Dismiss'' to close without changing the CPT).  Based on these probability tables, what is the joint probability of \{\textbf{Burglary=True}, \textbf{Earthquake=False}, \textbf{Alarm=True}, \textbf{JohnCall=True}, \textbf{MaryCall=True}\}?
\item Try querying each node, and note the initial posterior probabilities on each.  Now observe \textbf{Alarm=True} (by using the Observe button and clickin on \textbf{Alarm}).  How do the posterior probabilities of the other variables change?  Explain why (or why not).
\item Now, with \textbf{Alarm=True}, observe \textbf{Earthquake=True}.  What happens to the posterior probability of \textbf{Burglary}?  What happens to the posterior probability of \textbf{JohnCall}?  Explain the results.
\item Set \textbf{Earthquake} to unobserved.  Now observe \textbf{JohnCall=True}.  What happens to the posterior probability of \textbf{MaryCall}?  What about the posterior probability of \textbf{Earthquake}?  Explain.
\end{enumerate}

\section*{Q2: D-separation [15 pts]}
\begin{enumerate}
\item ~
\begin{enumerate}
\item Draw \textbf{all} 4-node Bayesian networks that are consistent with \textbf{at least} both of the following conditional independencies:
$(A \bot B | C)$, ($D \bot A, B | C)$.
\item How many different graphs did you draw?
\item Why might you prefer one of these graphs to the others?
\end{enumerate}
\item ~
\begin{enumerate}
\item Write all the conditional independencies you can read off this graph in the form $(X \bot Y | \textbf{Z})$, where $X$ and $Y$ are single variables and $\textbf{Z}$ is any set of variables, including the empty set:\\

\begin{center}  
~\xymatrix{A\ar[d]\ar[dr] & B\ar[d] \\
C\ar[d] & D \\
E&}

\end{center}

\end{enumerate}


\end{enumerate}



\end{document}