\documentclass[10pt,letterpaper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multirow}
\title{
        CS444 HW \#7
}
\author{}
\date{}


\begin{document}
\newcommand{\bq}{\item \begin{samepage} }
\newcommand{\eq}{\end{samepage}}
\maketitle

Solutions to this assignment should be submitted through Blackboard as
.pdf files.

\begin{enumerate}

\bq Non-Parametric Learning 
\begin{itemize}
\item In order to use a $k$-nearest-neighbors classifier, it is necessary
to pick an appropriate value for $k$.  Describe how you could use
leave-one-out cross validation to solve that problem.  
\item How will a $k$-nearest-neighbors classifier behave when $k$ is
  equal to the size of the training set?
\end{itemize}
\eq


\bq Assume that $A$, $B$, and $C$, are three mutually independent
random variables, and that $P(A=true) = .4$, $P(B=true) = .3$,
$P(C=true) = .9$. Find the probabilities that: 
\begin{enumerate}
\item All three are true.
\item Exactly two of the three are true.
\item None of the three is true. 
\end{enumerate}
\eq

\bq You work at the airport as a passenger screener.  You know the following things: 
\begin{enumerate}
\item  One passenger in one hundred tries to sneak a bomb through screening.  
\item  The conditional probability that the alarm will go off, given that the passenger has  a bomb is .5.  
\item  The conditional probability that the alarm will go off given that the passenger does not have a bomb is .1.  
\end{enumerate}
The alarm goes off.  What is the probability that the passenger has a bomb?
\eq

\bq
 In a medical study, 100 patients all fell into one of three classes: Pneumonia, Flu, or 
Healthy.  The following database indicates how many patients in each class had fever 
and headache.  A patient presents with a fever but no headache. 

\begin{enumerate}
\item What probability would a naive Bayes classifier assign to the
  proposition that a patient has Pneumonia. Show your work.

\item What probability would a Bayes' optimal classifier assign to that proposition? (A Bayes' optimal
  classifier \emph{doesn't} make any independence assumptions about the
  evidence variables)
\end{enumerate}




\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|l|}{Pneumonia}  \\
\hline
Fever & Headache & count \\
\hline
T & T & 5 \\
\hline
T & F & 0 \\
\hline
F & T & 4 \\
\hline
F & F & 1 \\
\hline
 \multicolumn{2}{|c|}{total:} & 10 \\
\hline
\end{tabular}
\vspace{.2in}

\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|l|}{Flu}  \\
\hline
Fever & Headache & count \\
\hline
T & T & 9 \\
\hline
T & F & 6 \\
\hline
F & T & 3 \\
\hline
F & F & 2 \\
\hline
 \multicolumn{2}{|c|}{total:} & 20\\
\hline
\end{tabular}
\vspace{.2in}

\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|l|}{Healthy}  \\
\hline
Fever & Headache & count \\
\hline
T & T & 2 \\
\hline
T & F & 3 \\
\hline
F & T & 7 \\
\hline
F & F & 58 \\
\hline
 \multicolumn{2}{|c|}{total:} & 70 \\
\hline
\end{tabular}


\eq


\end{enumerate}

\end{document}
