% $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}}
\def\br{\begin{array}}
\def\er{\end{array}}

%%%%%%%%%%%%%%% 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 18]{Stat 609: Mathematical Statistics \\ Lecture 18}
\author[UW-Madison]{Jun Shao}
\institute[Statistics]{%
%  Department of Statistics\\
%  University of Wisconsin\\
%  Madison, WI 53706, USA\\
%~~~\\
  }
\date[2014]{}

\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{-2mm}
\frametitle{Lecture 18: Sum of random variables}
\begin{alertblock}{}
In applications, we frequently  consider a sum of random variables
or, in many cases, a sum of independent random variables.
\end{alertblock}
\vspace{-2mm}
\begin{block}{The pdf of the sum of two random variables (convolution)}
Let $X$ and $Y$ be random variables having joint pdf $f(x,y)$.

For any $t \in {\cal R}$, \vspace{-3mm}
\[ P(X+Y \leq t ) = \int\int_{x+y \leq t} f(x,y) dx dy
= \int_{-\infty}^\infty \left[ \int_{-\infty}^{t-x} f(x,y)dy \right] dx \vspace{-2mm} \]
Hence, the pdf of the sum $X+Y$ is \vspace{-2mm}
\[ f_{X+Y}(t) = \frac{d}{dt} P(X+Y \leq t ) =
 \! \int_{-\infty}^\infty \frac{d}{dt} \left[ \int_{-\infty}^{t-x} f(x,y)dy \right] dx
= \! \int_{-\infty}^\infty  f(x,t-x) dx \vspace{-2mm}
\]
Similarly, \vspace{-1mm}
\[ f_{X+Y}(t) = \int_{-\infty}^\infty  f(t-y,y)  dy \]
The pdf $f_{X+Y}$ is called a convolution.

