\documentclass[10pt]{article} 
%\usepackage{amsbsy} % for \boldsymbol and \pmb 
%\usepackage{graphicx} % To include pdf files!
\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage{amsfonts}
\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} % For links
\usepackage{fullpage}           % Good for US Letter paper

%\usepackage{fancyheadings} 
%\pagestyle{fancy} 
%\cfoot{Page \thepage {} of 2}
%\headrulewidth=0pt  % Otherwise there's a rule under the header

\pagestyle{empty} % No page numbers

\begin{document}
%\enlargethispage*{1000 pt} 


\begin{center}   
{\Large \textbf{STA 2101/442 Formulas}}\\   % Version 3
\vspace{1 mm}
\end{center}

\noindent
\renewcommand{\arraystretch}{2.0}
\begin{tabular}{lll}
$V(\mathbf{Y}) = 
E\left\{(\mathbf{Y}-\boldsymbol{\mu})(\mathbf{Y}-\boldsymbol{\mu})^\prime\right\}$ 
& ~~~~~ & 
$C(\mathbf{X,Y}) = E\left\{ (\mathbf{X}-\boldsymbol{\mu}_x)
                             (\mathbf{Y}-\boldsymbol{\mu}_y)^\prime\right\}$
\\
\multicolumn{3}{l}{If $\lim_{n \rightarrow \infty} E(T_n) = \theta$  and $\lim_{n \rightarrow \infty} Var(T_n) = 0$, then $T_n \stackrel{P}{\rightarrow} \theta$} \\ 
$\mathbf{Y}_n = \sqrt{n}(\overline{\mathbf{Y}}_n-\boldsymbol{\mu}) 
\stackrel{d}{\rightarrow} \mathbf{Y} \sim N(\mathbf{0},\boldsymbol{\Sigma})$
& ~~~~~ & 
$\sqrt{n}(g(\overline{\mathbf{Y}}_n)-g(\boldsymbol{\mu})) \stackrel{d}{\rightarrow} 
\mbox{\.{g}} (\boldsymbol{\mu}) \mathbf{Y}$, ~~\.{g}$(\mathbf{x}) = 
\left[ \frac{\partial g_i}{\partial x_j} \right]_{k \times d}$
\\
If $\mathbf{Y} \sim N_p(\boldsymbol{\mu},\boldsymbol{\Sigma} )$, then
$\mathbf{AY} \sim N_r(\mathbf{A}\boldsymbol{\mu},
                    \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\prime )$
& ~~~~~ & 
and $(\mathbf{Y}-\boldsymbol{\mu})^\prime
                 \boldsymbol{\Sigma}^{-1}(\mathbf{Y}-\boldsymbol{\mu}) \sim \chi^2 (p)$
\\
\multicolumn{3}{l}{$L(\boldsymbol{\mu,\Sigma}) = |\boldsymbol{\Sigma}|^{-n/2} (2\pi)^{-np/2} 
    \exp -\frac{n}{2}\left\{ tr(\boldsymbol{\widehat{\Sigma}\Sigma}^{-1}) +
    (\overline{\mathbf{y}}-\boldsymbol{\mu})^\prime \boldsymbol{\Sigma}^{-1} 
    (\overline{\mathbf{y}}-\boldsymbol{\mu}) \right\}$,  
where $\boldsymbol{\widehat{\Sigma}} = 
\frac{1}{n}\sum_{i=1}^n (\mathbf{y}_i-\overline{\mathbf{y}}) 
                        (\mathbf{y}_i-\overline{\mathbf{y}})^\prime $} 
\\
$P(n_1, \ldots, n_c) = \binom{n}{n_1~\cdots~n_c} \pi_1^{n_1} \cdots \pi_c^{n_c}$ 
& ~~~~~ & 
$L(\boldsymbol{\pi}) =  \prod_{i=1}^n \pi_1^{y_{i,1}} \pi_2^{y_{i,2}} \cdots \pi_c^{y_{i,c}}
                        = \pi_1^{n_1} \pi_2^{n_2} \cdots \pi_c^{n_c}$ \\ 
