%%%%%%%%%%%%%%%%% 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{4}                 % <-- 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% }

\DeclareMathOperator*{\argmax}{arg\,max}

\begin{document}


\section*{Problem 1 }
Suppose we observe a set of data points $x_{1..4} =\{-1, 0.5,1 ,100 \}$ and we would like to use Gaussian Mixture Model (GMM) for clustering $D$.  Consider the following mixture of two Gaussians: $\mathcal{N}(0,10)$ and $\mathcal{N}(1,2)$ and we believe the data points are drawn from $\mathcal{N}(0,10)\,40\%$ of the time and $\mathcal{N}(1,2)\,60\%$ of the time.


\begin{enumerate}
    \item Calculate the responsibility of each component for each data point in $x_{1..4}$.

    \item For $x_4=100$ which component has higher responsibility?  Briefly explain why that is the case.


\end{enumerate}


\section*{Problem 2 }

 Suppose we want to model traffic on a given road. At each hour $i$, we measure the number of cars $y_i$.
    We think the number of cars is well modeled by a Gaussian distribution.
    However, we know that some times are rush hour, so we decide to use a mixture of Gaussian distributions with two components (normal and rush hour traffic respectively.)
    For simplicity, imagine that traffic at each hour is independent of one another.


    Draw a graphical model that represents this mixture model.  You should use plate notation and include variables $\mathbf{z} = (z_1, ... , z_n)$ and $\mathbf{y} = (y_1, ... , y_n)$ as well as the parameters of the distributions $\pi$, $\mu_1$, $\mu_2$, $\sigma_1$ and $\sigma_2$ in your graph.



\section*{Problem 3}
Suppose we have two sensors with known (and different) variances $v_1$ and $v_2$, but unknown (and the same)
mean $\mu$. Suppose we observe $n_1$ observations $y_i^{(1)} \sim \mathcal{N}(\mu,\,v_1)$ from the first sensor and  $n_2$ observations $y_i^{(2)} \sim \mathcal{N}(\mu,\,v_2)$ from the second sensor. (For example, suppose $\mu$ is the true temperature outside, and sensor
1 is a precise (low variance) digital thermosensing device, and sensor 2 is an imprecise (high variance) mercury
thermometer.)

Let D represent all the data from both sensors. What is the posterior $p(\mu|D)$, assuming a
non-informative prior for $\mu$ (which we can simulate using a Gaussian with a variance of $\infty$)? Give an explicit
expression for the posterior mean and variance.






\section*{Problem 4}
Please write one thing from this course you found confusing, a topic you would like to hear more about, or something you found particularly interesting.








\end{document}
