% $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 8]{Stat 609: Mathematical Statistics \\ Lecture 8}
\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\Phic{\mathnormal{\Phi}}
\begin{document}

%\frame{\titlepage}

\frame { \vspace{-3mm}
\frametitle{Lecture 8: Useful distributions}
\begin{alertblock}{Binomial distribution $binomial(n,p)$}
Let $n$ be a positive integer and $p \in [0,1]$.\\
The binomial pmf with size $n$ and probability $p$ is \vspace{-2mm}
\[ f(x) = \left\{ \begin{array}{ll}
{n \choose x}  p^x (1-p)^{n-x} & \quad x=0,1,...,n \vspace{1mm}\\
0 & \quad \mbox{otherwise}, \end{array} \right. \vspace{-4mm} \]
\begin{itemize}
\item
We have previously obtained that, if $X \sim f$, then \\
$E(X) = np$;\\
Var$(X)= np(1-p)$;\\
mgf  $M_X(t) = (pe^{t}+1-p)^n$,  chf $\phi_X(t) = (pe^{\dot{\imath} t}+1-p)^n$, 
$\ t\in {\cal R}$.
\item
In the special case of $n=1$, the binomial distribution is also called the Bernoulli distribution with probability $p$.
\item
If $X_1,...,X_n$ are $n$ Bernoulli random variables from $n$ independent Bernoulli trials with the same probability $p$, then
$ X = \sum_{i=1}^n X_i $
has the binomial distribution with size $n$ and parameter $p$.
\end{itemize}
\end{alertblock}
\vspace{-2mm}
}
\frame{\vspace{-2mm}
\begin{block}{Poisson distribution $Poisson(\lambda )$}
The Poisson distribution with parameter $\lambda >0$ has pmf \vspace{-2mm}
\[ f(x) = \left\{ \begin{array}{ll}
\frac{\lambda^x e^{-\lambda}}{x!} & \quad x=0,1,2,... \vspace{1mm} \\
0 & \quad \mbox{otherwise}, \end{array} \right.  \vspace{-2mm}\]
The mgf has been obtained previously, which is  $e^{\lambda (e^{t}-1)}$, $\ t \in {\cal R}$.

The chf  is then $e^{\lambda (e^{\dot{\imath} t}-1)}$, $\ t \in {\cal R}$.
\vspace{1mm}

If $X \sim f$, then\vspace{-3mm}
\[ E(X) = \frac{d}{dt} e^{\lambda (e^{t}-1)} \bigg|_{t=0} = \lambda e^{t} e^{\lambda (e^{t}-1)}\bigg|_{t=0} = \lambda \vspace{-2mm} \]
\[ E(X^2) = \lambda \frac{d}{dt} e^t e^{\lambda (e^{t}-1)}\bigg|_{t=0} =
\lambda \left[ e^t e^{\lambda (e^{t}-1)} + e^t \lambda e^t e^{\lambda (e^{t}-1)}\right] \bigg|_{t=0} = \lambda + \lambda^2 \vspace{-1mm} \]
Hence, \vspace{-1mm}
\[ {\rm Var}(X) = E(X^2)-[E(X)]^2 = \lambda + \lambda^2 - \lambda^2 = \lambda \]
\end{block}\vspace{-2mm}
\begin{alertblock}{Example 3.2.4 (Waiting time)}
As an example of a waiting-for-occurrence application, consider a telephone operator who, on the average, handles 5 calls per 3 minutes.
\end{alertblock}}
\frame{\vspace{-2mm} 
\begin{alertblock}{} \vspace{-1mm}
Let $X =$ number of calls in a minute.

If $X$ follows a Poisson distribution, what is $\lambda $?

Since $E(X) =$ average of calls in a minute, $\lambda = E(X) = 5/3$.

What is the probability that there will be no calls in the next minute? \vspace{-3mm}
\[ P(X=0) = \frac{e^{-5/3} (5/3)^0}{0!} = e^{-5/3} = 0.189  \vspace{-3mm} \]
What is the probability that there will be at least two calls? \vspace{-3mm}
\[ P(X \geq 2 ) = 1-P(X=0)-P(X=1) = 1-0.189 -
\frac{e^{-5/3} (5/3)^1}{1!} = 0.496  \]
\end{alertblock}
\vspace{-3mm}
\begin{block}{Hypergeometric distribution $hypergeometric(K,M,N)$}
Let $K$, $M$, and $N$ be positive integers with $M \leq N$.
The hypergeometric distribution has pmf \vspace{-3mm}
\[ f(x) = \left\{ \begin{array}{ll}
\frac{{M \choose x} {N-M \choose K-x} }{{N \choose K}}
 & \quad  x=0,1,...,\min\{K,M\}, \  M-N+K \leq x \\
0 & \quad \mbox{otherwise} \end{array} \right. \vspace{-3mm} \]
If we select $K$ balls  at random without replacement from
 a box filled with $M$ red balls and $N-M$ green balls, then\vspace{-3mm}
\[ f(x)= P(\mbox{exactly $x$ of the balls are red}) \]
\end{block}
}
\frame{\vspace{-2mm}
\begin{block}{}
Typically, $K< \min \{ M, N\}$ and then
\vspace{-2mm}
\[ f(x) = \left\{ \begin{array}{ll}
\frac{{M \choose x} {N-M \choose K-x} }{{N \choose K}}
 & \quad  x=0,1,...,K, \\
0 & \quad \mbox{otherwise} \end{array} \right. \]
Thus \vspace{-2mm}
\[ \sum_{x=0}^K \frac{{M \choose x} {N-M \choose K-x} }{{N \choose K}} = 1 \quad \quad \mbox{(not trivial to verify)} \]
If $X \sim f$, then \vspace{-2mm}
\beqrs
E(X) & = & \sum_{x=0}^K x \frac{{M \choose x}{N-M \choose K-x}}{{N \choose K}}
=  \sum_{x=1}^K  \frac{KM{M-1 \choose x-1}{N-M \choose K-x}}{N{N-1 \choose K-1}} \\
&=& \frac{MK}{N} \sum_{y=0}^{K-1}  \frac{{M-1 \choose y}{(N-1)-(M-1) \choose K-1-y}}{{N-1 \choose K-1}} =  \frac{MK}{N}
\eeqrs
A similar but more lengthy argument leads to \vspace{-2mm}
\[ {\rm Var}(X) = \frac{KM(N-M)(N-K)}{N^2(N-1)} \]
\end{block}}
\frame{\vspace{-2mm}
\begin{alertblock}{Negative binomial $negative$-$binomial(r,p)$}
Let $r$ be a positive integer and $p \in [0,1]$. \\
 The negative binomial pmf is \vspace{-2mm}
\[ f(x) = \left\{ \begin{array}{ll}
{x-1 \choose r-1} p^r(1-p)^{x-r} & \quad x=r,r+1,... \vspace{1mm} \\
0 & \quad \mbox{otherwise}, \end{array} \right. \vspace{-4mm} \]
\begin{itemize}
\item
In a sequence of independent Bernoulli trials with probability $p$, if $X$ is the number of trials needed to have the $r$th success (1 in the Bernoulli trial), then $X \sim f$.
\item
If $Y = X-r$ (the number of 0's before the $r$th 1), then \vspace{-2mm}
\[ P(Y=y ) = {r+y-1 \choose y} p^r(1-p)^y , \quad y=0,1,2,... \vspace{-2mm} \]
This is also called the negative binomial distribution.
\item
The special case of negative binomial distribution with $r=1$ is called the geometric distribution: \vspace{-3mm}
\[ f(x) = \left\{ \begin{array}{ll}
 p(1-p)^{x-1} & \quad x=1,2,... \vspace{1mm} \\
0 & \quad \mbox{otherwise}, \end{array} \right.  \]
\end{itemize}
\end{alertblock}
}
\frame{
\begin{alertblock}{}
The expectation of the negative binomial distribution (2nd definition) is \vspace{-2mm}
\beqrs
E(Y) = & = & \sum_{y=0}^\infty y {r+y-1 \choose y} p^r(1-p)^y =
 \sum_{y=1}^\infty \frac{(r+y-1)!}{(y-1)!(r-1)!} p^r(1-p)^y \\
 &= & \sum_{y=1}^\infty r {r+y-1 \choose y-1}  p^r(1-p)^y  =
 \sum_{z=0}^\infty r {r+z \choose z}  p^r(1-p)^{z+1} \\
 & = & \frac{r(1-p)}{p}
 \sum_{z=0}^\infty  {(r+1)+(z-1) \choose z}  p^{r+1}(1-p)^{z} \\
   & = & \frac{r(1-p)}{p}
   \eeqrs
The expectation of the negative binomial distribution (1st definition) is \vspace{-2mm}
\[ E(X) = E(Y)+r = \frac{r(1-p)}{p} + r = \frac{r}{p} \vspace{-1mm} \]
A similar calculation shows \vspace{-2mm}
\[ {\rm Var}(Y) = {\rm Var}(X) = \frac{r(1-p)}{p^2} \]
\end{alertblock}
}
\frame{
\begin{block}{Uniform distribution $uniform(a,b)$}
The uniform distribution on the interval $[a,b] $, where $a$ and $ b$ are real numbers with $a < b$, has pdf \vspace{-2mm}
\[ f(x) = \left\{ \begin{array}{ll}
\frac{1}{b-a} & \quad a\leq x \leq b \vspace{2mm}\\
0 & \quad \mbox{otherwise} \end{array} \right. \vspace{-2mm}  \]
If $X \sim f$, then \vspace{-2mm}
\[ E(X) = \frac{1}{b-a} \int_a^b x dx = \frac{x^2}{2(b-a)} \bigg|_a^b = \frac{b^2-a^2}{2(b-a)} = \frac{a+b}{2} \vspace{-1mm}\]
\[ E(X^2) = \frac{1}{b-a} \int_a^b x^2 dx = \frac{x^3}{3(b-a)} \bigg|_a^b = \frac{b^3-a^3}{2(b-a)} =\frac{b^2+a^2+ab}{3}  \vspace{-1mm}\]
\[ {\rm Var}(X) = E(X^2)- [E(X)]^2 = \frac{b^2+a^2+ab}{3} - \frac{(a+b)^2 }{4} = \frac{(b-a)^2}{12} \vspace{-1mm} \]
\[ M_X(t) = \frac{1}{b-a} \int_a^b e^{tx}dx = \frac{e^{tb} - e^{ta}}{t(b-a)}, \quad t \in {\cal R} \]
\end{block}
}
\frame{\vspace{-2mm}
\begin{alertblock}{Normal distribution $N(\mu,\sigma^2)$}
The normal distribution plays a central role in statistics.
\begin{itemize}
\item
The normal distributions and distributions associated with it are very tractable analytically.
\item
The normal distribution has the familiar bell shape, whose symmetry makes it an appealing choice for many population models.
\item
Under the Central Limit Theorem (Chapter 5), the normal distribution can be used to approximate a large variety of distributions in large samples.
\end{itemize}
Let $\mu \in {\cal R}$ and $\sigma >0$ be two constants.

The normal distribution $N(\mu, \sigma^2)$ has pdf \vspace{-2mm}
\[ f(x) = \frac{1}{\sqrt{2\pi} \sigma} e^{-(x-\mu)^2/(2\sigma^2)}, \quad x \in {\cal R} \vspace{-2mm} \]
When $\mu = 0 $ and $\sigma =1$, $N(0,1)$ is called the standard normal distribution.

The following is a figure of $N(0,1)$ pdf curve.
\end{alertblock}}
\frame{
\begin{alertblock}{Standard normal pdf curve}
	\vspace{-8.5cm}
\begin{figure}[h]
\begin{center}
%\caption{Graph of $y=\sin^2(x)$ in Example 2.1.2.}
\includegraphics[height=7in, width=4.5in]{figure331.pdf}
\end{center}
\end{figure}
\end{alertblock}\vspace{-5cm}
\begin{alertblock}{}
We first need to show that $f$ is indeed a pdf.
\vspace{1mm}

By the transformation $z = (x-\mu)/\sigma$, \vspace{-2mm}
\[ \frac{1}{\sqrt{2\pi } \sigma} \int_{-\infty}^\infty e^{-(x-\mu)^2/(2\sigma^2)} dx = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty
e^{-z^2/2} dz = \frac{2}{\sqrt{2 \pi}} \int_0^\infty e^{-z^2/2} dz \vspace{-2mm}\]
because $e^{-z^2/2}$ is symmetric.
\end{alertblock}}
\frame{\vspace{-2mm}
\begin{alertblock}{}
Note that \vspace{-2mm}
\beqrs
\left( \int_0^\infty e^{-z^2/2} dz\right)^2 & = & \left( \int_0^\infty e^{-z^2/2} dz\right)\left( \int_0^\infty e^{-u^2/2} du\right) \\
& = & \int_0^\infty \int_0^\infty e^{-(z^2+u^2)/2} du dz \\
& = &  \int_0^\infty \int_0^{\pi/2} r e^{-r^2/2} d\theta dr  \quad\quad z=r\cos \theta , \ u=r \sin \theta \\
& = &  \frac{\pi}{2} \int_0^\infty  r e^{-r^2/2} dr
= \frac{\pi}{2}  e^{-r^2/2} \bigg|^0_\infty =  \frac{\pi}{2}
\eeqrs
$~~$ \vspace{-7mm}

Thus, \vspace{-2mm}
\[ \frac{1}{\sqrt{2\pi } \sigma} \int_{-\infty}^\infty e^{-(x-\mu)^2/(2\sigma^2)} dx  = \frac{2}{\sqrt{2 \pi}} \int_0^\infty e^{-z^2/2} dz
=  \frac{2}{\sqrt{2 \pi}} \sqrt{\frac{\pi}{2}} = 1 \vspace{-2mm}  \]
A consequence of this result is  \vspace{-2mm}
\[ \sqrt{\frac{\pi}{2}}  =  \int_0^\infty e^{-z^2/2} dz =  \frac{1}{\sqrt{2}} \int_0^\infty w^{-1/2} e^{-w} dw =
\frac{1}{\sqrt{2}}  \Gamma (1/2) \quad (w=z^2/2)  \vspace{-2mm} \]
Hence \vspace{-1mm}
\[\Gamma (1/2) = \sqrt{\pi} \]
\end{alertblock}
}
\frame{\vspace{-2mm}
\begin{block}{Properties of normal distributions}
\begin{itemize}
\item
$X \sim N(\mu,\sigma^2)$ iff $Z = (X-\mu )/\sigma \sim N(0,1)$ (by transformation).
\item
If $Z \sim N(0,1)$, then for any $t \in {\cal R}$, its mgf is \vspace{-3mm}
\[ M_{Z}(t)  = \frac{1}{\sqrt{2\pi }} \int_{-\infty}^\infty e^{tz}e^{-z^2/2} dz = \frac{e^{t^2/2}}{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-(z-t)^2/2} dz  = e^{t^2/2} \vspace{-2mm}\]
\item
If $X  \sim N(\mu,\sigma^2)$, then   $Z= (X-\mu)/\sigma \sim N(0,1)$ and the mgf of $X$ is \vspace{-2mm}
\[ M_{X}(t) = M_{\sigma Z+\mu}(t) = e^{\mu t} M_{Z}(\sigma t) = e^{\mu t + \sigma^2t^2/2} , \quad t \in {\cal R}\vspace{-2mm} \]
\item
If $X  \sim N(\mu,\sigma^2)$, then its chf is $\phi_{X}(t) =  e^{\dot{\imath} \mu t  - \sigma^2t^2/2} $, $t \in {\cal R}$. 
\item
If $X  \sim N(0,\sigma^2)$, by differentiating $M_X(t) = e^{\sigma^2 t^2/2}$, we obtain that \vspace{-2mm}
\[E(X^r) = \left\{ \begin{array}{ll}
(r-1)(r-3)\cdots 3\cdot 1 \sigma^{r} & \quad \mbox{when $r$ is an even integer} \\
0 & \quad \mbox{when $r$ is an odd integer} \end{array} \right. \vspace{-2mm} \]
\item
If $Z \sim N(0,1)$, then $ E(Z) = 0 $ and $ {\rm Var}(Z) = E(Z^2) = 1 $.
\item
If $X  \sim N(\mu,\sigma^2)$, then $ E(X) = \mu  $ and $ {\rm Var}(X) = \sigma^2$.
\item
If $X  \sim N(\mu,\sigma^2)$, the distribution of $Y= e^X$ is called the log-normal distribution with
$E(Y)=  e^{\mu + \sigma^2/2} $ and ${\rm  Var}(Y) = e^{2(\mu +\sigma^2)}$ $
  - e^{2\mu + \sigma^2} $.
\end{itemize}
\end{block}
}
\frame{
\begin{block}{}
\begin{itemize}
\item
The cdf of the standard normal is called the standard normal cdf and denoted by \vspace{-2mm}
\[ \Phic ( x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty }^x e^{-t^2/2} dt , \quad x \in {\cal R} \vspace{-2mm} \]
But this cdf does not have a close form.
\item
If $X  \sim N(\mu,\sigma^2)$, then its cdf is \vspace{-2mm}
\[ F_X(x) = P\left( \frac{X- \mu}{\sigma} \leq \frac{x-\mu}{\sigma}\right)
= P\left( Z \leq \frac{x-\mu}{\sigma}\right) = \Phic \left(\frac{x-\mu}{\sigma}\right)\vspace{-2mm} \]
We can then use the standard normal cdf to calculate probabilities related to all normal random variables.
\item
The pdf of $N(\mu,\sigma^2)$ is a bell shaped curve that is symmetric about $\mu$, maximized at $\mu$,  and changes from concave to convex
at $\mu \pm \sigma$.
\item
When $X \sim N(\mu, \sigma^2)$,  \vspace{-3mm}
\beqrs
 P(|X-\mu | \leq \sigma ) &=& \Phic (1)-\Phic (-1) =0.6826 \\
 P(|X-\mu | \leq 2 \sigma ) &=& \Phic (2) - \Phic (-2) = 0.9544 \\
 P(|X-\mu | \leq \sigma )& = & \Phic (3)-\Phic (-3) = 0.9974
 \eeqrs
\end{itemize}
\end{block}}
\frame { \vspace{-2mm}
	\begin{alertblock}{Gamma distribution $gamma ( \alpha, \beta )$}
		Let $\alpha >0$ and $\beta >0$ be two constants.
		\vspace{1mm}
		
		The gamma distribution with shape parameter $\alpha$ and scale parameter $\beta$ has pdf\vspace{-2mm}
		\[ f(x) = \left\{ \begin{array}{ll}
		\frac{1}{\Gamma (\alpha )\beta^\alpha} x^{\alpha -1} e^{-x/\beta } & \quad x>0 \vspace{2mm} \\
		0 & \quad x \leq 0 \end{array} \right. \vspace{-2mm} \]
		where \vspace{-1mm}
		\[ \Gamma (\alpha ) = \int_0^\infty x^{\alpha -1} e^{-x} dx \vspace{-1mm}\]
		is called the gamma function, \vspace{-2mm}
		\[ \Gamma (1/2) = \sqrt{\pi} , \quad \Gamma (\alpha +1) = \alpha \Gamma (\alpha ), \quad
		\Gamma (n)= (n-1)! , \ n=1,2,...  \vspace{-2mm} \]
		If $\alpha < 1$, then the pdf of $gamma (\alpha , \beta )$ is decreasing in $x$ and unbounded at $x=0$.
		\vspace{1mm}
		
		If $\alpha \geq 1$, then the pdf of $gamma (\alpha , \beta )$ is bounded, increasing in $x < (\alpha -1) \beta $,
		and decreasing in $x>(\alpha -1) \beta $.
		\vspace{1mm}
		
		Previously, we showed that, if $X \sim gamma(\alpha , \beta )$, then\vspace{-2mm}
			\[ M_X(t) = (1-\beta t)^{-\alpha} , \quad t < 1/ \beta  \]
	\end{alertblock}
}
\frame{\vspace{-2mm}
	\begin{alertblock}{} \vspace{-2mm}
			\[ E(X^n) = \alpha (\alpha+1)\cdots (\alpha +n-1) \beta^n , \quad n=1,2,...  \]
	In particular, \vspace{-2mm}
		\[ E(X) = \alpha \beta , \quad E(X^2) = \alpha (\alpha+1)\beta^2 , \quad {\rm Var}(X) = \alpha \beta^2 \vspace{-2mm} \]
		From the mfg, the chf is \vspace{-3mm}
		\[ \phi_X(t) = (1- \dot{\imath} \beta t)^{-\alpha} , \quad t \in {\cal R}  \]
	\end{alertblock}\vspace{-2mm}
	\begin{alertblock}{Some gamma pdf curves}\vspace{-7.5cm}
		\begin{figure}[h]
			\begin{center}
				%\caption{Graph of $y=\sin^2(x)$ in Example 2.1.2.}
				\includegraphics[height=6in, width=5in]{figure332.pdf}
			\end{center}
		\end{figure}
	\end{alertblock}
}
\frame{\vspace{-2mm}
	\begin{block}{Chi-square distribution}
		The gamma distribution $gamma (\alpha , \beta )$ with $\beta =2$ and $\alpha = k/2$ for a positive integer $k$ is called the chi-square distribution with $k$ degrees of freedom, and its pdf is \vspace{-2mm}
		\[ f(x) = \left\{ \begin{array}{ll}
		\frac{1}{\Gamma (k/2) 2^{k/2}} x^{(k/2)-1} e^{-x/2 } & \quad x \geq 0 \vspace{2mm} \\
		0 & \quad x < 0 \end{array} \right. \vspace{-4mm} \]
		\begin{itemize}
			\item
			If $X \sim f$, then \vspace{-1mm}
			\[ E(X) = k , \quad {\rm Var}(X) = 2k , \vspace{-1mm} \]
			and the mgf $M_X(t)$ and chf $\phi_X(t)$ are given by  \vspace{-2mm}
			\[ M_X(t) = (1-2 t )^{-k/2}, \ \ t <1/2 , \quad \phi_X(t) = (1-2 \dot{\imath}t)^{-k/2} , \ \ t \in {\cal R} \vspace{-2mm}  \]
			\item
			The chi-square distribution is closely related to the normal distribution.
			\item
			In Example 2.1.9, we showed that if $X \sim N(0,1)$, then $X^2 \sim $ chi-square with 1 degree of freedom.
			\item
			A similar result about the chi-square distribution with $k$ degrees of freedom will be introduced later.
		\end{itemize}
	\end{block}
}
\frame{
	\begin{alertblock}{Exponential distribution $exponential(\beta )$}
		A special case of the gamma distribution with $\alpha =1$ is called the exponential distribution,
		i.e., $gamma (1,\beta ) = exponential (\beta )$.
		\vspace{1mm}
		
		The $exponential (\beta )$ distribution has pdf \vspace{-2mm}
		\[ f(x) = \left\{ \begin{array}{ll}
		\frac{1}{\beta} e^{-x/\beta } & \quad x \geq 0 \vspace{2mm} \\
		0 & \quad x < 0 \end{array} \right. \vspace{-2mm} \]
		For any $x>0$,  \vspace{-2mm}
		\[ P(X \le x ) = \frac{1}{\beta} \int_0^x e^{-t/\beta } dt = e^{-t/\beta} \bigg|_x^0
		= 1- e^{-x/\beta} \vspace{-2mm} \]
		Hence, the cdf of $exponential (\beta )$ has an explicit form\vspace{-2mm}
		\[ F(x) = \left\{ \begin{array}{ll}
		1-e^{-x/\beta } & \quad x \geq 0 \vspace{1mm} \\
		0 & \quad x < 0 \end{array} \right. \vspace{-2mm} \]
		
		An example of $X \sim exponential (\beta )$ is the lifetime.
	\end{alertblock}
}
\frame{
	\begin{alertblock}{}
		Since $exponential (\beta ) = gamma (1,\beta)$, if $X \sim exponential(\beta )$, \vspace{-2mm}
		\[ E(X) = \beta , \quad {\rm Var}(X) = \beta^2 , \quad M_X(t) = \frac{1}{1-\beta t} , \  \ t< \frac{1}{\beta} , \vspace{-2mm} \]
		\[  \phi_X(t) = \frac{1}{1- \dot{\imath} \beta t} , \ \  \  t \in {\cal R} \vspace{-2mm} \]
		The exponential distribution has a memoryless property, i.e., \vspace{-2mm}
		\[ P(X>s|X>t) = P(X > s-t ) \vspace{-2mm} \]
		for any $s>t \geq 0$, because \vspace{-2mm}
		\beqrs
		P(X>s|X>t)  \!\!\!\! &=& \!\!\!\! \frac{P(X>s, X>t )}{P(X >t)} = \frac{P(X >s)}{P(X>t)} \\
		\!\!\!\! &=& \!\!\!\!
		\frac{1-F(s)}{1-F(t)} =  \frac{e^{-s/\beta } }{ e^{-t/\beta} } = e^{-(s-t)/\beta } \\
		\!\!\!\! &=& \!\!\!\! 1-F(s-t) = P(X > s-t)
		\eeqrs
		$~$ \vspace{-6mm}
		
		That means, if $X$ is the lifetime of a product, then the lifetime of a product that has been used $t$ hours
		has the same distribution as that of a new product (new = used).
	\end{alertblock}
}
\frame{\vspace{-2mm}
	\begin{block}{Cauchy distribution $Cauchy(\mu, \sigma )$}
		For constants  $\mu \in {\cal R}$ and $\sigma >0$, the $Cauchy(\mu , \sigma )$ distribution has pdf \vspace{-3mm}
		\[ f(x) = \frac{\sigma }{\pi [ \sigma^2+ (x-\mu)^2 ] } , \quad x \in {\cal R} \vspace{-3mm} \]
		The Cauchy pdf is bell-shaped and symmetric about $\mu$.
		\vspace{1mm}
		
		Its biggest difference from the normal pdf is that, if $X \sim $ $ Cauchy(\mu, \sigma )$, then $E|X| = \infty$
		(and hence $E|X|^n = \infty$, $n= 2,3,...$)
		\vspace{1mm}
		
		The mgf of $X$ is $\infty$ except at 0 and the chf of $X$ is $e^{\dot{\imath}\mu + \sigma |t|}$, $t \in {\cal R}$.
		\vspace{1mm}
		
		$\mu$ still measures the center of
		$Cauchy(\mu, \sigma )$ although the expectation does not exist: $\mu$ is the median in the sense that
		$ P(X < \mu ) = \frac{1}{2}$.
	\end{block}\vspace{-3mm}
	\begin{block}{Standard normal and Cauchy pdf curves}
		\vspace{-6.3cm}
		\begin{figure}[h]
			\begin{center}
				%\caption{Graph of $y=\sin^2(x)$ in Example 2.1.2.}
				\includegraphics[height=5in, width=4.5in]{figure334.pdf}
			\end{center}
		\end{figure}
	\end{block}
}

\end{document}