$\boldsymbol{\mathcal{I}}(\boldsymbol{\theta}) = \left[E[-\frac{\partial^2}{\partial\theta_i\partial\theta_j}
\log f(Y;\boldsymbol{\theta})]\right]$
& ~~~~~ &
$ \boldsymbol{\mathcal{J}}_n(\boldsymbol{\theta})
    = \left[\frac{1}{n}\sum_{i=1}^n 
    -\frac{\partial^2}{\partial\theta_i\partial\theta_j}  
\log f(Y_i;\boldsymbol{\theta})
    \right]$
\\
$\sqrt{n}(\widehat{\boldsymbol{\theta}}_n-\boldsymbol{\theta})
\stackrel{d}{\rightarrow} \mathbf{T} \sim N_k\left(\mathbf{0}, \boldsymbol{\mathcal{I}}(\boldsymbol{\theta})^{-1}\right )$
& ~~~~~ &
$\widehat{\mathbf{V}}_n = \frac{1}{n}
\boldsymbol{\mathcal{J}}_n(\widehat{\boldsymbol{\theta}}_n)^{-1}
= \left(
   \left[-\frac{\partial^2} {\partial\theta_i\partial\theta_j} \ell(\boldsymbol{\theta},\mathbf{Y})
    \right]_{\boldsymbol{\theta}=\widehat{\boldsymbol{\theta}}_n}
   \right)^{-1}$
\\
$G^2 = -2 \log \left(   
           \frac{\max_{\theta \in \Theta_0} L(\theta)}
                {\max_{\theta \in \Theta} L(\theta)}
           \right)$
& ~~~~~ &
$W_n = (\mathbf{L}\widehat{\boldsymbol{\theta}}_n-\mathbf{h})^\prime 
\left(\mathbf{L} \widehat{\mathbf{V}}_n \mathbf{L}^\prime\right)^{-1} 
(\mathbf{L}\widehat{\boldsymbol{\theta}}_n-\mathbf{h})$ 
\\
$\mathbf{Y} = \mathbf{X} \boldsymbol{\beta} + \boldsymbol{\epsilon}$
& ~~~~~ &
$\boldsymbol{\epsilon} \sim N_n(\mathbf{0},\sigma^2\mathbf{I}_n)$
\\
$\widehat{\boldsymbol{\beta}} = (\mathbf{X}^\prime \mathbf{X})^{-1} 
                   \mathbf{X}^\prime \mathbf{Y} $
& ~~~~~ &
$\widehat{\mathbf{Y}} = \mathbf{X}\widehat{\boldsymbol{\beta}} = \mathbf{HY}$ \\
$\mathbf{H} = \mathbf{X}(\mathbf{X}^\prime \mathbf{X})^{-1} \mathbf{X}^\prime$
& ~~~~~ &
$\mathbf{e} = \mathbf{Y} - \widehat{\mathbf{Y}}$ \\
$\widehat{\boldsymbol{\beta}} \sim N_p\left(\boldsymbol{\beta}, 
                   \sigma^2 (\mathbf{X}^\prime \mathbf{X})^{-1}\right)$
& ~~~~~ &
$SSE/\sigma^2 \sim \chi^2(n-p)$ 
\\
$T = \frac{Z}{\sqrt{W/\nu}} \sim t(\nu)$
& ~~~~~ &
$F = \frac{W_1/\nu_1}{W_2/\nu_2} \sim F(\nu_1,\nu_2)$
\\
\multicolumn{3}{l}{$F = \frac{(\mathbf{L}\widehat{\boldsymbol{\beta}}-\mathbf{h})^\prime
            (\mathbf{L}(\mathbf{X}^\prime \mathbf{X})^{-1}\mathbf{L}^\prime)^{-1}
            (\mathbf{L}\widehat{\boldsymbol{\beta}}-\mathbf{h})}
           {r \, MSE_F} 
           = \frac{(SSR_F-SSR_R)/r}{MSE_F} 
           = \left(\frac{n-p}{r}\right) \left(\frac{a}{1-a}\right)$,
           where $a = \frac{R^2_F-R^2_R}{1-R^2_R} = \frac{rF}{n-p+rF}$} \\
