\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 \oddsidemargin=0in % Good for US Letter paper \evensidemargin=0in \textwidth=6.3in \topmargin=-0.5in \headheight=0.1in \headsep=0.1in \textheight=9.4in \pagestyle{empty} % No page numbers \begin{document} \enlargethispage*{1000 pt} \begin{center} {\Large \textbf{STA 442/2101 Formulas}}\\ % Version 2 \vspace{1 mm} \end{center} % Spectral decomposition, linear independence. % MGFs % Random vectors % Linear model % Distribution facts, incl x2 addup? % Test stats and CIs \noindent \renewcommand{\arraystretch}{2.0} \begin{tabular}{lll} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MGF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $M_Y(t) = E(e^{Yt})$ & ~~~~~ & $M_{aY}(t) = M_Y(at)$ \\ $M_{Y+a}(t) = e^{at}M_Y(t)$ & ~~~~~ & $M_{\sum_{i=1}^n Y_i}(t) = \prod_{i=1}^n M_{Y_i}(t)$ \\ $Y \sim N(\mu,\sigma^2)$ means $M_Y(t) = e^{\mu t + \frac{1}{2}\sigma^2t^2}$ & ~~~~~ & $Y \sim \chi^2(\nu)$ means $M_Y(t) = (1-2t)^{-\nu/2}$ \\ \multicolumn{3}{l}{If $W=W_1+W_2$ with $W_1$ and $W_2$ independent, $W\sim\chi^2(\nu_1+\nu_2)$, $W_2\sim\chi^2(\nu_2)$ then $W_1\sim\chi^2(\nu_1)$} \\ %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Linear Algebra %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \parbox{7 cm}{Columns of $\mathbf{A}$ \emph{linearly dependent} means there is a vector $\mathbf{v} \neq \mathbf{0}$ with $\mathbf{Av} = \mathbf{0}$.} & ~~~~~ & \parbox{7 cm}{Columns of $\mathbf{A}$ \emph{linearly independent} means that $\mathbf{Av} = \mathbf{0}$ implies $\mathbf{v} = \mathbf{0}$.} \\ \multicolumn{3}{l}{$\mathbf{A}$ \emph{positive definite} means $\mathbf{v}^\top \mathbf{Av} > 0$ for all vectors $\mathbf{v} \neq \mathbf{0}$.} \\ $\boldsymbol{\Sigma} = \mathbf{P} \boldsymbol{\Lambda}\mathbf{P}^\top$ & ~~~~~ & $\boldsymbol{\Sigma}^{-1} = \mathbf{P} \boldsymbol{\Lambda}^{-1} \mathbf{P}^\top$ \\ $\boldsymbol{\Sigma}^{1/2} = \mathbf{P} \boldsymbol{\Lambda}^{1/2} \mathbf{P}^\top$ & ~~~~~ & $\boldsymbol{\Sigma}^{-1/2} = \mathbf{P} \boldsymbol{\Lambda}^{-1/2} \mathbf{P}^\top$ \\ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Random vectors and MVN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $cov(\mathbf{w}) = E\left\{(\mathbf{w}-\boldsymbol{\mu}_w)(\mathbf{w}-\boldsymbol{\mu}_w)^\top\right\}$ & ~~~~~ & $C(\mathbf{w,t}) = E\left\{ (\mathbf{w}-\boldsymbol{\mu}_w) (\mathbf{t}-\boldsymbol{\mu}_t)^\top\right\}$ \\ $cov(\mathbf{w}) = E\{\mathbf{ww}^\top\} - \boldsymbol{\mu}_w\boldsymbol{\mu}_w^\top$ & ~~~~~ & $cov(\mathbf{Aw}) = \mathbf{A}cov(\mathbf{w}) \mathbf{A}^\top$ \\ %%%%%%%%%%%%%%%%%%%%%%%% MVN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% If $\mathbf{w} \sim N_p(\boldsymbol{\mu},\boldsymbol{\Sigma} )$, then $\mathbf{Aw}+\mathbf{c} \sim N_r(\mathbf{A}\boldsymbol{\mu} + \mathbf{c}, \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\top )$ & ~~~~~ & and $(\mathbf{w}-\boldsymbol{\mu})^\top \boldsymbol{\Sigma}^{-1}(\mathbf{w}-\boldsymbol{\mu}) \sim \chi^2 (p)$ \\ %%%%%%%%%%%%%%%%%%%%%%%%%% Regression %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $Y_i = \beta_0 + \beta_1 x_{i,1} + \cdots + \beta_{p-1} x_{i,p-1} + \epsilon_i$ & ~~~~~ & $\epsilon_1, \ldots, \epsilon_n$ independent $N(0,\sigma^2)$ \\ $\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}^\top \mathbf{X})^{-1} \mathbf{X}^\top \mathbf{y} \sim N_p\left(\boldsymbol{\beta}, \sigma^2 (\mathbf{X}^\top \mathbf{X})^{-1}\right)$ & ~~~~~ & $\widehat{\mathbf{y}} = \mathbf{X}\widehat{\boldsymbol{\beta}} = \mathbf{Hy}$, where $\mathbf{H} = \mathbf{X}(\mathbf{X}^\top \mathbf{X})^{-1} \mathbf{X}^\top $ \\ $\textbf{e} = \mathbf{y} - \widehat{\mathbf{y}} = (\mathbf{I}-\mathbf{H})\mathbf{y}$ & ~~~~~ & $\widehat{\boldsymbol{\beta}}$ and $\textbf{e}$ are independent under normality. \\ $\frac{SSE}{\sigma^2} = \frac{\textbf{e}^\top \textbf{e}}{\sigma^2} \sim \chi^2(n-p)$ & ~~~~~ & $MSE = \frac{SSE}{n-p}$ \\ $\sum_{i=1}^n(Y_i-\overline{Y})^2 = \sum_{i=1}^n(Y_i-\widehat{Y}_i)^2 + \sum_{i=1}^n(\widehat{Y}_i-\overline{Y})^2$ & ~~~~~ & $SST=SSE+SSR$ and $R^2 = \frac{SSR}{SST}$ \\ $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)$ \\ $T = \frac{\mathbf{a}^\top \widehat{\boldsymbol{\beta}}-\mathbf{a}^\top \boldsymbol{\beta}} {\sqrt{MSE \, \mathbf{a}^\top (\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{a}}} \sim t(n-p)$ & ~~~~~ & $T = \frac{Y_{n+1}-\mathbf{x}_{n+1}^\top \widehat{\boldsymbol{\beta}}} {\sqrt{MSE \, (1+\mathbf{x}_{n+1}^\top (\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{x}_{n+1})}} \sim t(n-p)$ \\ $F^* = \frac{SSR_F-SSR_R}{r \, MSE_F} \sim F(r,n-p)$ & ~~~~~ & $a = \frac{R^2_F-R^2_R}{1-R^2_R} = \frac{rF^*}{n-p+rF^*}$ \\ $F^* = \frac{(\mathbf{L}\widehat{\boldsymbol{\beta}}-\mathbf{h})^\top (\mathbf{L}(\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{L}^\top)^{-1} (\mathbf{L}\widehat{\boldsymbol{\beta}}-\mathbf{h})} {r \, MSE} \sim F(r,n-p)$ & ~~~~~ & $F^* = \left(\frac{n-p}{r}\right) \left(\frac{a}{1-a}\right) \sim F(r,n-p)$ \\ $r = \frac{\sum_{i=1}^n (x_i-\overline{x})(y_i-\overline{y})} {\sqrt{\sum_{i=1}^n (x_i-\overline{x})^2} \sqrt{\sum_{i=1}^n (y_i-\overline{y})^2}}$ & ~~~~~ & \parbox{7 cm}{If $ \sqrt{n}\left( T_n- \theta \right) \stackrel{d}{\rightarrow} T \sim N(0,\sigma^2)$ then $\sqrt{n}\left( g(T_n)- g(\theta) \right) \stackrel{d}{\rightarrow} Y \sim N\left(0,g^\prime(\theta)^2 \, \sigma^2\right)$.} \\ $ Z_i \stackrel{ind}{\sim} N(\mu_i,1) \Rightarrow \sum_{i=1}^n Z_i^2 \sim \chi^2_{nc}(n,\lambda=\sum_{i=1}^n \mu_i^2)$ & ~~~~~ & $\lambda = \frac{(\mathbf{L}\boldsymbol{\beta}-\mathbf{h})^\top (\mathbf{L}(\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{L}^\top)^{-1} (\mathbf{L}\boldsymbol{\beta}-\mathbf{h})} {\sigma^2}$ \\ \end{tabular} \renewcommand{\arraystretch}{1.0} \vspace{20mm} \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/302f16} {\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/302f16}} \end{document} If $ \sqrt{n}\left( T_n- \theta \right) \stackrel{d}{\rightarrow} T \sim N(0,\sigma^2)$ then $\sqrt{n}\left( g(T_n)- g(\theta) \right) \stackrel{d}{\rightarrow} Y \sim N\left(0,g^\prime(\theta)^2 \, \sigma^2\right)$. & ~~~~~ & $\lambda = \frac{(\mathbf{L}\boldsymbol{\beta}-\mathbf{h})^\top (\mathbf{L}(\mathbf{X}^\top \mathbf{X})^{-1}\mathbf{L}^\top)^{-1} (\mathbf{L}\boldsymbol{\beta}-\mathbf{h})} {\sigma^2}$ \\ $ Z_i \stackrel{ind}{\sim} N(\mu_i,1) \Rightarrow \sum_{i=1}^n Z_i^2 \sim \chi^2_{nc}(n,\lambda=\sum_{i=1}^n \mu_i^2)$ & ~~~~~ & $\lambda = \frac{\sum_{k=1}^p n_k (\mu_k-\mu_.)^2}{\sigma^2}$, where $\mu_. = \sum_{k=1}^p \frac{n_k}{n} \mu_k$ \\ $ \log\left(\frac{\pi_i}{1-\pi_i} \right) = \beta_0 + \beta_1 x_{i,1} + \ldots + \beta_{p-1} x_{i,p-1}$ & ~~~~~ & $\pi_i = \frac{e^{\beta_0 + \beta_1 x_{i,1} + \ldots + \beta_{p-1} x_{i,p-1}}} {1+e^{\beta_0 + \beta_1 x_{i,1} + \ldots + \beta_{p-1} x_{i,p-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})^\top \left(\mathbf{L} \widehat{\mathbf{V}}_n \mathbf{L}^\top\right)^{-1} (\mathbf{L}\widehat{\boldsymbol{\theta}}_n-\mathbf{h})$ \\ \begin{verbatim} > # Chi-squared critical values > df = 1:6 > Critical_Value = qchisq(0.95,df) > cbind(df,Critical_Value) df Critical_Value [1,] 1 3.841459 [2,] 2 5.991465 [3,] 3 7.814728 [4,] 4 9.487729 [5,] 5 11.070498 [6,] 6 12.591587 \end{verbatim}