%%%%%%%%%%%%%%%%% DO NOT CHANGE HERE %%%%%%%%%%%%%%%%%%%% {
\documentclass[12pt,letterpaper]{article}
\usepackage{fullpage}
\usepackage[top=2cm, bottom=4.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb,amscd}
\usepackage{lastpage}
\usepackage{enumerate}
\usepackage{fancyhdr}
\usepackage{mathrsfs}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{todonotes}[disable]
\usepackage{esvect}

\hypersetup{%
  colorlinks=true,
  linkcolor=blue,
  linkbordercolor={0 0 1}
}

\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }

%%%%%%%%%%%%%%%%%%%%%%%% CHANGE HERE %%%%%%%%%%%%%%%%%%%% {
\newcommand\course{CMPT 727}
\newcommand\semester{Spring 2022}
\newcommand\hwnumber{2}                 % <-- ASSIGNMENT #
%\newcommand\NetIDa{Your Name}           % <-- YOUR NAME
%\newcommand\NetIDb{200XXYYZZ}           % <-- STUDENT ID #
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }

%%%%%%%%%%%%%%%%% DO NOT CHANGE HERE %%%%%%%%%%%%%%%%%%%% {
\pagestyle{fancyplain}
\headheight 35pt
\chead{\textbf{\Large Assignment \hwnumber}}
\rhead{\course \\ \semester}
\lfoot{}
\cfoot{}
\rfoot{\small\thepage}
\headsep 1.5em
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }


\begin{document}

\section*{Problem 1}
Reproduce the formatting of the following equation. You might want to use the following commands:  
\begin{verbatim}
\align;  \intertext;  \left; \right;  \sum; \prod \dots; \frac; \log; 
\end{verbatim}






\section*{Problem 2}
Suppose a crime has been committed. Blood is found at the scene for which there is
no innocent explanation. It is of a type which is present in $1\%$ of the population. 

\begin{enumerate}
    \item  The prosecutor claims: “There is a $1\%$  chance that the defendant would have the crime blood type if he were innocent. Thus there is a $99\%$ chance that he guilty”. This is known as the prosecutor’s fallacy.
    What is wrong with this argument?
 
   \item The defender claims: ``The crime occurred in a city of 800,000 people. The blood type would be
found in approximately 8000 people. The evidence has provided a probability of just 1 in 8000 that
the defendant is guilty, and thus has absolutely \textbf{no} bearing on the investigation.'' This is known as the defender’s fallacy. What is
wrong with this argument claiming the evidence has absolutely no bearing on the investigation?
\end{enumerate}

\section*{Problem 3}
My neighbor has two children. Assume that the gender of a child is a coin flip. 
Let the genders of the children be $G_1$ and $G_2$. For both questions, write the probability symbolically (e.g. ``$P(A|B)$'') and give the value.
\begin{enumerate}
    \item Suppose I happen to see one of his children run by, and it is a boy. What is the probability that the other child is a girl?
    \item Suppose instead that I ask him whether he has any boys, and he says yes. What is the probability that one child is a girl? 
\end{enumerate}


\section*{Problem 4}
Consider the Numbers game with one-sided interval hypotheses $h_{\leq x}$ for numbers $1$ up to $10$, where $h_{\leq x} = \{1,2,\dots, x \}$, $x\in\{1 \dots 10  \}$. Assume we have a uniform prior over $h$.
\begin{enumerate}
    \item Show that the $h_{mle} = h_{\leq \text{max}(S)}$ for a given set of numbers $S = \{x_1, x_2, \dots\}$.

    \item  Briefly say why the MAP estimate = MLE.
    
    \item For Parts 3 and 4, let's suppose $S =\{5,9\}$. What is the plug-in approximation of the posterior predictive distribution for new data point $x$?
    
    \item What is the full posterior predictive distribution? 
    
  
\end{enumerate}





\end{document}