The interchange of differentiation and integration can be justified.
\end{block}
}
\frame{\vspace{-2mm}
\begin{block}{}
If $X$ and $Y$ are independent and $f_X$ and $f_Y$ are their marginal pdf's, then \vspace{-2mm}
\[ f_{X+Y}(t) = \int_{-\infty}^\infty  f_X(x)f_Y(t-x) dx =\int_{-\infty}^\infty  f_X(t-y)f_Y(y)  dy  \]
\end{block}\vspace{-2mm}
\begin{alertblock}{Example}
If $X \sim uniform(0,1)$ and $Y \sim exponential (0,1)$ are independent, what is the pdf of $X+Y$?
\vspace{-3mm}
\beqrs
 f_{X+Y}(t) &=& \int_{-\infty}^\infty f_X(x)f_Y(t-x)dx
= \int_{0<x<1, x<t } e^{-(t-x)} dx \vspace{2mm} \\
&=& \left\{ \br{ll}
\int_0^1 e^{-(t-x)} dx = (e-1)e^{-t} & \quad t> 1 \vspace{2mm} \\
\int_0^t  e^{-(t-x)} dx = 1- e^{-t} & \quad 0< t \leq 1 \vspace{2mm} \\
0 & \quad t \leq 0 \er \right.
\eeqrs
When $f_X$ or $f_Y$ is 0 in some regions, we need to be careful about the integration limits.

Sometimes, one of the two formulas is easier to work with. \vspace{-3mm}
\[f_{X+Y}(t)  =  \int_{-\infty}^\infty f_X(t-y)f_Y(y)dy
= \int_{0<t-y<1, y>0 } e^{-y} dy = ?  \]
\end{alertblock}
}
\frame{
\begin{block}{Example}
Suppose that $(X,Y)$ has the following bivariate normal pdf: \vspace{-2mm}
\[ f(x,y)=  \frac{\exp \left( - \frac{x^2}{2 (1-\rho^2)}
+ \frac{\rho xy}{(1-\rho^2)}
- \frac{y^2}{2 (1-\rho^2)} \right)}{2\pi \sqrt{1-\rho^2}} \quad \quad (x,y) \in {\cal R}^2 \vspace{-2mm}\]
What is the pdf of $X+Y$? \vspace{-2mm}
\beqrs
f_{X+Y} (t) \!\!\!\!\! & = & \!\!\!\!\! \frac{1}{2\pi \sqrt{1-\rho^2}} \int_{-\infty}^\infty
\exp \left( - \frac{x^2}{2 (1-\rho^2)} + \frac{\rho x(t-x)}{(1-\rho^2)}
- \frac{(t-x)^2}{2 (1-\rho^2)} \right) \!\! dx \\
\!\!\!\!\! & = & \!\!\!\!\! \frac{1}{2\pi \sqrt{1-\rho^2}} \int_{-\infty}^\infty
\exp \left( - \frac{x^2 + 2\rho x^2 +x^2 -2 \rho tx -2tx +t^2}{2 (1-\rho^2)} \right) \!\! dx \\
\!\!\!\!\! & = & \!\!\!\!\! \frac{1}{2\pi \sqrt{1-\rho^2}} \int_{-\infty}^\infty
\exp \left( - \frac{(x-t/2)^2}{1-\rho} - \frac{t^2}{4 (1+\rho)} \right) \! dx \\
\!\!\!\!\! & = & \!\!\!\!\! \frac{1}{2 \sqrt{\pi (1+ \rho)}} \exp \left(  - \frac{t^2}{4 (1+\rho)} \right)
\eeqrs
which is $N(0, 2(1+\rho ))$.
\end{block}
}
\frame{
\begin{alertblock}{The pmf of the sum of two discrete random variables}
We now turn to discrete random variables $X$ and $Y$ with joint pmf $f(x,y)$.

By definition, the pmf  of $X+Y$ is \vspace{-2mm}
\[ f_{X+Y}(t) = P(X+Y = t) = \sum_{x+y \leq t }  f(x,y) = \sum_x f(x, t-x ) = \sum_y f(t-y, y ) \vspace{-2mm} \]
and if $X$ and $Y$ are independent with marginal pmf's $f_X$ and $f_Y$, then
 \vspace{-2mm}
\[ f_{X+Y}(t)  =  \sum_x f_X(x)f_Y( t-x ) = \sum_y f_X(t-y)f_Y(y ) \vspace{-2mm} \]
However, in some cases it is more convenient to work out the probability $P(X+Y = t) $ directly.
\end{alertblock}
\vspace{-2mm}
\begin{block}{Example 4.3.1.}
Let $X \sim Poisson(\theta )$ and $Y \sim Poisson(\lambda )$ be independent Poisson random variables
so that the joint pmf  of $(X,Y)$ is \vspace{-2mm}
\[ f(x,y) = \frac{\theta^xe^{-\theta}}{x!} \frac{\lambda^ye^{-\lambda}}{y!},
\quad x=0,1,2,..., y =0,1,2,...  \]
\end{block}}
\frame{
\begin{block}{}
What is the pmf of $U = X+Y$?

Using the formula, for $u=0,1,2,...$ \vspace{-2mm}
\beqrs
 f_U(u)&=& \sum_y f(u-y, y ) =
 \sum_{y=0}^u \frac{\theta^{u-y}e^{-\theta}}{(u-y)!} \frac{\lambda^y e^{-\lambda}}{y!}\\
&=& \frac{e^{-(\theta+\lambda)}}{u!}
\sum_{y=0}^u {u \choose y} \lambda^y \theta^{u-y} = \frac{e^{-(\theta+\lambda)}(\theta + \lambda )^u}{u!}
\eeqrs
This is the pmf of $Poisson( \theta + \lambda )$.

What is the joint pmf of  $U=X+Y$ and $Y$.
\beqrs
f_{U,Y}(u,y) & = &  P(U=u, Y=y) = P(X+Y=u,Y=y) \\
&=& P(X=u-y,Y=v)  =   \frac{\theta^{u-y}e^{-\theta}}{(u-y)!} \frac{\lambda^y e^{-\lambda}}{y!}
\eeqrs
for $u=y,y+1,y+2,...,$ and $y=0,1,2,...$

$U$ and $Y$ are not independent, because \vspace{-2mm}
\[ P(U=0,Y=1) = 0 \neq P(U=0)P(Y=1) = e^{-(\theta+\lambda )}
\lambda e^{-\lambda } \]
\end{block}
}
\frame{\vspace{-2mm} 
\begin{alertblock}{}
To deal with a sum of independent random variables, it is convenient to use mgf's.
\end{alertblock}\vspace{-2mm}
\begin{block}{Theorem 4.2.12.}
If $X_1,...,X_n$ are independent random variables with mgf's $M_{X_1}(t)$,...,$M_{X_n}(t)$, then the mgf
of the sum $T = X_1+\cdots + X_n$ is \vspace{-2.5mm}
\[ M_T(t) = M_{X_1}(t) \cdots M_{X_n}(t)\vspace{-2.5mm} \]
and $M_T(t)< \infty $  iff  $M_{X_i}(t) < \infty$, $i=1,...,n$. 
\end{block}\vspace{-2mm}
\begin{block}{Proof.}
By definition, \vspace{-3mm} 
\beqrs
M_T(t) \back & = & \back E(e^{tT}) = E( e^{t(X_1+\cdots + X_n)}) = E (e^{tX_1} \cdots e^{tX_n}) \\
\back & = & \back  
E (e^{tX_1}) \cdots E(e^{tX_n}) 
 =  M_{X_1}(t) \cdots M_{X_n}(t)
\eeqrs
$~~$ \vspace{-8mm} 

where the 4th equality follows from the independence of $X_1,...,X_n$ and Theorem 4.6.12. 
\end{block}\vspace{-2mm}
\begin{alertblock}{}<2->
This result and the uniqueness theorem (Theorem 2.3.11) lead to many useful results concerning the sum of independent random variables.
\end{alertblock}}
\frame{
\begin{block}{Theorem 4.2.14.}
If $X \sim N(\mu , \sigma^2)$ and $Y \sim N(\gamma , \tau^2) $ are independent, then
$T =X+Y \sim N(\mu+\gamma , \sigma^2 + \tau^2)$.
\end{block}\vspace{-2mm}
\begin{alertblock}{}
This is easy to show, because the mfg's of $X$ and $Y$ are $M_X(t) = e^{\mu t+ \sigma^2t^2/2}$ and
$M_Y(t) = e^{\gamma t +\tau^2t^2/2}$, and thus the mgf of $T$ is
\vspace{-2mm}
\[ M_X(t) M_Y(t)= e^{\mu t+ \sigma^2t^2/2} e^{\gamma t +\tau^2t^2/2}
= e^{(\mu+\gamma )t + (\sigma^2 + \tau^2)t^2/2} \vspace{-2mm}\]
which is the mgf of $ N(\mu+\gamma , \sigma^2 + \tau^2)$.

By the uniqueness theorem, we must have
$T \sim N(\mu+\gamma , \sigma^2 + \tau^2)$.
\vspace{1mm}

Note that this result does not apply to the bivariate normal distribution example with $\rho \neq 0$, since in that example $X$ and $Y$ are not independent.

\end{alertblock}\vspace{-2mm}
\begin{block}{}
The previous result can be generalized to more than two independent random variables having normal distributions:
If $X_1,...,X_k$ are independent random variables, $X_i \sim N(\mu_i , \sigma_i^2)$, $i=1,...,k$, then
the sum $X_1+\cdots + X_k $ $\sim N(\mu_1+\cdots + \mu_k , \sigma_1^2+\cdots + \sigma_k^2)$.
\end{block}}
\frame{
\begin{block}{}
This type of results is called additivity of distributions; i.e., if $X$ and $Y$ have distributions in a class of distributions and
$X+Y$ has a distribution also in that class, then the distributions in this class are called additive
distributions.
\end{block}\vspace{-2mm}
\begin{alertblock}{Additivity of the chi-square distributions}
In Chapter 2 we showed that if $Z \sim N(0,1)$, then $Z^2 \sim $ the chi-square distribution with degree of freedom 1.

A more general result is as follows.

If $X_i \sim N(\mu_i , \sigma_i^2)$, $i=1,...,k$, are independent, then the distribution of
\vspace{-3mm}
\[ Y = \left(\frac{X_1-\mu_1}{\sigma_1} \right)^2 + \cdots + \left(\frac{X_k-\mu_k}{\sigma_k}\right)^2 \vspace{-3mm} \]
is the chi-square distribution with degrees of freedom $k$.

First, $Z_i \sim N(0,1)$, $i=1,...,k$, and $Z_i$'s are independent.

Second, each $Z_i^2 \sim$ chi-square with degree of freedom 1.

Third, the chi-square distribution with degrees of freedom $r$ is the $gamma(r/2, 2)$ distribution.

Finally, the result follows from the next result.
\end{alertblock}
}
\frame{\vspace{-2mm}
\begin{block}{Additivity of the gamma distributions}
If $X_i \sim gamma (\alpha_i , \beta )$, $i=1,...,k$, are independent, then
the sum $T = X_1+ \cdots + X_k \sim gamma( \alpha_1+\cdots + \alpha_k , \beta )$.

This is because the mgf of $X_i$ is $(1-\beta t)^{-\alpha_i}$ when $ t < \beta^{-1}$.

By Theorem 4.2.12, the mgf of $T$ is \vspace{-2.5mm}
\[ (1-\beta t)^{-\alpha_1} \cdots (1-\beta t)^{-\alpha_k } = (1-\beta t)^{-(\alpha_1+\cdots + \alpha_k) } \quad \quad t< \beta^{-1}\vspace{-2.5mm} \]
which is the mgf of $gamma( \alpha_1+\cdots + \alpha_k , \beta )$.
\end{block}
\vspace{-3mm}
\begin{alertblock}{A non-additive class of distributions}<2->
The class of all uniform distributions is not additive.

If $X \sim uniform(0,1)$ and $Y \sim uniform(0,1)$ are independent and $f(x)$ is the indicator function of the interval $(0,1)$, then
the pdf of $X+Y$ is \vspace{-3mm}
\[ f_{X+Y}(t) = \int_{-\infty}^\infty f(t-y)f(y) dy = \int_{0 < t-y<1 , 0<y<1} dy \vspace{-3mm} \]
\[ = \left\{ \br{ll}
\int_{t-1}^1 dy = 2-t & \quad 1 < t < 2 \vspace{1mm} \\
\int_0^t dy = t & \quad 0<t<1 \vspace{1mm} \\
0 & \quad \mbox{otherwise} \er \right. \vspace{-2mm} \]
which is not a uniform pdf.
\end{alertblock}
}
\frame{\vspace{-2mm}
\begin{block}{}
The next result is useful if the mgf is not finite in a neighborhood of 0. 
\end{block}\vspace{-2mm}
\begin{alertblock}{Theorem 4.2.12A.} 
If $X_1,...,X_n$ are independent random variables with chf's $\phi_{X_1}(t)$,...,$\phi_{X_n}(t)$, then the chf
of the sum $T = X_1+\cdots + X_n$ is \vspace{-2.5mm}
\[\phi_T(t) = \phi_{X_1}(t) \cdots \phi_{X_n}(t)\quad \quad t \in {\cal R} \]
\end{alertblock}\vspace{-2mm}
\begin{block}{Additivity of the Cauchy distribution}<2->
If $U $ and $V$ are independent random variables having the $ Cauchy(0,1)$ distribution,
what is the distribution of $U+V$?
\vspace{1mm}

Since the mgf of a Cauchy distribution is not finite except at 0, we apply Theorem 4.2.12A. 
\vspace{1mm}

Note that the chf of $Cauchy(0,1)$ is $e^{-|t|}$, $t \in {\cal R}$. 
\vspace{1mm}

By Theorem 4.2.12A, the chf of $U+V$ is $e^{-|t|}e^{-|t|} = e^{-2|t|}$, $t \in {\cal R}$, which is 
the chf of $Cauchy(0,2)$. 
\vspace{1mm}

By the uniqueness theorem, $U+V \sim Cauchy(0,2)$. 
\vspace{1mm}

Of course, the same result can be derived using the convolution.
\end{block}}
\frame{
\begin{block}{}
As an exercise, we now use convolution to derive the same result. 
\vspace{1mm}

By the convolution formula, the pdf of $U+V$ is \vspace{-2mm}
\[ f_{U+V}(z) = \int_{-\infty}^\infty \frac{1}{\pi (1+w^2)} \ \frac{1}{\pi [1+(z-w)^2]} dw \vspace{-2mm} \]
After some calculation, we obtain that the integrand is equal to\vspace{-2mm}
\[  \frac{2}{\pi^2 (z^2+4)z} \left[ \frac{w}{1+w^2} - \frac{w-z}{1+(z-w)^2} \right] 
 + \frac{1}{\pi^2(z^2+4)} \left[ \frac{1}{1+w^2} + \frac{1}{1+(z-w)^2} \right] \vspace{-2mm} \]
For every fixed $z$, when $|w|$ is large enough,  \vspace{-2mm}
\[ \left| \frac{w}{1+w^2} - \frac{w-z}{1+(z-w)^2} \right| = \left| \frac{2(1-w^2+zw) }{(1+w^2)[1+(z-w)^2]} \right|
\leq \frac{4}{1+(z-w)^2}\vspace{-2mm} \]
Hence the function on the far left hand side of the above expression is integrable and, by symmetry,  \vspace{-1mm}
\[ \int_{-\infty}^\infty \left[ \frac{w}{1+w^2} - \frac{w-z}{1+(z-w)^2} \right] dw =0 \]
Then, \vspace{-2mm}
\beqrs
 f_{U+V}(z) &=&  \frac{1}{\pi^2(z^2+4)} \int_{-\infty}^\infty \left[ \frac{1}{1+w^2} + \frac{1}{1+(z-w)^2} \right] dw \\
& = &  \frac{1}{\pi^2(z^2+4)} (\pi + \pi ) = \frac{1}{2\pi [1+(z/2)^2]}
\eeqrs
This is the pdf of $Cauchy(0,2)$ distribution.
\vspace{1mm}


\end{block}

}
\end{document}


\begin{alertblock}{}<2->
We now turn to discrete additive distributions.
\end{alertblock}
\vspace{-2mm}
\begin{alertblock}{Theorem 4.3.2 (additivity of Poisson distributions)}<2->
If $X_i \sim Poisson(\lambda_i )$, $i=1,...,k$, are independent, then
the sum $T = X_1+\cdots + X_k \sim Poisson (  \lambda_1+\cdots + \lambda_k  )$.

The mgf of $X_i$ is $M_{X_i}(t) = e^{\lambda_i (e^t-1)}$, $t \in {\cal R}$, $i=1,...,k$.

By Theorem 4.2.12, the mgf of $T$ is \vspace{-2mm}
\[ e^{\lambda_1 (e^t-1)} \cdots e^{\lambda_k (e^t-1)} = e^{(\lambda_1+\cdots + \lambda_k)(e^t-1) } \quad \quad t \in {\cal R} \vspace{-3mm} \]
which is the mgf of $Poisson( \lambda_1+\cdots + \lambda_k )$.
\end{alertblock}
}
\frame{\vspace{-3mm}
\begin{block}{Additivity of binomial distributions}
If $X_i \sim binomial(p,n_i)$, $i=1,...,k$, are independent, then the sum $T = X_1+\cdots + X_k \sim binomial (p, n_1+\cdots + n_k)$.

This is because, for any $t \in {\cal R}$, $ M_{X_i} (t) = (pe^t+1-p)^{n_i} $, $i=1,...,k$,
which implies \vspace{-3mm}
\[ M_T(t) =  (pe^t+1-p)^{n_1} \cdots (pe^t+1-p)^{n_1}  = (pe^t+1-p)^{n_1+\cdots + n_k} \vspace{-3mm}\]
which is the mgf of  $binomial (p, n_1+\cdots + n_k)$.
\end{block}\vspace{-2mm}
