% $Header: /cvsroot/latex-beamer/latex-beamer/examples/beamerexample5.tex,v 1.22 2004/10/08 14:02:33 tantau Exp $

\documentclass[11pt]{beamer}
\usepackage{amscd}

%\usetheme{Madrid} % Darmstadt, Boadilla


\mode<presentation> {
  \usetheme{Madrid}
  \setbeamercovered{transparent}
}

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsbsy,alltt,amsmath,times}
\usepackage{epsfig, color, graphicx, rotate, colordvi}
%\usepackage{fancybox,fancyhdr,times,subfigure}
\usepackage{hyperref, mathptmx}


\setbeamercovered{dynamic}

\newcommand{\Lang}[1]{\operatorname{\text{\textsc{#1}}}}

\newcommand{\Class}[1]{\operatorname{\mathchoice
  {\text{\sf \small #1}}
  {\text{\sf \small #1}}
  {\text{\sf #1}}
  {\text{\sf #1}}}}

\newcommand{\NumSAT}      {\text{\small\#SAT}}
\newcommand{\NumA}        {\#_{\!A}}

\newcommand{\barA}        {\,\bar{\!A}}

\newcommand{\Nat}{\mathbb{N}}
\newcommand{\Set}[1]{\{#1\}}

\newtheorem{thm}{Result}%[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{exam}{Example}%[section]
\newtheorem{rem}{Remark}

\newcommand{\cred}{\textcolor {red}}
\newcommand{\cblue}{\textcolor {blue}}
\newcommand{\cgreen}{\textcolor {green}}

\def\ul{\underline}

\def\sign{\;{\rm sign}}
\def\rank{\;{\rm rank}}
\def\disp{\displaystyle}
\def\sn{\sqrt{n}}
\def\Pr{\mathrm{P}}

\def\Cov{\;{\rm Cov}}
\def\L{\underline L}
\def\LL{\overline L}

\def\balpha{{\boldsymbol{\alpha}}}
\def\cal{\mathcal}
\def\conas{\stackrel{a.s.} {\longrightarrow}}         % conv. a.s.
\def\conp{\stackrel{\cal P} {\longrightarrow}}        % conv. in probability
\def\conD{\stackrel{\mathcal{L}} {\longrightarrow}}        % conv. in distribution
\def\conw{\stackrel{\mathcal{L}} {\rightarrow}}        % conv. in distribution
\def\hat{\widehat}
%\def\endproof{\begin{flushright}$\lozenge$\end{flushright}}
\def\Proof{\noindent{\it Proof }}
\def\endproof{\hfill{$\Box$}}
\newcommand{\wcon}{\stackrel{\mathcal{L}}{\longrightarrow}}
\def\Var{\mbox{var}}

%%%%%%%%%%%%%%% MY DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Put your own definitions
%
\def\VaR{{\rm VaR}}
\def\E{{\rm E}}
\def\beqrs{\begin{eqnarray*}}           %\beqrs
\def\eeqrs{\end{eqnarray*}}             %\eeqrs

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pgfdeclaremask{tu}{beamer-tu-logo-mask}
\pgfdeclaremask{computer}{beamer-computer-mask}
\pgfdeclareimage[interpolate=true,mask=computer,height=2cm]{computerimage}{beamer-computer}
\pgfdeclareimage[interpolate=true,mask=computer,height=2cm]{computerworkingimage}{beamer-computerred}
\pgfdeclareimage[mask=tu,height=.5cm]{logo}{beamer-tu-logo}

\logo{\pgfuseimage{logo}}

\title[Stat 609 Lecture 5]{Stat 609: Mathematical Statistics \\ Lecture 5}
\author[UW-Madison]{Jun Shao}
\institute[Statistics]{%
%  Department of Statistics\\
%  University of Wisconsin\\
%  Madison, WI 53706, USA\\
%~~~\\
  }
\date[2015]{}

\colorlet{redshaded}{red!25!bg}
\colorlet{shaded}{black!25!bg}
\colorlet{shadedshaded}{black!10!bg}
\colorlet{blackshaded}{black!40!bg}

\colorlet{darkred}{red!80!black}
\colorlet{darkblue}{blue!80!black}
\colorlet{darkgreen}{green!80!black}

\def\radius{0.96cm}
\def\innerradius{0.85cm}

\def\softness{0.4}
\definecolor{softred}{rgb}{1,\softness,\softness}
\definecolor{softgreen}{rgb}{\softness,1,\softness}
\definecolor{softblue}{rgb}{\softness,\softness,1}

\definecolor{softrg}{rgb}{1,1,\softness}
\definecolor{softrb}{rgb}{1,\softness,1}
\definecolor{softgb}{rgb}{\softness,1,1}

\newcommand{\Bandshaded}[2]{
  \color{shadedshaded}
  \pgfmoveto{\pgfxy(-0.5,0)}
  \pgflineto{\pgfxy(-0.6,0.1)}
  \pgflineto{\pgfxy(-0.4,0.2)}
  \pgflineto{\pgfxy(-0.6,0.3)}
  \pgflineto{\pgfxy(-0.4,0.4)}
  \pgflineto{\pgfxy(-0.5,0.5)}
  \pgflineto{\pgfxy(4,0.5)}
  \pgflineto{\pgfxy(4.1,0.4)}
  \pgflineto{\pgfxy(3.9,0.3)}
  \pgflineto{\pgfxy(4.1,0.2)}
  \pgflineto{\pgfxy(3.9,0.1)}
  \pgflineto{\pgfxy(4,0)}
  \pgfclosepath
  \pgffill

  \color{black}
  \pgfputat{\pgfxy(0,0.7)}{\pgfbox[left,base]{#1}}
  \pgfputat{\pgfxy(0,-0.1)}{\pgfbox[left,top]{#2}}
}

\newcommand{\Band}[2]{
  \color{shaded}
  \pgfmoveto{\pgfxy(-0.5,0)}
  \pgflineto{\pgfxy(-0.6,0.1)}
  \pgflineto{\pgfxy(-0.4,0.2)}
  \pgflineto{\pgfxy(-0.6,0.3)}
  \pgflineto{\pgfxy(-0.4,0.4)}
  \pgflineto{\pgfxy(-0.5,0.5)}
  \pgflineto{\pgfxy(4,0.5)}
  \pgflineto{\pgfxy(4.1,0.4)}
  \pgflineto{\pgfxy(3.9,0.3)}
  \pgflineto{\pgfxy(4.1,0.2)}
  \pgflineto{\pgfxy(3.9,0.1)}
  \pgflineto{\pgfxy(4,0)}
  \pgfclosepath
  \pgffill

  \color{black}
  \pgfputat{\pgfxy(0,0.7)}{\pgfbox[left,base]{#1}}
  \pgfputat{\pgfxy(0,-0.1)}{\pgfbox[left,top]{#2}}
}

\newcommand{\BaenderNormal}
{%
  \pgfsetlinewidth{0.4pt}
  \color{black}
  \pgfputat{\pgfxy(0,5)}{\Band{input tapes}{}}
  \pgfputat{\pgfxy(0.35,4.6)}{\pgfbox[center,base]{$\vdots$}}
  \pgfputat{\pgfxy(0,4)}{\Band{}{}}

  \pgfxyline(0,5)(0,5.5)
  \pgfxyline(1.2,5)(1.2,5.5)
  \pgfputat{\pgfxy(0.25,5.25)}{\pgfbox[left,center]{$w_1$}}

  \pgfxyline(0,4)(0,4.5)
  \pgfxyline(1.8,4)(1.8,4.5)
  \pgfputat{\pgfxy(0.25,4.25)}{\pgfbox[left,center]{$w_n$}}
  \ignorespaces}

\newcommand{\BaenderZweiNormal}
{%
  \pgfsetlinewidth{0.4pt}
  \color{black}
  \pgfputat{\pgfxy(0,5)}{\Band{Zwei Eingabebänder}{}}
  \pgfputat{\pgfxy(0,4.25)}{\Band{}{}}

  \pgfxyline(0,5)(0,5.5)
  \pgfxyline(1.2,5)(1.2,5.5)
  \pgfputat{\pgfxy(0.25,5.25)}{\pgfbox[left,center]{$u$}}

  \pgfxyline(0,4.25)(0,4.75)
  \pgfxyline(1.8,4.25)(1.8,4.75)
  \pgfputat{\pgfxy(0.25,4.5)}{\pgfbox[left,center]{$v$}}
  \ignorespaces}

\newcommand{\BaenderHell}
{%
  \pgfsetlinewidth{0.4pt}
  \color{black}
  \pgfputat{\pgfxy(0,5)}{\Bandshaded{input tapes}{}}
  \color{shaded}
  \pgfputat{\pgfxy(0.35,4.6)}{\pgfbox[center,base]{$\vdots$}}
  \pgfputat{\pgfxy(0,4)}{\Bandshaded{}{}}

  \color{blackshaded}
  \pgfxyline(0,5)(0,5.5)
  \pgfxyline(1.2,5)(1.2,5.5)
  \pgfputat{\pgfxy(0.25,5.25)}{\pgfbox[left,center]{$w_1$}}

  \pgfxyline(0,4)(0,4.5)
  \pgfxyline(1.8,4)(1.8,4.5)
  \pgfputat{\pgfxy(0.25,4.25)}{\pgfbox[left,center]{$w_n$}}
  \ignorespaces}

\newcommand{\BaenderZweiHell}
{%
  \pgfsetlinewidth{0.4pt}
  \color{black}
  \pgfputat{\pgfxy(0,5)}{\Bandshaded{Zwei Eingabebänder}{}}%
  \color{blackshaded}
  \pgfputat{\pgfxy(0,4.25)}{\Bandshaded{}{}}
  \pgfputat{\pgfxy(0.25,4.5)}{\pgfbox[left,center]{$v$}}
  \pgfputat{\pgfxy(0.25,5.25)}{\pgfbox[left,center]{$u$}}%

  \pgfxyline(0,5)(0,5.5)
  \pgfxyline(1.2,5)(1.2,5.5)

  \pgfxyline(0,4.25)(0,4.75)
  \pgfxyline(1.8,4.25)(1.8,4.75)
  \ignorespaces}

\newcommand{\Slot}[1]{%
  \begin{pgftranslate}{\pgfpoint{#1}{0pt}}%
    \pgfsetlinewidth{0.6pt}%
    \color{structure}%
    \pgfmoveto{\pgfxy(-0.1,5.5)}%
    \pgfbezier{\pgfxy(-0.1,5.55)}{\pgfxy(-0.05,5.6)}{\pgfxy(0,5.6)}%
    \pgfbezier{\pgfxy(0.05,5.6)}{\pgfxy(0.1,5.55)}{\pgfxy(0.1,5.5)}%
    \pgflineto{\pgfxy(0.1,4.0)}%
    \pgfbezier{\pgfxy(0.1,3.95)}{\pgfxy(0.05,3.9)}{\pgfxy(0,3.9)}%
    \pgfbezier{\pgfxy(-0.05,3.9)}{\pgfxy(-0.1,3.95)}{\pgfxy(-0.1,4.0)}%
    \pgfclosepath%
    \pgfstroke%
  \end{pgftranslate}\ignorespaces}

\newcommand{\SlotZwei}[1]{%
  \begin{pgftranslate}{\pgfpoint{#1}{0pt}}%
    \pgfsetlinewidth{0.6pt}%
    \color{structure}%
    \pgfmoveto{\pgfxy(-0.1,5.5)}%
    \pgfbezier{\pgfxy(-0.1,5.55)}{\pgfxy(-0.05,5.6)}{\pgfxy(0,5.6)}%
    \pgfbezier{\pgfxy(0.05,5.6)}{\pgfxy(0.1,5.55)}{\pgfxy(0.1,5.5)}%
    \pgflineto{\pgfxy(0.1,4.25)}%
    \pgfbezier{\pgfxy(0.1,4.25)}{\pgfxy(0.05,4.15)}{\pgfxy(0,4.15)}%
    \pgfbezier{\pgfxy(-0.05,4.15)}{\pgfxy(-0.1,4.2)}{\pgfxy(-0.1,4.25)}%
    \pgfclosepath%
    \pgfstroke%
  \end{pgftranslate}\ignorespaces}

\newcommand{\ClipSlot}[1]{%
  \pgfrect[clip]{\pgfrelative{\pgfxy(-0.1,0)}{\pgfpoint{#1}{4cm}}}{\pgfxy(0.2,1.5)}\ignorespaces}

\newcommand{\ClipSlotZwei}[1]{%
  \pgfrect[clip]{\pgfrelative{\pgfxy(-0.1,0)}{\pgfpoint{#1}{4.25cm}}}{\pgfxy(0.2,1.25)}\ignorespaces}


\AtBeginSection[]{\frame{\frametitle{Outline}\tableofcontents[current]}}
\def\back{\!\!\!\!\!}

\begin{document}

%\frame{\titlepage}

\frame{\vspace{-1mm}
	\frametitle{Lecture 5: Moment generating functions}
	\vspace{-2mm}
\begin{block}{Definition 2.3.6.}
The moment generating
function (mgf) of a random variable $X$ is \vspace{-2mm}
\[ M_X(t) = E(e^{tX} )  = \left\{\begin{array}{ll}
\sum_x  e^{tx} f_X(x) & \quad \mbox{if $X$ has a pmf} \vspace{2mm}  \\
\int_{-\infty}^\infty e^{tx} f_X(x) dx & \quad \mbox{if $X$ has a pdf} \end{array} \right. \vspace{-2mm}
\]
provided that  $E(e^{tX} )$ exists. (Note that $M_X(0)=E(e^{0X})=1$ always exists.)
Otherwise, we say that the mgf $M_X(t)$ does not exist at $t$.
\end{block}\vspace{-2mm}
\begin{alertblock}{Theorem 2.3.15.}
For any constants $a$ and $b$, the mgf of the random variable $aX+b$ is \vspace{-2mm}
\[ M_{aX+b}(t)= e^{bt}M_X(at) \]
\end{alertblock}\vspace{-2mm}
\begin{alertblock}{Proof.}
By definition, \vspace{-2mm}
\[ M_{aX+b}(t)= E(e^{t(aX+b)}) = E(e^{taX}e^{bt}) = e^{bt} E(e^{(ta)X}) = e^{bt}M_X(at) \]
\end{alertblock}}
\frame{\vspace{-2mm}
\begin{alertblock}{The main use of mgf}
\begin{itemize}
\item
It can be used to generate moments.
\item
It helps to characterize a distribution.
\end{itemize}
\end{alertblock}\vspace{-2mm}
\begin{block}{Theorem 2.3.7.}
 If $M_X(t)$ exists at $\pm t$, then $E(X^n)$ exists for any positive integer $n$ and\vspace{-2.5mm}
\[ E(X^n) = M_X^{(n)}(0) = \frac{d^n}{dt^n}M_X(t)\bigg|_{t=0} \vspace{-2.5mm}  \]
i.e., the $n$th moment is the $n$th derivative of $M_X(t)$ evaluated at $t=0$.
\end{block}\vspace{-2mm}
\begin{block}{Proof.}
Assuming that we can exchange the differentiation and integration (which will be justified later), \vspace{-2.5mm}
\[ \frac{d^n}{dt^n} M_X(t) = \frac{d^n}{dt^n} \int_{-\infty}^\infty e^{tx} f_X(x)dx =
  \int_{-\infty}^\infty \frac{d^ne^{tx}}{dt^n}  f_X(x)dx
  = \int_{-\infty}^\infty x^n e ^{tx} f_X(x)dx \vspace{-2mm}\]
  Hence\vspace{-2mm}
  \[ \frac{d^n}{dt^n}M_X(t)\bigg|_{t=0} =  \int_{-\infty}^\infty x^n e ^{0 x} f_X(x)dx
  =  \int_{-\infty}^\infty x^n  f_X(x)dx = E(X^n) \]
\end{block}
}
\frame{
\begin{block}{}
The condition that $M_X(t)$ exists at $\pm t$ is in fact used to ensure the validity of the exchange of differentiation and integration.
\vspace{1.5mm}

Besides this, we also need to argue that $E|X|^n < \infty$ for any positive integer $n$ under the condition that
 $M_X(t)$ exists at $\pm t$.
\vspace{1.5mm}

We first show that, if $M_X(t)$ exists at $\pm t$, then for any $s \in (-t,t)$, $M_X(s) $ exists:
\vspace{-2mm}
\beqrs
 M_X(s) \back & = & \back
E( e^{sX} ) = E[e^{sX} I(X>0 )] + E[e^{sX} I(X \leq 0 )] \\
\back & \leq & \back E[e^{tX} I(X>0 )] + E[e^{-tX} I(X \leq 0 )] \leq E(e^{tX}) + E(e^{-tX})  \\
\back & = & \back M_X(t) + M_X(-t) < \infty
\eeqrs
$~~$ \vspace{-7mm}

where $I(X>0)$ is the indicator of $X>0$.
\vspace{1.5mm}

Next, we show that, for any positive $p>0$, $E|X|^p< \infty$ under the condition $M_X(t)$ exists at $\pm t$.
\vspace{1.5mm}

For a given $p>0$, choose $s$ such that $0< ps < t$.
\vspace{1.5mm}

Because  $s|X| \leq e^{s|X|}$, we have $s^p|X|^p \leq e^{ps |X|} \leq e^{ps X}+e^{- ps X}$ and \vspace{-2mm}
\[ E|X|^p \leq s^{-p}
E(e^{ps X}+e^{- ps X})  = s^{-p} M_X(ps ) + M_X(-ps ) < \infty \]
\end{block}}
\frame{\vspace{-2mm}
\begin{block}{}
In fact, the condition that $M_X(t)$ exists at $\pm t$ ensures that $M_X(s)$ has the power series expansion \vspace{-3mm}
\[ M_X(s) = \sum_{k=0}^\infty \frac{E(X^k) s^k }{k!} \quad \quad -t <s < t \vspace{-3mm}\]
If the distribution of $X$ is symmetric (about 0), i.e., $X$ and $-X$ have the same distribution, then \vspace{-3mm}
\[ M_X(t) = E(e^{tX}) = E(e^{t(-X)}) = E(e^{-tX}) = M_X(-t) \vspace{-3mm} \]
i.e., $M_X(t)$ is an even function and $M_X(t)$ exists at $\pm t$ is the same as
$M_X(t)$ exists at a $t>0$.
\end{block}
\vspace{-2mm}
\begin{alertblock}{Example 2.3.8 (Gamma mgf)}
Let $X$ have the gamma pdf\vspace{-3mm}
\[ f_X(x) = \frac{1}{\Gamma (\alpha )\beta^\alpha} x^{\alpha -1} e^{-x/\beta} , \quad x>0 , \vspace{-3mm}\]
where $\alpha >0$ and $\beta >0$ are two constants and
\vspace{-3mm}
\[ \Gamma (\alpha ) = \int_0^\infty x^{\alpha -1} e^{-x} dx  \quad \quad \alpha > 0 \vspace{-3mm}\]
is the so-called gamma function.
\end{alertblock}
}
\frame{
\begin{alertblock}{}
If $t < 1/\beta$,  \vspace{-3mm}
\beqrs
M_X(t) &=& E(e^{tX}) = \frac{1}{\Gamma(\alpha )\beta^\alpha} \int_0^\infty e^{tx} x^{\alpha -1} e^{-x/\beta} dx \\
& = & \frac{1}{\Gamma(\alpha )\beta^\alpha} \int_0^\infty  x^{\alpha -1} e^{-x/(\frac{\beta}{1-\beta t})} dx \\
& = &  \frac{(\frac{\beta}{1-\beta t})^\alpha}{\Gamma(\alpha )\beta^\alpha} \int_0^\infty  s^{\alpha -1} e^{-s} ds =  \frac{1}{(1-\beta t)^\alpha}
\eeqrs
If $t \geq 1/\beta$, then $E(e^{tX}) = \infty$.
\vspace{1.5mm}

We can obtain\vspace{-2mm}
\[ E(X) = \frac{d}{dt}M_X(t)\bigg|_{t=0} = \frac{\alpha \beta }{(1-\beta t)^{\alpha +1}}\bigg|_{t=0} = \alpha \beta  \vspace{-2mm}\]
For any integer $n>1$, \vspace{-2mm}
\beqrs
E(X^n) &=& \frac{d^n}{dt^n}M_X(t)\bigg|_{t=0} = \frac{\alpha (\alpha+1)\cdots (\alpha+n-1) \beta^n }{(1-\beta t)^{\alpha +n}}\bigg|_{t=0} \\
& = &  \alpha
(\alpha+1)\cdots (\alpha +n-1) \beta^n
\eeqrs
\end{alertblock}}
\frame { \begin{alertblock}{Can the moments determine a distribution?}
		Can two random variables with different distributions have the same moments of any order?
	\end{alertblock}
	\vspace{-2mm}
	\begin{block}{Example 2.3.10.}
		\vspace{-5mm}
		\beqrs
		X_1 \mbox{ has pdf } & f_1(x) = \frac{1}{\sqrt{2\pi}x} e^{-(\log x)^2/2} , & \quad x \geq 0 \\
		X_2 \mbox{ has pdf } & f_2(x) = f_1(x) [1+\sin (2\pi \log x )] , & \quad x \geq 0
		\eeqrs
		For any positive integer $n$, \vspace{-2mm}
		\beqrs
		E(X_1^n ) &=& \frac{1}{\sqrt{2\pi}} \int_0^\infty x^{n-1} e^{-(\log x)^2/2} dx \\
		& = &   \frac{1}{\sqrt{2\pi}} \int_{-\infty }^\infty e^{ny- y^2/2} dy \quad\quad \quad \quad y = \log x \\
		& = &   \frac{e^{n^2/2}}{\sqrt{2\pi}}\int_{-\infty }^\infty e^{- (y-n)^2/2} dy \\
		&= & e^{n^2/2}  \quad\quad \mbox{using the property of a normal distribution}
		\eeqrs
	\end{block}
}
\frame{
	\begin{block}{} \vspace{-5mm}
		\beqrs
		E(X_2^n) &=& \int_0^\infty x^n f_1(x) [1+\sin (2\pi \log x )] dx \\
		&=& E(X_1^n) + \frac{1}{\sqrt{2\pi}} \int_0^\infty x^{n-1} e^{-(\log x)^2/2} \sin (2\pi \log x )dx \\
		& = & E(X_1^n) + \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{ny} e^{-y^2/2} \sin (2\pi y )dy \\
		& = & E(X_1^n) + \frac{e^{n^2/2}}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-(y-n)^2/2} \sin (2\pi y )dy \\
		& = & E(X_1^n) + \frac{e^{n^2/2}}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-s^2/2} \sin (2\pi (s+n) )ds \\
		& = & E(X_1^n) + \frac{e^{n^2/2}}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-s^2/2} \sin (2\pi s )ds \\
		& = & E(X_1^n)
		\eeqrs
		since $e^{-s^2/2} \sin (2\pi s )$ is an odd function.
		
		This shows that $X_1$ and $X_2$ have the same moments of order $n=1,2,...$, but they have different distributions.
	\end{block}
}
\frame{\vspace{-2mm}
	\begin{alertblock}{}
		In some cases, moments determine the distributions.
		
		The mgf, if it exists, determines a distribution.
	\end{alertblock}
	\vspace{-2mm}
	\begin{block}{Theorem 2.3.11}
		Let $X$ and $Y$ be random variables with cdfs
		$F_X$ and $F_Y$, respectively.
		\begin{itemize}
			\item[a.]
			If $X$ and $Y$ are bounded, then $F_X(u)=F_Y(u)$ for all $u$ iff $E(X^r)=E(Y^r)$
			for all $r=1,2,...$
			\item[b.]
			If mgf's exist in a neighborhood of 0 and $M_X(t)=M_Y(t)$ for all $t$, then $F_X(u)=F_Y(u)$ for all $u$.
		\end{itemize}
	\end{block}\vspace{-2mm}
	\begin{block}{}
		%A rigorous proof of part (b) of this theorem is technical and beyond the scope of this course.
		
		The key idea of the proof can be explained as follows.
		\vspace{1mm}
		
		Note that \vspace{-1mm}
		\[ M_X(t) = \int_{-\infty}^\infty e^{tx}f_X(x)dx \vspace{-1mm} \]
		is the Laplace transformation of $f_X(x)$.
		\vspace{1mm}
		
		From the uniqueness of the Laplace transformation, there is a one-to-one correspondence between the mgf and the pdf.
		\vspace{1mm}
		
		We will give a proof of this result in Chapter 4 for the multivariate case, after we introduce the characteristic functions. 
	\end{block}
}
\frame{\vspace{-2mm}
	\begin{block}{}
		From the power series result in the last lecture, if the mgf of $X$ exists in a neighborhood of 0, then
		it has a power series expansion which is determined by moments $E(X^n)$, $n=1,2,...$.
		\vspace{1mm}
		
		Therefore, knowing the mgf and knowing moments of all order are the same, but this is under the condition that
		the mgf exists in a neighborhood of 0.
		\vspace{1mm}
		
		Once we establish part (b), the proof of part (a) is easy: if $X$ and $Y$ are bounded, then their mgf's exist for all $t$
		and thus their cdf's are the same iff their moments are the same for any order.
		\vspace{1mm}
		
		The condition that the mgf exists in a neighborhood of 0 is important.
		\vspace{1mm}
		
		There are random variables with finite moments of any order, but their mgf's do not exist.
	\end{block}\vspace{-2mm}
	\begin{alertblock}{Example}
		The pdf\vspace{-2mm}
		\[  f_X(x) = \frac{1}{\sqrt{2\pi}x} e^{-(\log x)^2/2} , \quad x \geq 0 \vspace{-2mm} \]
		is called the log-normal distribution or density, because if $X$ has pdf $f_X$, then $\log X$ has a normal pdf.
	\end{alertblock}
}
\frame{\vspace{-2mm}
	\begin{alertblock}{}
		In Example 2.3.10, we have shown that the log-normal distribution has finite moments of any order.
		
		For $t>0$, \vspace{-2mm}
		\[ M_X(t) = \int_0^\infty \frac{e^{tx}}{\sqrt{2\pi}x} e^{-(\log x)^2/2} dx = \infty \vspace{-2mm}\]
		because, when $t>0$,  \vspace{-2mm}
		\[ \lim_{x \rightarrow \infty } \frac{e^{tx}}{\sqrt{2\pi}x} e^{-(\log x)^2/2} = \infty \vspace{-2mm} \]
		When $t<0$, \vspace{-2mm}
		\[ M_X(t) = \int_0^\infty \frac{e^{tx}}{\sqrt{2\pi}x} e^{-(\log x)^2/2} dx
		\leq \int_0^\infty \frac{1}{\sqrt{2\pi}x} e^{-(\log x)^2/2} dx = 1 \vspace{-1mm}\]
		and, hence, $M_X(t)$ exists for all $t<0$.
		
		How do we find a distribution for which all moments exist and the mgf does not exists for any $t \neq 0$?
		
		Consider the pdf \vspace{-2mm}
		\[  f_Y(x) = \left\{ \begin{array}{ll}
		f_X(x)/2 & \quad x>0  \vspace{1mm} \\
		f_X(-x)/2 & \quad x < 0 \end{array} \right. \]
	\end{alertblock}
}
\frame{\vspace{-2mm}
	\begin{alertblock}{}
		For this pdf, \vspace{-2mm}
		\[ E(|Y|^n) =  \int_0^\infty x^n \frac{f_X(x)}{2}dx +  \int_{-\infty}^0 (-x)^n \frac{f_X(-x)}{2} dx =
		\int_0^\infty x^n f_X(x)dx = E(X^n) \vspace{-2mm}\]
		which has been derived for any $n=1,2,...$
		
		On the other hand, \vspace{-2mm}
		\beqrs
		E(e^{tY}) \back & = & \back \int_0^\infty e^{tx} \frac{f_X(x)}{2}dx +  \int_{-\infty}^0 e^{tx} \frac{f_X(-x)}{2} dx \\
		\back & = & \back  \int_0^\infty e^{tx} \frac{f_X(x)}{2}dx +  \int^{\infty}_0 e^{-tx} \frac{f_X(x)}{2} dx
		\eeqrs
		$~~$ \vspace{-6mm}
		
		and we have shown that one of these integrals is $\infty$ (depending on whether $t>0$ or $<0$).
	\end{alertblock}\vspace{-2mm}
	\begin{block}{Theorem.}
		If a random variable $X$ has finite moment $a_n = E(X^n)$ for any $n=1,2,...$, and the series \vspace{-3mm}
		\[ \sum_{n=0}^\infty \frac{| a_n| |t|^n}{n!} < \infty \quad \quad \mbox{with $|t| >0$} \vspace{-3mm} \]
		then the cdf of $X$ is determined by $a_n$, $n=1,2...$
	\end{block}}
	\frame{\vspace{-2mm}
		\begin{alertblock}{Example.}
			Suppose that $a_n = n!$ is the $n$th moment of a random variable $X$.
			\vspace{1mm}
			
			Since \vspace{-2mm}
			\[ \sum_{n=0}^\infty \frac{|a_n | |t|^n}{n!} = \sum_{n=0}^\infty |t|^n = \frac{1}{1-|t|} \quad \quad |t| < 1 \vspace{-2mm} \]
			and this function is the mgf of $Gamma (1,1)$ at $|t|$, we conclude that $X \sim Gamma (1,1)$.
			\vspace{1.5mm}
			
			Suppose that the $n$th moment of a random variable $Y$ is \vspace{-2mm}
			\[ a_n = \left\{ \begin{array}{ll}
			n! / (n/2)! & \quad \mbox{if $n$ is even} \\
			0 & \quad \mbox{if $n$ is odd} \end{array} \right. \vspace{-3mm} \]
			Then\vspace{-2mm}
			\[ \sum_{n=0}^\infty \frac{|a_n | |t|^n}{n!}
			= \sum_{\mbox{$n$ is even}} \frac{n! (t^2)^{n/2}}{n! (n/2)!}
			= \sum_{k=0}^\infty \frac{t^{2k}}{k!} = e^{t^2} \quad t \in {\cal R}\vspace{-3mm} \]
			Later, we show that this is the mgf of $N(0,\sqrt{2})$, hence $X \sim N(0,\sqrt{2})$.
			\vspace{1.5mm}
			
			For a log-normal distributed random variable $X$ discussed in the beginning of this lecture,
			$E(X^n) = e^{n^2/2}$ and $\sum_{n=0}^\infty e^{n^2/2}|t|^n/n! = \infty$ for any $|t|>0$ and, hence, the theorem is not applicable.
		\end{alertblock}
	}
	\frame{
		\begin{block}{}
			In applications we often need to approximate a cdf by a sequence of cdf's.
			\vspace{1mm}
			
			The next theorem gives a sufficient condition for the convergence of cdf's and moments of random variables in terms of the convergence of mgf's.
		\end{block}\vspace{-2mm}
		\begin{block}{Theorem 2.3.12}
			Suppose that $X_1,X_2,...$ is a sequence of random variables with mgf's $M_{X_n}(t)$, and \vspace{-2mm}
			\[ \lim_{n\rightarrow \infty} M_{X_n}(t) = M_X(t) < \infty \quad \mbox{for all $t$ in a neighborhood of 0} \vspace{-2mm}\]
			where  $M_X(t) $ is the mgf of a random variable $X$.
			
			Then, for all $x$ at which $F_X(x)$ is continuous, \vspace{-2mm}
			\[ \lim_{n\rightarrow \infty} F_{X_n}(x) = F_X(x). \vspace{-2mm}\]
			Furthermore, for any $p>0$, we have \vspace{-2mm}
			\[ \lim_{n\rightarrow \infty} E|X_n|^p = E|X|^p \quad \mbox{and} \quad \lim_{n\rightarrow \infty} E|X_n - X|^p =0 \]
			
		\end{block}}
		\frame{
			\begin{alertblock}{Example 2.3.13 (Poisson approximation)}
				The cdf of the binomial pmf, \vspace{-2mm}
				\[ f_X(x) = {n \choose x} p^x (1-p)^{n-x} , \quad x=0,1,...,n, \vspace{-2mm}\]
				where $n$ is a positive integer and $0<p<1$, may not be easy to calculate when $n$ is very large.
				
				It is often approximated by the cdf of the Poisson pmf, \vspace{-2mm}
				\[ f_Y(x) = \frac{e^{-\lambda}\lambda^x}{x!} , \quad x=0,1,2,... \vspace{-2mm}\]
				where $\lambda >0$ is a constant.
				
				For this purpose, we first compute the mgf's for the binomial and Poisson distributions.
			\end{alertblock}
			\vspace{-2mm}
			\begin{block}{Example 2.3.9 (binomial mgf)}
				Using the binomial formula \vspace{-2mm}
				\[ \sum_{x=0}^n {n \choose x} u^xv^{n-x} = (u+v)^n \]
			\end{block}
		}
		\frame{ \vspace{-2mm}
			\begin{block}{}
				we obtain \vspace{-2mm}
				\beqrs
				M_X(t)&=& E(e^{tX}) = \sum_{x=0}^n e^{tx} {n \choose x} p^x(1-p)^{n-x} \\
				&=&  \sum_{x=0}^n  {n \choose x} (pe^{t})^x(1-p)^{n-x}\\
				&=&  ( pe^t + 1-p)^n
				\eeqrs
				Note that \vspace{-2mm}
				\beqrs
				E(X) &=& \frac{d}{dt} M_X(t) \bigg|_{t=0} = n(pe^t+1-p)^{n-1} pe^t \bigg|_{t=0}= np \\
				E(X^2) &= & \frac{d^2}{dt^2} M_X(t) \bigg|_{t=0}\\
				&=& [ n(n-1)(pe^t+1-p)^{n-1} (pe^t)^2 + n(pe^t+1-p)^{n-1} pe^t ]\bigg|_{t=0}\\
				& =& n(n-1) p^2 +np
				\eeqrs
				We got the same results previously, but the calculation here is simpler.
			\end{block}
		}
		\frame{
			\begin{alertblock}{Example 2.3.13 (continued)}
				If $Y$ has the Poisson pmf, \vspace{-2mm} then
				\[ M_Y(t) = \sum_{x=0}^\infty e^{tx} \frac{e^{-\lambda} \lambda^x}{x!} =  e^{-\lambda} \sum_{x=0}^\infty  \frac{(e^t \lambda )^x}{x!}
				= e^{-\lambda} e^{e^t \lambda} = e^{\lambda (e^t-1)} \vspace{-2mm} \]
				which is finite for any $t \in {\cal R}$.
				
				Let $X_n$ have the binomial distribution with $n$ and $p$.
				
				Suppose that $\lim_{n \rightarrow \infty} np = \lambda > 0 $ (that means $p$ also depends on $n$ and $p \rightarrow 0$ when $n \rightarrow \infty$).
				
				Then, for any $t$,  as $n\rightarrow \infty$, \vspace{-2mm}
				\[ M_{X_n}(t)  =
				(pe^t +1-p)^n = \left[ 1+ \frac{(np)(e^t-1)}{n}\right]^n  \rightarrow e^{\lambda (e^t-1)} = M_Y(t) \vspace{-2mm} \]
				using the fact that, for any sequence of numbers $a_n$ converges to $a$, \vspace{-2mm}
				\[ \lim_{n\rightarrow \infty} \left(1+\frac{a_n}{n}\right)^n = e^a \vspace{-2mm} \]
				With this result and Theorem 2.3.12, we can approximate $P(X_n \leq u)$ by $P(Y \leq u)$
				when $n$ is large and $np$ is approximately a constant.
			\end{alertblock}
		}
\end{document}
