%ST402 PMSP slides

\documentclass[30pt,landscape]{foils}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage[pdftex]{geometry}
\geometry{headsep=3ex,hscale=0.8,left=0.1in}
%\geometry{body={8.5in,11.5in},headheight=0.5in,headsep=3ex,hscale=0.8,left=0.1in}
\usepackage{hyperref}
\hypersetup{pdftitle={Latent Class Slides for MI455/ST405},
  pdfsubject={},
  pdfauthor={Martin Knott},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor=white
  }
\usepackage{pause}
\usepackage{background}
\usepackage{pp4slide}
\usepackage{chicago,amsmath,amssymb,epsfig,theorem,array,hyperref}
\newcommand{\section}{\foilhead}
\newcommand{\subsection}{\foilhead}
\newcommand{\subsubsection}{\foilhead}
\newcommand{\tab}{\hspace{5mm}}
\renewcommand{\refname}{Some References}
\newcommand{\bv}[1]{\mathbf #1}
\def\bx{{\bv x}}
\def\by{{\bv y}}
\newcommand{\bLambda}{\boldsymbol\Lambda}
\newcommand{\bbeta}{\boldsymbol\beta}
\newcommand{\balpha}{\boldsymbol\alpha}
\newcommand{\bs}{\boldsymbol\Sigma}
\newcommand{\bsx}{\boldsymbol{\Sigma}_{xx}}
\newcommand{\bsy}{\boldsymbol{\Sigma}_{yy}}
\newcommand{\bmu}{\boldsymbol\mu}
\newcommand{\bmux}{\boldsymbol{\mu}_x}
\newcommand{\bmuy}{\boldsymbol{\mu}_y}
\newcommand{\bepsilon}{\boldsymbol{\epsilon}}
\newcommand{\bb}{\bv{b}}
\newcommand{\ba}{\bv{a}}
\newcommand{\be}{\bv{e}}
\newcommand{\bc}{\bv{c}}
\newcommand{\bA}{\bv{A}}
\newcommand{\bB}{\bv{B}}
\newcommand{\bI}{\bv{I}}
\newcommand{\bJ}{\bv{J}}
\newcommand{\bC}{\bv{C}}
\newcommand{\bX}{\bv{X}}
\newcommand{\bY}{\bv{Y}}
\newcommand{\bZ}{\bv{Z}}
\newcommand{\bh}{\bv{h}}
\newcommand{\bH}{\bv{H}}
\newcommand{\bt}{\bv{t}}
\newcommand{\bth}{\tilde{\bv{h}}
\begin{flushright}
ST402\\2003-2004\\ Dr M. Knott, B607\\
\end{flushright}}
\newcommand{\var}{\operatorname{var}}
\newcommand{\cov}{\operatorname{cov}}
\raggedright
\definecolor{bgblue}{rgb}{0.04,0.39,0.53}
\pagecolor{bgblue}

\newcommand{\eps}{\varepsilon}
\newcommand{\corr}{{\rm Corr}}
\newcommand{\nid}{{\rm NID}}
\newcommand{\diag}{{\rm diag}}

\newcommand{\Exp}{{\rm Exp}}
\newcommand{\bin}{{\rm Bin}}
\newcommand{\pois}{{\rm Pois}}
\newcommand{\gam}{{\rm Gamma}}
\newcommand{\bet}{{\rm Beta}}

\newcommand{\mX}{\mathbf{X}}
\newcommand{\mx}{\mathbf{x}}
\newcommand{\mY}{\mathbf{Y}}
\newcommand{\mSig}{\mathbf{\Sigma}}
\newcommand{\mmu}{\boldsymbol{\mu}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\vS}{\vspace{-1cm}}
\newcommand{\lra}{$\longrightarrow$}


\begin{document}

\foilhead{Lecture 4 - Objective and Outcomes} We continue our study of
multivariate distributions by looking at conditioning, independence and
joint moments.
\begin{itemize}
\item conditional distributions
\item law of iterated expectations
\item dependence and covariance
\item sums of independent random variables
\item joint moments
\end{itemize}
\foilhead{}
After reviewing the notes you should: \small
\begin{itemize}
\item be able to using conditioning to generate marginal
distributions,
\item know how to derive the moment generating function of a sum
of independent random variables,
\item understand how covariance fits into the framework of joint
moments.
\end{itemize}


\foilhead{Discrete conditional distributions}
\begin{enumerate}
 \item Conditional distribution of $Y$ given $X=x$: \newline $F_{Y|X}(y|x) = P(Y \leq y|X=x)$.
 \item Conditional mass of $Y$ given $X=x$: \newline $ f_{Y|X}(y|x) = P(Y=y|X=x) = f_{X,Y}(x,y)/f_X(x)$. \vS
 \item Relationship between distribution and mass: \newline $F_{Y|X}(y|x) = \sum_{y_i \leq y} f_{Y|X}(y_i|x)$.
\end{enumerate}

\foilhead{Continuous conditional distributions}
\begin{enumerate}
 \item Conditional distribution of $Y$ given $X=x$: \newline
$F_{Y|X}(y|x) = \int_{-\infty}^y (f_{X,Y}(x,v)/f_X(x))dv$.
 \item Conditional density of $Y$ given $X=x$: \newline
$ f_{Y|X}(y|x) = f_{X,Y}(x,y)/f_X(x)$.
\end{enumerate}


\foilhead{Conditional, joint and marginal densities}
\begin{enumerate}
 \item Conditional mass/density \newline
 $ f_{Y|X}(y|x) = \frac{f_{X,Y}(x,y)}{f_{X}(x)}$ \newline $ =
 \left\{\begin{array}{ll}
 \frac{f_{X,Y}(x,y)}{\sum_y f_{X,Y}(x,y)}, & \text{discrete case}, \\
 \frac{f_{X,Y}(x,y)}{\int_{-\infty}^{\infty} f_{X,Y}(x,y)dy}, &
 \text{continuous case}.
 \end{array} \right.$
 \item Joint mass/density: \newline $f_{X,Y}(x,y) = f_{Y|X}(y|x)f_X(x)$.
 \foilhead{}
 \item Marginal mass/density
 $$
 f_{Y}(y) =
 \left\{\begin{array}{ll}
 \sum_x f_{Y|X}(y|x) f_X(x), & \text{discrete}, \\
 \int_{-\infty}^{\infty} f_{Y|X}(y|x) f_X(x) dx, &
 \text{continuous}.
 \end{array} \right.
 $$
\item Reverse conditioning
 $$
 f_{X|Y}(x|y) = \frac{f_{X,Y}(x,y)}{f_X(x)} = \frac{f_X(x)}{f_Y(y)}
 f_{Y|X}(y|x).
 $$
\end{enumerate}


\foilhead{999 calls example}
 The probability that a 999 call arriving at a call center will be a
hoax is $p$. The total number of calls arriving in any given day has a
Poisson distribution with parameter $\lambda$. What is the distribution
of the daily number of hoax calls?


\foilhead{Conditional expectation} Suppose $X$ and $Y$ random
variables.

Condition expectation of $Y$ given $X$: define

$ \psi(x) = E(Y|X=x)$ \newline $ = \left\{ \begin{array}{ll}
\sum_y y f_{Y|X}(y|x), & \text{discrete}, \\
\int_{-\infty}^{\infty} y f_{Y|X}(y|x)dy, & \text{continuous}.
\end{array}\right.
$

The conditional expectation of $Y$ given $X$ is $E(Y|X) = \psi(X)$ (a
random variable).

 \foilhead{} Condition expectation of $g(Y)$ given
$X$: If $g$ is a well-behaved, real-valued function, define $ h(x) =
E(g(Y)|X=x)$
\newline $
 = \left\{
\begin{array}{ll}
\sum_y g(y) f_{Y|X}(y|x), & \text{discrete}, \\
\int_{-\infty}^{\infty} g(y) f_{Y|X}(y|x)dy, & \text{continuous}.
\end{array}\right.
$

The conditional expectation of $g(Y)$ given $X$ is
$E(g(Y)|X)=h(X)$ (a random variable).


\foilhead{Law of iterated expectations}
$$
E[\psi(X)] = E[E(Y|X)] = E(Y).
$$
Useful consequence,
$$
E(Y) = \left\{\begin{array}{ll}
\sum_x E(Y|X=x) f_X(x), & \text{discrete}, \\
\int_{-\infty}^{\infty} E(Y|X=x) f_X(x) dx, & \text{continuous}.
\end{array} \right.
$$

\foilhead{Conditional variance}
 for random variables $X$ and $Y$,
define

$ \omega(x) = \var(Y|X=x)$ \newline $ = \left\{\begin{array}{ll}
\sum_y [y-E(Y|X=x)]^2 f_{Y|X}(y|x), & \text{discrete}, \\
\int_{-\infty}^{\infty} [y-E(Y|X=x)]^2 f_{Y|X}(y|x)dy, &
\text{continuous}.
\end{array}\right.
$

The conditional variance of $Y$ given $X$ is $\var(Y|X) =
\omega(X) = E(Y^2|X) - [E(Y|X)]^2$. The conditional variance is a
random variable and, using the law of iterated expectations, we
can show that $E[\var(Y|X)] = \var(Y) - \var[E(Y|X)]$.



\foilhead{}
 If $X_1,X_2,\ldots,X_n$ independent, then for all $x_1,x_2,
\ldots,x_n$: \vS
\begin{enumerate}
\item $F_{X_1,\ldots,X_n}(x_1,\ldots,x_n) = F_{X_1}(x_1)
F_{X_2}(x_2) \ldots F_{X_n}(x_n)$, \vS
\item $f_{X_1,\ldots,X_n}(x_1,\ldots,x_n) = f_{X_1}(x_1)
f_{X_2}(x_2) \ldots f_{X_n}(x_n)$, \vS
\item $E(X_1 X_2 \ldots X_n) = E(X_1) E(X_2)\ldots E(X_n)$, \vS
\item $g_1(X_1), g_2(X_2), \ldots, g_n(X_n)$ are independent
for real-valued functions $g_1,  g_2, \ldots,  g_n$.
\end{enumerate}

\foilhead{Covariance function}
 for random variables $X$ and $Y$,

$ \cov(X,Y) = E[(X-E(X))(Y-E(Y))] $ \newline $= E(XY) - E(X)E(Y).
$

\begin{enumerate}
\item Symmetry: \newline
$\cov(X,Y) = \cov(Y,X)$. \vS
\item With constant multipliers: \newline
 $\cov(aX, bY) = ab \cov(X,Y)$. \vS
\item Bilinearity: \newline
$\cov(X_1+X_2,Y_1+Y_2) = \cov(X_1,Y_1) + \cov(X_1,Y_2) +
\cov(X_2,Y_1) + \cov(X_2,Y_2)$. \vS \vS
\item Variance: \newline \begin{tabular}[t]{l}
$\var(X) = \cov(X,X)$,\\ $\var(X+Y) = \var(X) + \var(Y) + 2
\cov(X,Y)$, \\ $\var(X-Y) = \var(X) + \var(Y) - 2 \cov(X,Y)$.
\end{tabular} \vS
\item If $X$ and $Y$ are independent,\newline $\cov(X,Y) = 0$.
\end{enumerate}


\foilhead{Sum of random variables}: for independent random variables
$X$ and $Y$, let $Z=X+Y$ be the sum. Density of sum is given by
$$
f_Z(z) = \left\{\begin{array}{ll}
\sum_x f_X(x) f_Y(z-x), & \text{discrete}, \\
\int_{-\infty}^{\infty} f_X(x) f_Y(z-x)dx, & \text{continuous}.
\end{array} \right.
$$
This type of function is known as a \textit{convolution}.

\foilhead{Properties of joint moments}: \vS
\begin{enumerate}
\item $r^{{\rm th}}$ moment for $X$: \newline $m_{r,0} = E(X^r)$.
\vS
\item $r^{{\rm th}}$ central moment for $X$: \newline $\mu_{r,0} =
E[(X-\mu_X)^r]$.\vS
\item Covariance: \newline $\mu_{1,1} = E[(X-E(X))(Y-E(Y))] = \cov(X,Y)$.
\end{enumerate}




\end{document}
