% $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}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\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 4]{Stat 609: Mathematical Statistics \\ Lecture 4}
\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]}}

\begin{document}

%\frame{\titlepage}

\frame {
\frametitle{
Lecture 4: Independence}
\vspace{-2mm}
\begin{block}{Definition 1.3.7.}
Two events $A$ and $B$ are (statistically) independent iff\vspace{-2mm}
\[ P(A\cap B ) = P(A)P(B).\]
\end{block}
\vspace{-2mm}
\begin{alertblock}{}<2->
\begin{itemize}
\item
This definition is still good if $P(A)=0$ or $P(B)=0$.
\item
$A$ and $B$ are independent iff $P(A|B)=P(A)$ (or $P(B|A)= P(B)$).\\
That is, the probability of the occurrence of $A$ is not affected by the occurrence of $B$.
\end{itemize}
\end{alertblock}\vspace{-2mm}
\begin{block}{Theorem 1.3.9.}<3->
 If $A$ and $B$ are independent, then
the following pairs are independent: $A$ and $B^c$,
$A^c$ and $B$, and $A^c$ and $B^c$.

Proof:
\[ P(A\cap B^c) = P(A) - P(A\cap B) = P(A) -P(A)P(B) \]
\[ \ \ \ \ = P(A)[1-P(B)] = P(A)P(B^c) \]
Proofs for other events are similar.
\end{block}
}
\frame{
\begin{alertblock}{Example 1.3.11 (Letters)}
$S$ consists of the 3! permutations of the letters a, b, and c, along with the three triplets of each letter:\vspace{-1mm}
\[ S = \left\{ \begin{array}{ccc}
aaa & bbb & ccc \\
abc & bca & cba \\
acb & bac & cab \end{array} \right\} \vspace{-1mm}\]
Suppose that each element of $S$ has probability 1/9 to occur. 
\vspace{1mm}

Define $A_i = \{$$i$th place in the triple is occupied by a$\}$, $i=1,2,3$. 
\vspace{1mm}

By looking at $S$, we obtain that \vspace{-1mm}
\[ P(A_1) = P(A_2 ) = P(A_3) = 1/3 \vspace{-1mm}\]
and \vspace{-2mm}
\[ P(A_1\cap A_2 ) = P(A_1\cap A_3) = P(A_2 \cap A_3 )= 1/9\vspace{-1mm} \]
Thus,\vspace{-1mm}
\[ P(A_i \cap A_j) = P(A_i )P(A_j) \quad i \neq j \vspace{-1mm}\]
and $A_i$ and $A_j$ are independent for any pair of $(i,j)$, $i \neq j$. 
\end{alertblock}
}
\frame{
\begin{alertblock}{Example 1.3.11 (continued)}
Let $B = \{$all three letters are the same$\}$
\[ P(B) = 1/3, \quad \quad P(B \cap A_i) = 1/9, \quad  i=1,2,3 \]
Hence, $B$ and $A_i$ are independent for any $i$. 
\vspace{1mm}

It is easy to find events that are not independent. 
\vspace{1mm}

Let $C= \{ abc , bca \}$. 
\[ P(C) = 2/9 , \quad \quad P(A_1 \cap C) =  1/9 \neq P(C)P(A_1) = 2/27 \]
In fact,
\begin{itemize}
\item
If $A \subset B$, then $P(A) = P(A\cap B) = P(A)P(B)$ iff $P(A)=0$ or $P(B)=1$. 
\item
If $A \cap B = \emptyset$, then $P(A\cap B) = P(A)P(B)= 0$ iff $P(A)=0$ or $P(B)=0$. 
\item
If $A$ and $B$ has some relationship, usually they are not independent. 
\end{itemize}
\end{alertblock}
}
\frame{
\begin{block}{Definition 1.3.12.}
A collection of events $A_1,...,A_n$ are (mutually) independent
iff for any subcollection $A_{i_1},...,A_{i_k}$,\vspace{-2mm}
\[ P \left( A_{i_1}\cap \cdots \cap A_{i_k} \right) = P(A_{i_1})\cdots P(A_{i_k}) \]
\end{block}\vspace{-2mm}
\begin{alertblock}{Pairwise independence}<2->
Events $A_1,...,A_n$ are pairwise independent iff $A_i$ and $A_j$ are independent for any pair $(i,j)$.
\vspace{1mm}

Mutual independence is stronger than pairwise independence.
\end{alertblock}
\vspace{-2mm}
\begin{block}{Example 1.3.11 (continued)}<3->
$A_1,A_2,A_3$ are pairwise independent. 
\vspace{1mm}

Are they mutually independent?
\[ P(A_1\cap A_2 \cap A_3) = \frac{1}{9} \neq \frac{1}{27} = P(A_1)P(A_2)P(A_3) \]
They are not. 
\end{block}
}
\frame{\vspace{-2mm}
\begin{block}{Properties}
\begin{itemize}
\item
If we know $P(A_i)$, $i=1,...,n$, we may not know $P(\cup_{i=1}^n A_i)$.\\
But if $A_1,...,A_n$ are independent,  then \vspace{-2mm}
\[ P \left( \bigcup_{i=1}^n A_i \right) = \sum_{i=1}^n P(A_i) - \sum_{ i  < j} P(A_i)P( A_j)\vspace{-2mm} \]
\[ + \sum_{i <j <k} P(A_i)P( A_j)P( A_k )  + \cdots +(-1)^{n-1} P(A_1)P( A_2) \cdots P( A_n) \]
\item
If events $A$, $B$, $C$ are independent, then so are $A\cup B$ and $C$,
$A\cap B$ and $C$, and $A-B$ and $C$.\\
Proof: \vspace{-2mm}
\begin{eqnarray*}
 P((A\cup B)\cap C) &=& P((A\cap C)\cup (B\cap C))\\
 & =& P(A\cap C)+P(B\cap C) - P(A\cap C\cap B) \\
 &= & P(A)P(C) +P(B)P(C) - P(A)P(C)P(B) \\
&  =& P(C)[P(A)+P(B)-P(A)P(B)] \\
&= & P(C)P(A\cup B) 
\end{eqnarray*}
\end{itemize}
\end{block}
}
\frame{
\begin{alertblock}{Example 1.3.10 (Tossing

}
\frame{
\begin{block}{Independent experiments}
\end{block} \vspace{-2mm}
\begin{alertblock}{Example}<2->
\end{alertblock}
}


\end{document}
