\documentclass{beamer}

%\usepackage[table]{xcolor}
\mode<presentation> {
  \usetheme{Boadilla}
%  \usetheme{Pittsburgh}
%\usefonttheme[2]{sans}
\renewcommand{\familydefault}{cmss}
%\usepackage{lmodern}
%\usepackage[T1]{fontenc}
%\usepackage{palatino}
%\usepackage{cmbright}
  \setbeamercovered{transparent}
\useinnertheme{rectangles}
}
%\usepackage{normalem}{ulem}
%\usepackage{colortbl, textcomp}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{structure}{fg= black}
\definecolor{trial}{cmyk}{1,0,0, 0}
\definecolor{trial2}{cmyk}{0.00,0,1, 0}
\definecolor{darkgreen}{rgb}{0,.4, 0.1}
\usepackage{array}
\beamertemplatesolidbackgroundcolor{white}  \setbeamercolor{alerted
text}{fg=red}

\setbeamertemplate{caption}[numbered]\newcounter{mylastframe}

%\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{colortbl}
%\usepackage[usenames, dvipsnames]{color}
%\setbeamertemplate{caption}[numbered]\newcounter{mylastframe}c
%\newcolumntype{Y}{\columncolor[cmyk]{0, 0, 1, 0}\raggedright}
%\newcolumntype{C}{\columncolor[cmyk]{1, 0, 0, 0}\raggedright}
%\newcolumntype{G}{\columncolor[rgb]{0, 1, 0}\raggedright}
%\newcolumntype{R}{\columncolor[rgb]{1, 0, 0}\raggedright}

%\begin{beamerboxesrounded}[upper=uppercol,lower=lowercol,shadow=true]{Block}
%$A = B$.
%\end{beamerboxesrounded}}
\renewcommand{\familydefault}{cmss}
%\usepackage[all]{xy}

\usepackage{tikz}
\usepackage{lipsum}

 \newenvironment{changemargin}[3]{%
 \begin{list}{}{%
 \setlength{\topsep}{0pt}%
 \setlength{\leftmargin}{#1}%
 \setlength{\rightmargin}{#2}%
 \setlength{\topmargin}{#3}%
 \setlength{\listparindent}{\parindent}%
 \setlength{\itemindent}{\parindent}%
 \setlength{\parsep}{\parskip}%
 }%
\item[]}{\end{list}}
\usetikzlibrary{arrows}
%\usepackage{palatino}
%\usepackage{eulervm}
\usecolortheme{lily}

\newtheorem{com}{Comment}
\newtheorem{lem} {Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{cor}{Corollary}
\newtheorem{obs}{Observation}
 \numberwithin{equation}{section}


\title[Methodology I] % (optional, nur bei langen Titeln nötig)
{Math Camp}

\author{Justin Grimmer}
\institute[Stanford University]{Associate Professor\\Department of Political Science \\  Stanford University}
\vspace{0.3in}

\date{September 21st, 2016}

\begin{document}

\begin{frame}
\maketitle
\end{frame}

\begin{frame}


Questions?\\
(Dose response curve and conditional density functions)


\end{frame}


\begin{frame}
Define following terms:
\begin{itemize}
\item[-] Suppose $f:\Re \rightarrow \Re$.  Provide the definition of a continuous function $f$ 
\item[-] Suppose $f:\Re \rightarrow \Re$.  Define the derivative of function $f$ at $x_{0}$. 
\item[-] Convergence of a sequence $\{a_{n}\}_{n=1}^{\infty}$ 
\item[-] Suppose $f:\Re^{2} \rightarrow \Re$, $f(x_{1}, x_{2})$.  Define $\nabla f(\boldsymbol{x}_{0})$ where $\boldsymbol{x}_{0} = (x_{01}, x_{02})$.  
\end{itemize}




\end{frame}




\begin{frame}
\frametitle{Where We've Been, Where We're Going}

Finishing Up Yesterday:
\begin{itemize}
\item[5)] The Multivariate Normal Distribution and You
\end{itemize}

Today:
\begin{itemize}
\item[1)] Properties of Expectations
\item[2)] Changing Coordinates
\item[3)] Moment Generating Functions
\end{itemize}



\end{frame}




\begin{frame}

\begin{defn}
Suppose $\boldsymbol{X} = (X_{1}, X_{2}, \hdots, X_{N}) $ is a vector of random variables.  If $\boldsymbol{X}$ has pdf 