$\log\left(\frac{\pi_i}{1-\pi_i}\right) = \beta_0 + \beta_1 x_{i,1} + \cdots + \beta_{p-1} x_{i,p-1}$
& ~~~~~ &
\\
\end{tabular}
\renewcommand{\arraystretch}{1.0}
  

\vspace{10mm}

\begin{verbatim}
> df = 1:8
> CriticalValue = qchisq(0.95,df)
> round(rbind(df,CriticalValue),3)
               [,1]  [,2]  [,3]  [,4]  [,5]   [,6]   [,7]   [,8]
df            1.000 2.000 3.000 4.000  5.00  6.000  7.000  8.000
CriticalValue 3.841 5.991 7.815 9.488 11.07 12.592 14.067 15.507
\end{verbatim}

\pagebreak

\begin{center}   
{\large \textbf{More large sample tools}}\\   
\vspace{1 mm}
\end{center}

%{\footnotesize
\begin{enumerate}
   \item Definitions (All quantities in boldface are vectors in $\mathbb{R}^m$ unless otherwise stated )  
   \begin{enumerate}
      \item[$\star$] $ \mathbf{T}_n \stackrel{a.s.}{\rightarrow} \mathbf{T}$ means
            $P\{\omega:\, \lim_{n \rightarrow \infty} \mathbf{T}_n(\omega) = \mathbf{T}(\omega)\}=1$.  
      \item[$\star$] $ \mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{T}$ means
            $\forall \epsilon>0,\,\lim_{n \rightarrow \infty}
            P\{||\mathbf{T}_n-\mathbf{T}||<\epsilon  \}=1$. 
      \item[$\star$] $ \mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{T}$ means
            for every continuity point $\mathbf{t}$ of $F_\mathbf{T}$, 
            $\lim_{n \rightarrow \infty}F_{\mathbf{T}_n}(\mathbf{t}) = F_\mathbf{T}(\mathbf{t})$.  
   \end{enumerate}
   \item $ \mathbf{T}_n \stackrel{a.s.}{\rightarrow} \mathbf{T} \Rightarrow
           \mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{T} \Rightarrow
           \mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{T} $.  
   \item If $\mathbf{a}$ is a vector of constants, $ \mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{a} 
                     \Rightarrow \mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{a}$. 
   \item Strong Law of Large Numbers (SLLN): Let $\mathbf{X}_1, \ldots \mathbf{X}_n$ be independent and identically distributed 
         random vectors with finite first moment, and let $\mathbf{X}$ be a general random vector from the same distribution. Then 
         $ \overline{\mathbf{X}}_n \stackrel{a.s.}{\rightarrow} E(\mathbf{X})$.  

  \item Central Limit Theorem: Let $\mathbf{X}_1, \ldots, \mathbf{X}_n$ be i.i.d. random vectors with expected value vector $\boldsymbol{\mu}$ and covariance matrix $\boldsymbol{\Sigma}$. Then $\sqrt{n}(\overline{\mathbf{X}}_n-\boldsymbol{\mu})$ converges in distribution to a multivariate normal with mean \textbf{0} and covariance matrix $\boldsymbol{\Sigma}$.


   \item \label{slutd} Slutsky Theorems for Convergence in Distribution:
        \begin{enumerate}
            \item \label{slutcond}
                  If $\mathbf{T}_n \in \mathbb{R}^m$, 
                     $\mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{T}$ and if
                     $f:\,\mathbb{R}^m \rightarrow \mathbb{R}^q$ 
                     (where $q \leq m$) is
                      continuous except possibly on a set $C$ with 
                      $P(\mathbf{T} \in C)=0$, then
                      $f(\mathbf{T}_n) \stackrel{d}{\rightarrow} f(\mathbf{T})$.
            \item  \label{slutdiffd}
                  If $\mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{T}$ and
                     $(\mathbf{T}_n - \mathbf{Y}_n) \stackrel{P}{\rightarrow} 0$,
                     then $\mathbf{Y}_n \stackrel{d}{\rightarrow} \mathbf{T}$.
            \item  \label{slutstackd}
                  If $\mathbf{T}_n \in \mathbb{R}^d$,
                     $\mathbf{Y}_n \in \mathbb{R}^k$, 
                     $\mathbf{T}_n \stackrel{d}{\rightarrow} \mathbf{T}$ and
                     $\mathbf{Y}_n \stackrel{P}{\rightarrow} \mathbf{c}$, then
                     \begin{displaymath}
                        \left( \begin{array}{cc}  
                        \mathbf{T}_n \\ \mathbf{Y}_n
                        \end{array} \right)
                          \stackrel{d}{\rightarrow}
                        \left( \begin{array}{cc}  
                        \mathbf{T} \\ \mathbf{c}
                        \end{array} \right)
                     \end{displaymath}
        \end{enumerate}


   \item \label{slutp} Slutsky Theorems for Convergence in Probability:
        \begin{enumerate}
            \item \label{slutconp}
                  If $\mathbf{T}_n \in \mathbb{R}^m$, 
                     $\mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{T}$ and if
                      $f:\,\mathbb{R}^m \rightarrow \mathbb{R}^q$ 
                     (where $q \leq m$) is
                      continuous except possibly on a set $C$ with 
                      $P(\mathbf{T} \in C)=0$, then
                      $f(\mathbf{T}_n) \stackrel{P}{\rightarrow} f(\mathbf{T})$.
            \item \label{slutdiffp}
                  If $\mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{T}$ and
                     $(\mathbf{T}_n - \mathbf{Y}_n) \stackrel{P}{\rightarrow} 0$,
                     then $\mathbf{Y}_n \stackrel{P}{\rightarrow} \mathbf{T}$.
            \item \label{slutstackp}
                  If $\mathbf{T}_n \in \mathbb{R}^d$,
                     $\mathbf{Y}_n \in \mathbb{R}^k$, 
                     $\mathbf{T}_n \stackrel{P}{\rightarrow} \mathbf{T}$ and
                     $\mathbf{Y}_n \stackrel{P}{\rightarrow} \mathbf{Y}$, then
                     \begin{displaymath}
                        \left( \begin{array}{cc}  
                        \mathbf{T}_n \\ \mathbf{Y}_n
                        \end{array} \right)
                          \stackrel{P}{\rightarrow}
                        \left( \begin{array}{cc}  
                        \mathbf{T} \\ \mathbf{Y}
                        \end{array} \right)
                     \end{displaymath}
        \end{enumerate}


   \item \label{delta} Delta Method (Theorem of Cram\'{e}r, Ferguson p. 45): Let $g: \mathbb{R}^d \rightarrow \mathbb{R}^k$ be such that the elements of \.{g}$(\mathbf{x}) = 
\left[ \frac{\partial g_i}{\partial x_j} \right]_{k \times d}$ are continuous in a neighborhood of $\boldsymbol{\theta} \in \mathbb{R}^d$. If $\mathbf{T}_n$ is a sequence of $d$-dimensional random vectors such that $\sqrt{n}(\mathbf{T}_n-\boldsymbol{\theta}) \stackrel{d}{\rightarrow} \mathbf{T}$, then 
$\sqrt{n}(g(\mathbf{T}_n)-g(\boldsymbol{\theta})) \stackrel{d}{\rightarrow} 
\mbox{\.{g}} (\boldsymbol{\theta}) \mathbf{T}$. In particular, if
$\sqrt{n}(\mathbf{T}_n-\boldsymbol{\theta}) \stackrel{d}{\rightarrow} \mathbf{T} 
\sim N(\mathbf{0},\mathbf{\Sigma})$, then $\sqrt{n}(g(\mathbf{T}_n)-g(\boldsymbol{\theta})) \stackrel{d}{\rightarrow} 
\mathbf{Y} \sim N(\mathbf{0},
\mbox{\.{g}}(\boldsymbol{\theta})\mathbf{\Sigma}\mbox{\.{g}}(\boldsymbol{\theta}) ^\prime)$.
\end{enumerate}





\noindent
\begin{center}\begin{tabular}{l}
\hspace{6.5in} \\ \hline
\end{tabular}\end{center}
This formula sheet was prepared by  \href{http://www.utstat.toronto.edu/~brunner}{Jerry Brunner},
Department of Statistics, University of Toronto. It is licensed under a 
\href{http://creativecommons.org/licenses/by-sa/3.0/deed.en_US}
     {Creative Commons Attribution - ShareAlike 3.0 Unported License}. Use any part of it as you like and share the result freely. The \LaTeX~source code is available from the course website:
\href{http://www.utstat.toronto.edu/~brunner/oldclass/appliedf13} {\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/appliedf13}}



\end{document}

$G^2 = 2 \sum_{j=1}^c n_j\log \left(\frac{n_j}{\widehat{\mu}_j}\right)$,
with $\widehat{\mu}_j = n\widehat{\pi}_j$ 



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

% Add this row next.






% From 2012, but removed

\noindent
\begin{tabular}{cccl}
$Z_1 = \frac{\sqrt{n}(\overline{Y}_n-\pi_0)}{\sqrt{\pi_0(1-\pi_0)}}$ & 
$Z_2 = \frac{\sqrt{n}(\overline{Y}_n-\pi_0)}{\sqrt{\overline{Y}_n(1-\overline{Y}_n)}}$ &
$\overline{Y}_n \pm z_{\alpha/2}\sqrt{\frac{\overline{Y}_n(1-\overline{Y}_n)}{n}}$ &
\begin{minipage}{3in}
\begin{verbatim}
> qnorm(0.975)
[1] 1.959964
> qnorm(0.995)
[1] 2.575829
\end{verbatim}
\end{minipage}
\end{tabular}

\vspace{3mm}


\noindent
~~If $\mathbf{Y} \sim N_p(\boldsymbol{\mu},\boldsymbol{\Sigma} )$, then 
$\mathbf{AY} \sim N_r(\mathbf{A}\boldsymbol{\mu},
                    \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\prime )$.

\vspace{3mm}


\noindent
~~If $E(\mathbf{Y})=\boldsymbol{\mu}$, then $V(\mathbf{Y})$ is defined by 
$V(\mathbf{Y}) = 
E\left\{(\mathbf{Y}-\boldsymbol{\mu})(\mathbf{Y}-\boldsymbol{\mu})^\prime\right\}$.

\vspace{3mm}


\multicolumn{3}{l}{If $X \sim N(\mu,\sigma^2)$, then $\frac{X^2}{\sigma^2} \sim \chi^2(1,\lambda)$, with
$\lambda = \frac{\mu^2}{\sigma^2}$} \\

$\phi = \frac{(\mathbf{L}\boldsymbol{\beta}-\mathbf{h})^\prime
            (\mathbf{L}(\mathbf{X}^\prime \mathbf{X})^{-1}\mathbf{L}^\prime)^{-1}
            (\mathbf{L}\boldsymbol{\beta}-\mathbf{h})}
           {\sigma^2}$
& ~~~~~ &
 \\
$f(y|\theta,\phi) = 
    \exp\left\{ \frac{y\theta-b(\theta)}{\phi} + c(y,\phi)\right\}$
& ~~~~~ &
$\theta = g(\mu) = \eta = \mathbf{x}^\prime\boldsymbol{\beta}$ \\


