%ST402 PMSP slides

\documentclass[30pt,landscape]{foils}
\usepackage{graphicx}
\usepackage[pdftex]{color}
\usepackage[pdftex]{geometry}
\geometry{headsep=3ex,hscale=0.8,left=0.1in}
%\geometry{body={8.5in,11.5in},headheight=0.5in,headsep=3ex,hscale=0.8,left=0.1in}
\usepackage{hyperref}
\hypersetup{pdftitle={Latent Class Slides for MI455/ST405},
  pdfsubject={},
  pdfauthor={Martin Knott},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor=white
  }
\usepackage{pause}
\usepackage{background}
\usepackage{pp4slide}
\usepackage{chicago,amsmath,amssymb,epsfig,theorem,array,hyperref}
\newcommand{\section}{\foilhead}
\newcommand{\subsection}{\foilhead}
\newcommand{\subsubsection}{\foilhead}
\newcommand{\tab}{\hspace{5mm}}
\renewcommand{\refname}{Some References}
\newcommand{\bv}[1]{\mathbf #1}
\def\bx{{\bv x}}
\def\by{{\bv y}}
\newcommand{\bLambda}{\boldsymbol\Lambda}
\newcommand{\bbeta}{\boldsymbol\beta}
\newcommand{\balpha}{\boldsymbol\alpha}
\newcommand{\bs}{\boldsymbol\Sigma}
\newcommand{\bsx}{\boldsymbol{\Sigma}_{xx}}
\newcommand{\bsy}{\boldsymbol{\Sigma}_{yy}}
\newcommand{\bmu}{\boldsymbol\mu}
\newcommand{\bmux}{\boldsymbol{\mu}_x}
\newcommand{\bmuy}{\boldsymbol{\mu}_y}
\newcommand{\bepsilon}{\boldsymbol{\epsilon}}
\newcommand{\bb}{\bv{b}}
\newcommand{\ba}{\bv{a}}
\newcommand{\be}{\bv{e}}
\newcommand{\bc}{\bv{c}}
\newcommand{\bA}{\bv{A}}
\newcommand{\bB}{\bv{B}}
\newcommand{\bI}{\bv{I}}
\newcommand{\bJ}{\bv{J}}
\newcommand{\bC}{\bv{C}}
\newcommand{\bX}{\bv{X}}
\newcommand{\bY}{\bv{Y}}
\newcommand{\bZ}{\bv{Z}}
\newcommand{\bh}{\bv{h}}
\newcommand{\bH}{\bv{H}}
\newcommand{\bt}{\bv{t}}
\newcommand{\bth}{\tilde{\bv{h}}
\newcommand{\C}{\mathbb{C}}
\begin{flushright}
ST402\\2003-2004\\ Dr M. Knott, B607\\
\end{flushright}}
\newcommand{\var}{\operatorname{var}}
\newcommand{\cov}{\operatorname{cov}}
\raggedright
\definecolor{bgblue}{rgb}{0.04,0.39,0.53}
\pagecolor{bgblue}

\newcommand{\eps}{\varepsilon}
\newcommand{\corr}{{\rm Corr}}
\newcommand{\nid}{{\rm NID}}
\newcommand{\diag}{{\rm diag}}

\newcommand{\Exp}{{\rm Exp}}
\newcommand{\bin}{{\rm Bin}}
\newcommand{\pois}{{\rm Pois}}
\newcommand{\gam}{{\rm Gamma}}
\newcommand{\bet}{{\rm Beta}}

\newcommand{\mX}{\mathbf{X}}
\newcommand{\mx}{\mathbf{x}}
\newcommand{\mY}{\mathbf{Y}}
\newcommand{\mSig}{\mathbf{\Sigma}}
\newcommand{\mmu}{\boldsymbol{\mu}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\vS}{\vspace{-1cm}}
\newcommand{\lra}{$\longrightarrow$}


\begin{document}
\foilhead{Lecture 2 - Objective and Outcomes} Random variables allow us
to associate real numbers with events. This week we discuss the
implications of this mapping and introduce the idea of a distribution.
\begin{itemize}
\item random variables
\item cumulative distribution functions
\item discrete variables and mass functions
\item continuous variables and density functions
\item expectation and variance
\item expectation operator
\end{itemize}
\foilhead{}
 After reviewing the notes you should: \small
\begin{itemize}
\item understand the distinction between a random variable and an
instance of a random variable
\item be able to derive mass/density functions from distribution
functions and vice versa
\item be able to derive mean and variance for a large number of
distributions
\end{itemize}


\foilhead{Properties of distribution functions}
\begin{enumerate}
\item Limits: \newline $\lim_{x \rightarrow - \infty} F(x) = 0$ and
              $\lim_{x \rightarrow \infty} F(x) = 1$.
\item Non-decreasing: \newline if $x<y$ then $F(x) \leq F(y)$. \item
Right continuous: \newline $\lim_{h \downarrow 0} F(x+h) = F(x)$.
\end{enumerate}

\foilhead{Probabilities from distribution functions}
\begin{enumerate}
 \item $P(X>x) = 1 - F(x)$.
 \item $P(x < X \leq y) = F(y) - F(x)$.
 \item $P(X<x) = \lim_{h \downarrow 0} F(x-h) = F(x-)$.
 \item $P(X=x) =F(x) - F(x-)$.
\end{enumerate}


\foilhead{Properties of mass functions}
\begin{enumerate}
 \item $f(x) = F(x) - F(x-)$.
 \item $\sum_{i:x_i \leq x} f(x_i) = F(x)$.
 \item $\sum_i f(x_i) = 1$.
 \item $f(x) = 0$ if $x \notin \{x_1,x_2,\ldots\}$.
\end{enumerate}

\foilhead{Properties of continuous random variables}
\begin{enumerate}
 \item $P(X = x) = 0$ for all $x \in \R$.
 \item $\int_{-\infty}^{\infty} f(x) dx = 1$.
 \item $\int_a^b f(x) dx = P(a< X \leq b)$.
\end{enumerate}

\foilhead{Unified notation}
$$\begin{array}{l}
P(a < X \leq b) = \int_a^b dF(x) \\ = \left\{ \begin{array}{ll}
\sum_{i:a< x_i \leq b} f(x_i), & {\rm if} \ X \ {\rm discrete}, \\
\int_a^b f(x) dx, & {\rm if} \ X \ {\rm continuous}.
\end{array} \right. \end{array}
$$

\foilhead{Properties of expectation}
 For constant $a$ and random variables $X$ and $Y$.
\begin{enumerate}
 \item $E(a) = a$.
 \item $E(aX) = a E(X)$.
 \item $E(X+Y) = E(X) +E(Y)$.
  \item If $X \geq Y$ then $E(X) \geq E(Y)$.
\end{enumerate}

\foilhead{Inequalities involving expectation}
\begin{enumerate}
 \item Markov inequality: \newline random variable $Y \geq 0$, constant $a >
0$; $$P(Y \geq a) \leq E(Y)/a.$$
 \item Chebyshev inequality: constant $a> 0$;
$$P(|X- E(X)| \geq a ) \leq \sigma^2 / a^2.$$
\end{enumerate}



%**********
\foilhead{Moments}
%**********
%

 If $r$ is a positive integer then the
$r^{{th}}$ \textit{moment}, $m_r$, of $X$ is
$$
m_r  = E(X^r).
$$
The $r^{{th}}$ \textit{central moment}, $\mu_r$ is
$$
\mu_r = E((X-m_1)^r).
$$


 \foilhead{Properties of moments}
 \begin{enumerate}
  \item $m_1 = E(X) = \mu$ (mean); $\mu_1 = 0$. \item $\mu_2 = E(X^2) -
  E(X)^2 = \var(X) = \sigma^2$ (variance). \item Coefficient of skewness:
  $\gamma_1 = E[(X- \mu)^3]/ \sigma ^3 = \mu_3 / \mu_2^{\frac{3}{2}}$.
  \item Coefficient of kurtosis: $\gamma_2 = (E[(X- \mu)^4]/ \sigma^4) -
  3 = (\mu_4 / \mu_2^2) - 3$.
 \end{enumerate}

 \foilhead{Moment generating function}
 The MGF of a random variable $X$ is
 a function $M : \R \longrightarrow [0,\infty)$ given by
 $$
 M(t) = E(e^{tX}),
 $$
 where $M(t) < \infty$ for $|t| < h$ and some $h>0$.
 \foilhead{}
  \begin{enumerate}
  \item Evaluation via integration:
  $$
  M(t) = \int_{-\infty}^{\infty} e^{tx} dF(x) = \left\{
  \begin{array}{ll}
  \sum_i e^{t x_i} f(x_i), & {\rm if} \ X \ {\rm discrete}, \\
  \int_{-\infty}^{\infty} e^{t x} f(x) dx, & {\rm if} \ X \ {\rm
  continuous}.
  \end{array} \right.
  $$
\foilhead{}
  \item Taylor expansion:
  $$
  M(t) = 1 + t E(X) + \frac{t^2}{2!} E(X^2)+ \ldots + \frac{t^r}{r!}
  E(X^r)+ \ldots = \sum_{j=0}^{\infty} \frac{E(X^j)}{j!} t^j.
  $$
\foilhead{}
  \item Derivatives at zero:
  $$
  M^{(r)}(0) = \left. \frac{d^r}{dt^r} M(t) \right|_{t=0} = E(X^r) = m_r.
  $$
\foilhead{}
  \item Uniqueness: If $M_X(t) = M_Y(t)$ for all $|t| < h$ and some
  $h>0$, then $F_X(x) = F_Y(x)$ for all $x \in \R$.
  \end{enumerate}

 \foilhead{Cumulant generating function}: of a random variable $X$
 with moment generating function $M(t)$, is defined as
 $$
 K(t) = \log M(t),
 $$
 The $r^{th}$ \textit{cumulant}, $\kappa_r$, is the coefficient of
 $t^r/r!$ in the expansion of the cumulant generating function $K(t)$;
 $$
 \kappa_r = K^{(r)}(0) = \left. \frac{d^r}{dt^r} K(t) \right|_{t=0}.
 $$
 \foilhead{}
  \begin{enumerate}
  \item $\kappa_1 = m_1 = \mu$ (mean, first moment). \item $\kappa_2 =
  \mu_2 = \sigma^2$ (variance, second central moment). \item $\kappa_3 =
  \mu_3$ (third central moment). \item $\kappa_4 + 3 \kappa_2^2 = \mu_4$
  (fourth central moment).
  \end{enumerate}


 \foilhead{Probability generating function}: of a discrete random
 variable $X$, taking non-negative integer values, is defined as
 $$
 G(t) = E(t^X) = \sum_{i=0}^{\infty} t^i P(X=i).
 $$
  \begin{enumerate}
  \item $P(X=0) = G(0)$. \item $E(X) = G'(1)$. \item
  $E(X(X-1)\ldots(X-k+1)) = G^{(k)}(1)$.
  \end{enumerate}

 \foilhead{Characteristic function}: of a random variable $X$ is the
 function $\phi : \R \longrightarrow \mathbb{C}$ defined by
 $$
 \phi (t) = E(e^{i t X})
 $$
 where $i = \sqrt{-1}$. Note that $E(X^k) = i^{-k} \phi^{(k)}(0)$.

\foilhead{Functions of random variables} If $X$ is a random variable
with distribution function $F_X$ and $g$ is a real-valued function,
then $Y = g(X)$ is a random variable.
\begin{itemize}
\item If $g$ is strictly increasing $F_Y(y) = F_X(g^{-1}(y))$. \item If
$g$ is strictly decreasing $F_Y(y) = 1-F_X(g^{-1}(y))$.
\end{itemize}

\end{document}