\begin{eqnarray}
f(\boldsymbol{x}) & = & (2 \pi)^{-N/2} \text{det}\left(\boldsymbol{\Sigma}\right)^{-1/2} \exp\left(-\frac{1}{2}(\boldsymbol{x} - \boldsymbol{\mu})^{'}\boldsymbol{\Sigma}^{-1} (\boldsymbol{x} - \boldsymbol{\mu} ) \right) \nonumber 
\end{eqnarray}
Then we will say $\boldsymbol{X}$ is a \alert{Multivariate Normal} Distribution, 
\begin{eqnarray}
\boldsymbol{X} & \sim & \text{Multivariate Normal} (\boldsymbol{\mu}, \boldsymbol{\Sigma}) \nonumber 
\end{eqnarray}


\end{defn}

\begin{itemize}
\item[-] \alert{Regularly} used for likelihood, Bayesian, and other parametric inferences
\end{itemize}



\end{frame}



\begin{frame}
\frametitle{Properties of the Multivariate Normal Distribution}

Suppose $\boldsymbol{X} = (X_{1}, X_{2}, \hdots, X_{N} ) $ \\

$X \sim \text{Multivariate Normal} (\boldsymbol{\mu}, \boldsymbol{\Sigma}) $

\begin{eqnarray}
E[\boldsymbol{X} ] & = &  \boldsymbol{\mu}\nonumber \\
\text{cov}(\boldsymbol{X} ) & = & \boldsymbol{\Sigma} \nonumber 
\end{eqnarray}

\pause 
\invisible<1>{So that, 

\begin{eqnarray}
\boldsymbol{\Sigma}  & = & \begin{pmatrix} 
\text{var}(X_{1}) & \text{cov}(X_{1}, X_{2}) & \hdots & \text{cov}(X_{1}, X_{N}) \\
\text{cov}(X_{2}, X_{1}) & \text{var}(X_{2}) & \hdots & \text{cov}(X_{2}, X_{N} ) \\
\vdots & \vdots & \ddots & \vdots \\
\text{cov}(X_{N}, X_{1} ) & \text{cov}(X_{N}, X_{2} ) & \hdots & \text{var}(X_{N} ) \\
\end{pmatrix} \nonumber 
\end{eqnarray}
}

\end{frame}





\begin{frame}
\frametitle{Multivariate Normal Distribution}

Consider the (bivariate) special case where $\boldsymbol{\mu} = (0, 0)$ and 
\begin{eqnarray}
\boldsymbol{\Sigma} & = & \begin{pmatrix} 
1 & 0 \\
0 & 1 \\
\end{pmatrix}
\nonumber 
\end{eqnarray}

\pause 
\invisible<1>{Then 
\begin{eqnarray}
f(x_{1}, x_{2} ) & = & (2\pi)^{-2/2} 1^{-1/2} \exp\left(-\frac{1}{2}\left( (\boldsymbol{x}  - \boldsymbol{0} ) ^{'} \begin{pmatrix} 
1 & 0 \\
0 & 1 \\
\end{pmatrix}
(\boldsymbol{x}  - \boldsymbol{0} ) \right) \right) \nonumber \\} \pause 
 \invisible<1-2>{& = & \frac{1}{2\pi} \exp\left(-\frac{1}{2} (x_{1}^{2} + x_{2} ^ 2 )     \right) \nonumber \\} \pause 
 \invisible<1-3>{& = & \frac{1}{\sqrt{2\pi}} \exp\left(-\frac{x_{1}^{2}}{2}  \right) \frac{1}{\sqrt{2\pi}} \exp\left(-\frac{x_{2}^{2}}{2}  \right) \nonumber} \pause 
\end{eqnarray}

\invisible<1-4>{$\leadsto$ product of univariate standard normally distributed random variables} 

\end{frame}


\begin{frame}
\frametitle{Standard Multivariate Normal}

\begin{defn}

Suppose $\boldsymbol{Z} = (Z_{1}, Z_{2}, \hdots, Z_{N}) $ is 
\begin{eqnarray}
\boldsymbol{Z} & \sim & \text{Multivariate Normal}(\boldsymbol{0}, \boldsymbol{I}_{N} ) . \nonumber
\end{eqnarray}

Then we will call $\boldsymbol{Z}$ the standard multivariate normal.  
\end{defn}



\end{frame}

\begin{frame}
\frametitle{Independence and Multivariate Normal}

\begin{prop}
Suppose $X$ and $Y$ are independent.  Then 
\begin{eqnarray}
\text{cov}(X, Y) & = & 0 \nonumber 
\end{eqnarray}

\end{prop}



\end{frame}


\begin{frame}
\begin{small}
\begin{proof}
Suppose $X$ and $Y$ are independent.  \pause 
\begin{eqnarray}
\invisible<1>{\text{cov}(X, Y) & = & E[XY] - E[X]E[Y] \nonumber } \pause 
\end{eqnarray}

\invisible<1-2>{Calculating $E[XY]$} \pause 
\begin{eqnarray}
\invisible<1-3>{E[XY] & = & \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} x y f(x,y)dxdy \nonumber \\} \pause 
\invisible<1-4>{& =& \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} x y f_{X}(x) f_{Y}(y)dxdy \nonumber \\} \pause 
\invisible<1-5>{& = & \int_{-\infty}^{\infty} x f_{X}(x) dx \int_{-\infty}^{\infty} y f_{Y}(y) dy \nonumber \\} \pause 
 \invisible<1-6>{& = & E[X] E[Y] \nonumber} \pause 
\end{eqnarray}

\invisible<1-7>{Then cov$(X,Y) = 0$.} \pause 


\end{proof}
\begin{itemize}
\invisible<1-8>{\item[-] More generally if $X$ and $Y$ are independent, $E[g(X) h(Y)] = E[g(X)] E[h(Y)]$ for functions $g:\Re \rightarrow \Re$ and $h:\Re \rightarrow \Re$.  } 
\end{itemize}


\end{small}


\end{frame}





\begin{frame}
\frametitle{Zero covariance does not \alert{generally} imply Independent}
Suppose $X \in \{-1, 1\}$ with $P(X = 1) = P(X = -1) = 1/2$.  \\
Suppose $Y \in \{-1, 0,1\}$ with $Y = 0 $ if $X = -1$ and $P(Y = 1) = P(Y= -1) $ if $X = 1$.  \\

\begin{small}
\begin{eqnarray}
E[XY] & = & \sum_{i \in \{-1, 1\} } \sum_{j \in \{-1, 0, 1\}} i j P(X = i, Y = j) \nonumber \\
& = & -1 \times 0 \times  P(X = -1, Y = 0) + 1 \times 1  \times P(X = 1, Y = 1)  \nonumber \\
 && - 1 \times 1 \times P(X = 1, Y = -1) \nonumber \\
 &= & 0 + P(X = 1, Y = 1)  - P(X = 1, Y = -1 ) \nonumber \\
  & = &  0.25 - 0.25 = 0  \nonumber \\
E[X] & = &  0 \nonumber \\
E[Y] & = & 0 \nonumber 
\end{eqnarray}

\end{small}



\end{frame}


\begin{frame}

\begin{prop}
Suppose $\boldsymbol{X} \sim \text{Multivariate Normal}(\boldsymbol{\mu}, \boldsymbol{\Sigma})$.  
where $\boldsymbol{X}= (X_{1}, X_{2}, \hdots, X_{N})$. \\
If $\text{cov}(X_{i}, X_{j})  = 0  $, then $X_{i}$ and $X_{j}$ are independent 

\end{prop}



\end{frame}



\begin{frame}
\frametitle{Iterated Expectations}

\begin{prop}
Suppose $X$ and $Y$ are random variables.  Then 

\begin{eqnarray}
E[X] & = & E[E[X|Y]] \nonumber 
\end{eqnarray}




\end{prop}


\begin{itemize}
\item[-] Inner Expectation is $E[X|Y] = \int_{-\infty}^{\infty} x f_{X|Y} (x|y) dx$.  
\item[-] Outer expectation is over $y$.  
\end{itemize}


\end{frame}


\begin{frame}
\frametitle{Iterated Expectations}

\pause 
\begin{proof}
\begin{eqnarray}
\invisible<1>{E[E[X|Y]] & = & \int_{-\infty}^{\infty}  \int_{-\infty}^{\infty} x f_{X|Y} (x|y) f_{Y}(y) dx dy \nonumber \\} \pause 
 \invisible<1-2>{&= & \int_{-\infty}^{\infty}  \int_{-\infty}^{\infty} x f_{X|Y} (x|y) f_{Y}(y) dy dx \nonumber \\} \pause 
 \invisible<1-3>{& = & \int_{-\infty}^{\infty} x \int_{-\infty}^{\infty}  f(x, y) dy dx  \nonumber \\} \pause 
 \invisible<1-4>{& = & \int_{-\infty}^{\infty}  x f_{X}(x) dx  \nonumber \\} \pause 
  \invisible<1-5>{& =& E[X] \nonumber } 
\end{eqnarray}



\end{proof}



\end{frame}


\begin{frame}
\frametitle{Iterated Expectations}

\begin{defn}
Suppose $Y$ is a continuous random variable with $Y \in [0,1]$ and pdf of $Y$ given by 

\begin{eqnarray}
f(y) & = & \frac{\Gamma(\alpha_1 + \alpha_2)}{\Gamma(\alpha_{1} ) \Gamma(\alpha_{2})} y^{\alpha_{1} - 1} (1- y)^{\alpha_{2} - 1 } \nonumber 
\end{eqnarray}

Then we will say $Y$ is a \alert{Beta} distribution with parameters $\alpha_{1}$ and $\alpha_{2}$.  Equivalently,
\begin{eqnarray}
Y & \sim & \text{Beta}(\alpha_{1}, \alpha_{2} ) \nonumber 
\end{eqnarray}



\end{defn}


\begin{itemize}
\item[-] Beta is a distribution on \alert{proportions} 
\item[-] Beta is a special case of the \alert{Dirichlet} distribution 
\item[-] $E[Y] = \frac{\alpha_{1}}{\alpha_{1} + \alpha_{2}}$
\end{itemize}


\end{frame}


\begin{frame}
\frametitle{Iterated Expectations}

Suppose 
\begin{eqnarray}
\pi & \sim & \text{Beta}(\alpha_{1}, \alpha_{2}) \nonumber \\
Y|\pi, n & \sim & \text{Binomial}(n, \pi)\nonumber 
\end{eqnarray}

What is $E[Y]$? \pause 

\begin{eqnarray}
\invisible<1>{E[Y] & = & E[E[Y| \pi]] \nonumber \\} \pause 
\invisible<1-2>{& = & \int_{-\infty}^{\infty} \sum_{j = 0}^{N} {{N}\choose{j}} j p(j|\pi) f(\pi) d\pi \nonumber \\} \pause 
\invisible<1-3>{ & = & \int_{-\infty}^{\infty} N \pi f(\pi) d\pi \nonumber  \\} \pause 
  \invisible<1-4>{& = & N \frac{\alpha_{1}}{\alpha_{1} + \alpha_{2}} \nonumber } 
\end{eqnarray}


\end{frame}



\begin{frame}
\frametitle{Change of Coordinates}


\begin{prop}
Suppose $X$ is a random variable and $Y = g(X)$, where $g:\Re \rightarrow \Re$ that is a $monotonic$ function.  \\
Define $g^{-1}:\Re \rightarrow \Re$ such that $g^{-1}(g(X)) = X$ and is differentiable.  Then, 
\begin{eqnarray}
f_{Y}(y) & = & f_{X}(g^{-1}(y))\left|\frac{\partial g^{-1}(y)}{\partial y} \right| \text{ if $y = g(x)$ for some $x$ } \nonumber \\
& = & 0 \text{ otherwise } \nonumber 
\end{eqnarray}

\end{prop}


\end{frame}

\begin{frame}
\frametitle{Change of Coordinates}


\begin{proof}

Suppose $g(\cdot)$ is monotonically increasing (WLOG)\pause 
\begin{eqnarray}
\invisible<1>{F_{Y}(y) & = & P(Y \leq y) \nonumber \\} \pause 
\invisible<1-2>{& = & P(g(X) \leq y) \nonumber \\} \pause 
\invisible<1-3>{& = & P(X \leq g^{-1}(y) ) \nonumber \\} \pause 
\invisible<1-4>{& = & F_{X}(g^{-1}(y) ) \nonumber } \pause 
\end{eqnarray}
\invisible<1-5>{Now differentiating to get the pdf } \pause 
\begin{eqnarray}
\invisible<1-6>{\frac{\partial F_{Y}(y)}{\partial y} & = & \frac{\partial F_{X}(g^{-1}(y) )} {\partial y } \nonumber \\
 & = & f_{X}(g^{-1}(y) ) \frac{\partial g^{-1}(y)}{\partial y }   \nonumber } \pause 
\end{eqnarray}
\invisible<1-7>{Then this is a pdf because $\frac{\partial g^{-1}(Y)}{\partial y } > 0$.  } 


\end{proof}



\end{frame}


\begin{frame}
\frametitle{Change of Coordinates}

Suppose $X$ is a random variable with pdf $f_{X}(x)$.  Suppose $Y =  X^{n}$.  Find $f_{Y}(y)$. \pause  \\
\invisible<1>{Then $g^{-1} (x)  =  x^{1/n}$.  } \pause 




\begin{eqnarray}
\invisible<1-2>{f_{Y}(y) & = & f_{X}(g^{-1}(y)) \left| \frac{\partial g^{-1}(Y)}{\partial y } \right| \nonumber \\} \pause 
\invisible<1-3>{ & = & f_{X} (y^{1/n} ) \frac{y^{\frac{1}{n} - 1}}{n} \nonumber } 
\end{eqnarray}
\pause
\invisible<1-4>{\alert{We've used this to derive many of the pdfs}} \pause 
\begin{itemize}
\invisible<1-5>{\item[-] Normal distribution }
\invisible<1-5>{\item[-] Chi-Squared Distribution}
\end{itemize}




\end{frame}







\begin{frame}
\frametitle{Moment Generating Functions}


\begin{defn}
Suppose $X$ is a random variable with pdf $f$.  Define, 
\begin{eqnarray}
E[X^{n}] & = & \int_{-\infty}^{\infty} x^{n} f(x) dx   \nonumber 
\end{eqnarray}

We will call $X^{n}$ the \alert{$n^{\text{th}}$} moment of $X$ 

\end{defn}

\begin{itemize}
\item[-] By this definition $var(X) = \text{Second Moment} - \text{First Moment}^{2} $
\item[-] We are assuming that the integral converges
\end{itemize}

\end{frame}


\begin{frame}
\frametitle{Moment Generating Functions}

\begin{prop}
Suppose $X$ is a random variable with pdf $f(x)$.  Call $M(t) = E[e^{tX}]$, 
\begin{eqnarray}
M(t) & = & E[e^{tX}] \nonumber \\
 & = & \int_{-\infty}^{\infty} e^{tx} f(x) dx \nonumber 
 \end{eqnarray}

We will call $M(t)$ the moment generating function, because:
\begin{eqnarray}
\frac{\partial^{n} M (t) }{\partial^{n} t}|_{0} & = & E[X^{n}] \nonumber 
\end{eqnarray}

(Assuming that we can interchange derivative and integral)

\end{prop}



\end{frame}




\begin{frame}

\scalebox{0.25}{\includegraphics{Meme.jpg}}

\end{frame}



\begin{frame}
\frametitle{Moment Generating Functions}

\begin{small}
\begin{proof}
Recall the Taylor Expansion of $e^{tX}$ at $0$, \pause 
\begin{eqnarray}
\invisible<1>{e^{tX} & = & 1 + tx + \frac{t^2 x^2}{2!} + \frac{t^3 x^3}{3!} + \hdots \nonumber } \pause 
\end{eqnarray}

\invisible<1-2>{Then, } \pause 
\begin{eqnarray}
\invisible<1-3>{E[e^{tX} ] & = &  1 + tE[X] + \frac{t^2}{2!} E[X^2] + \frac{t^3}{3!} E[X^3] + \hdots \nonumber } \pause 
\end{eqnarray}

\invisible<1-4>{Differentiate once:} \pause 
\begin{eqnarray}
\invisible<1-5>{\frac{\partial M(t)}{\partial t} & = & 0 + E[X]  + \frac{2t}{2!} E[X^2] + \hdots \nonumber \\
M^{'}(0) & = & 0 + E[X] + 0 + 0 \hdots \nonumber } 
\end{eqnarray}





\end{proof}

\end{small}



\end{frame}

\begin{frame}

\begin{small}
\begin{proof}

Differentiate $n$ times \pause 
\begin{eqnarray}
\invisible<1>{\frac{\partial^{n} M(t)}{\partial^{n} t } & = & 0 + 0 + 0 + \hdots + \frac{n \times n-1 \times \hdots 2 \times t^{0} E[X^{n}] }{n!}  + \frac{n!t E[X^{n+1}] }{(n+ 1)! } + \hdots \nonumber \\} \pause 
\invisible<1-2>{& = & \frac{n! E[X^{n}] }{n!}  + \frac{n!t E[X^{n+1}] }{(n+ 1)! } + \hdots  \nonumber } \pause 
\end{eqnarray}

\invisible<1-3>{Evaluated at 0, yields $M^{n}(0)  = E[X^{n}] $} \pause 

\end{proof}

\begin{itemize}
\invisible<1-4>{\item[-] If two random variables, $X$ and $Y$ have the same moment generating functions, then $F_{X}(x) = F_{Y}(y)$ for \alert{almost all} $x$.  } 
\end{itemize}


\end{small}
\end{frame}


\begin{frame}
\frametitle{The Moments of the Normal Distribution}
Suppose $Z \sim N(0,1)$.  \pause 

\begin{eqnarray}
\invisible<1>{E[e^{tX}] & = & \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} e^{tx} e^{-x^2/2} dx \nonumber } \pause 
\end{eqnarray}

\invisible<1-2>{$tx - \frac{1}{2} x^2 = -\frac{1}{2}\left( ( x - t)^2 - t^2 \right)$} \pause 

\begin{eqnarray} 
\invisible<1-3>{E[e^{tX}] & = & \frac{1}{\sqrt{2\pi}}  e^{\frac{t^{2}}{2}}\int_{-\infty}^{\infty} e^{-(x- t)^2/2} dx \nonumber \\} \pause 
 \invisible<1-4>{& = & e^{\frac{t^{2}}{2}} \nonumber } 
\end{eqnarray}


\end{frame}

\begin{frame}
\frametitle{Extracting Moments of the Normal Distribution}

\pause 
\begin{eqnarray}
\invisible<1>{M^{'}(0) & = &E[X] =  e^{t^2/2} t |_{0} = 0 \nonumber \\} \pause
\invisible<1-2>{M^{''} (0 ) & = & E[X^2] =  e^{t^2/2} (t^2 + 1) |_{0} = 1 \nonumber \\} \pause 
\invisible<1-3>{M^{'''} (0) & = & E[X^3] = e^{t^2/2} t (t^2 + 3) |_{0} = 0 \nonumber \\} \pause 
\invisible<1-4>{M^{''''} (0) & = & E[X^4] = e^{t^2/2} (t^4 + 6t^2 + 3)|_{0} = 3 \nonumber } \\ \pause 
\invisible<1-5>{M^{5} (0) & = & E[X^5] = e^{t^2/2} t (t^4 + 10t^2 + 15)|_{0} = 0 \nonumber } \\ \pause 
\invisible<1-6>{M^{6} (0) & = & E[X^6] = e^{t^2/2} (t^6 + 15t^4 + 45t^2 + 15 )|_{0} = 15 \nonumber } \pause 
\end{eqnarray} 


\end{frame}

\begin{frame}

\begin{prop}
Suppose $X_{i}$ are a sequence of independent random variables.  Define 
\begin{eqnarray}
Y & = & \sum_{i=1}^{N} X_{i} \nonumber 
\end{eqnarray}

Then 
\begin{eqnarray}
M_{Y}(t) & = & \prod_{i=1}^{N} M_{X_{i}}(t) \nonumber 
\end{eqnarray}


\end{prop}

\end{frame}

\begin{frame}

\begin{proof}
\begin{eqnarray}
M_{Y}(t) & = & E[e^{tY}] \nonumber \\ \pause 
\invisible<1>{& = & E[e^{t\sum_{i=1}^{N} X_{i} } ] \nonumber \\ } \pause 
 \invisible<1-2>{& = & E[e^{tX_{1} + tX_{2} + \hdots tX_{N} } ] \nonumber \\} \pause 
  \invisible<1-3>{& = & E[e^{tX_{1} }]E[e^{tX_{2} }] \hdots E[e^{tX_{N} }] \text{ (by independence) } \nonumber \\} \pause 
   \invisible<1-4>{& = & \prod_{i=1}^{N} E[e^{tX_{i}}] \nonumber } 
\end{eqnarray}

\end{proof}

\end{frame}



\begin{frame}
Tomorrow:\\

Sequences of Random Variables



\end{frame}


\end{document}
