\documentclass[11pt]{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 431s17 Formulas}}\footnote{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/431s17} {\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/431s17}} }\\ \vspace{3 mm} \noindent \renewcommand{\arraystretch}{1.75} \begin{tabular}{ll} $Var(X) = E\left\{(X-\mu_{_x})^2 \right\} = E(X^2)-\mu_x^2$ & $Cov(X,Y) = E\left\{ (X-\mu_{_x})(Y-\mu_{_y}) \right\} = E(XY)-\mu_x\mu_y$ \\ $Corr(X,Y) = \rho_{xy} = \frac{Cov(X,Y)}{\sigma_x\sigma_y}$ & $r_{xy} = \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}}$ \\ $cov(\mathbf{X}) = E\left\{(\mathbf{X}-\boldsymbol{\mu}_x)(\mathbf{X}-\boldsymbol{\mu}_x)^\top\right\}$ & $cov(\mathbf{X,Y}) = E\left\{ (\mathbf{X}-\boldsymbol{\mu}_x) (\mathbf{Y}-\boldsymbol{\mu}_y)^\top\right\}$ \\ $cov(\mathbf{AX}) = \mathbf{A}\boldsymbol{\Sigma}_x\mathbf{A}^\top$ & $cov(\mathbf{AX},\mathbf{BX}) = \mathbf{A}\boldsymbol{\Sigma}_x\mathbf{B}^\top$ \\ $\mathbf{L} = \mathbf{A}_1\mathbf{X}_1 + \cdots + \mathbf{A}_m\mathbf{X}_m + \mathbf{b}$ & $\stackrel{c}{\mathbf{L}} = \mathbf{A}_1 \stackrel{c}{\mathbf{X}}_1 + \cdots + \mathbf{A}_m \stackrel{c}{\mathbf{X}}_m$ \\ $cov(\mathbf{L}) = E(\stackrel{c}{\mathbf{L}}\stackrel{c}{\mathbf{L}} \stackrel{\top}{\vphantom{r}})$ & $cov(\mathbf{L}_1,\mathbf{L}_2) = E(\stackrel{c}{\mathbf{L}}_1\,\stackrel{c}{\mathbf{L}} \stackrel{\top}{\vphantom{r}_2})$ \\ $f(x|\mu,\sigma^2) = \frac{1}{\sigma \sqrt{2\pi}} \exp \left\{-\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2}\right\}$ & $f(\mathbf{x}|\boldsymbol{\mu,\Sigma}) = \frac{1}{|\boldsymbol{\Sigma}|^{\frac{1}{2}} (2 \pi)^{\frac{p}{2}}} \exp\left\{ -\frac{1}{2} (\mathbf{x}-\boldsymbol{\mu})^\top \boldsymbol{\Sigma}^{-1}(\mathbf{x}-\boldsymbol{\mu})\right\}$ \\ \multicolumn{2}{l} {If $\mathbf{X} \sim N(\boldsymbol{\mu},\boldsymbol{\Sigma} )$, then $\mathbf{AX} + \mathbf{b} \sim N_p(\mathbf{A}\boldsymbol{\mu} + \mathbf{b}, \mathbf{A}\boldsymbol{\Sigma}\mathbf{A}^\top )$.} \\ \multicolumn{2}{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{x}}-\boldsymbol{\mu})^\top \boldsymbol{\Sigma}^{-1} (\overline{\mathbf{x}}-\boldsymbol{\mu}) \right\}$ } \\ $\boldsymbol{\widehat{\Sigma}} = \frac{1}{n}\sum_{i=1}^n (\mathbf{x}_i-\overline{\mathbf{x}}) (\mathbf{x}_i-\overline{\mathbf{x}})^\top $ & $G^2 = -2 \ln \left( \frac{\max_{\theta \in \Theta_0} L(\theta)} {\max_{\theta \in \Theta} L(\theta) } \right) = -2 \ln \left( \frac{L(\widehat{\theta}_0)}{ L(\widehat{\theta}) }\right)$ \\ If $W=X+e$, & Reliability is $Corr(W,X)^2 = \frac{\sigma^2_x}{\sigma^2_x+\sigma^2_e}$ \\ % & \\ % To make a space \multicolumn{2}{c} {\sffamily The Double Measurement Model in centered form:~~~~~~~~~~~~} \\ $\mathbf{Y}_i = \boldsymbol{\beta} \mathbf{X}_i + \boldsymbol{\epsilon}_i$ & $cov(\mathbf{X}_i)=\boldsymbol{\Phi}_x$, $cov(\boldsymbol{\epsilon}_i)=\boldsymbol{\Psi}$ \\ ${\mathbf{F}}_i = \left( \begin{array}{c} {\mathbf{X}}_i \\ {\mathbf{Y}}_i \end{array} \right)$ & \hspace{-2.4mm}\begin{tabular}{l} $\mathbf{X}_i$ is $p \times 1$, $\mathbf{Y}_i$ is $q \times 1$, $\mathbf{F}_i$ is $(p+q) \times 1$ \\ $cov(\mathbf{F}_i) = \boldsymbol{\Phi}$ \end{tabular} \\ ${\mathbf{D}}_{i,1} = {\mathbf{F}}_i + \mathbf{e}_{i,1}$ & $cov(\mathbf{e}_{i,1})=\boldsymbol{\Omega}_1$, $cov(\mathbf{e}_{i,2})=\boldsymbol{\Omega}_2$ \\ ${\mathbf{D}}_{i,2} = {\mathbf{F}}_i + \mathbf{e}_{i,2}$ & $\mathbf{X}_i$, $\boldsymbol{\epsilon}_i$, $\mathbf{e}_{i,1}$ and $\mathbf{e}_{i,2}$ are independent. \\ \multicolumn{2}{c} {\sffamily The General Structural Equation Model in centered form: ~~~~~~} \\ $\mathbf{Y}_i = \boldsymbol{\beta} \mathbf{Y}_i + \boldsymbol{\Gamma} \mathbf{X}_i + \boldsymbol{\epsilon}_i$ & $cov(\mathbf{X}_i)=\boldsymbol{\Phi}_x$ and $cov(\boldsymbol{\epsilon}_i)=\boldsymbol{\Psi}$\\ $\mathbf{F}_i = \left( \begin{array}{c} \mathbf{X}_i \\ \mathbf{Y}_i \end{array} \right)$ & $cov(\mathbf{F}_i) = \boldsymbol{\Phi} = \left( \begin{array}{c c} \boldsymbol{\Phi}_{11} & \boldsymbol{\Phi}_{12} \\ \boldsymbol{\Phi}_{12}^\top & \boldsymbol{\Phi}_{22} \\ \end{array} \right)$ \\ $\mathbf{D}_i = \boldsymbol{\Lambda}\mathbf{F}_i + \mathbf{e}_i$ & $cov(\mathbf{e}_i) = \boldsymbol{\Omega}$ \\ $\mathbf{X}_i$, $\boldsymbol{\epsilon}_i$ and $\mathbf{e}_i$ are independent. & $\mathbf{X}_i$ is $p \times 1$, $\mathbf{Y}_i$ is $q \times 1$, $\mathbf{D}_i$ is $k \times 1$. \\ $\boldsymbol{\Phi}_x$ and $\boldsymbol{\Psi}$ are positive definite. & \\ % Not Omega because of the trick of adding observed variables. \end{tabular} \renewcommand{\arraystretch}{1.0} \end{center} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{verbatim} > df = 1:10; CriticalValue = qchisq(0.95,df); cbind(df,CriticalValue) df CriticalValue [1,] 1 3.841459 [2,] 2 5.991465 [3,] 3 7.814728 [4,] 4 9.487729 [5,] 5 11.070498 [6,] 6 12.591587 [7,] 7 14.067140 [8,] 8 15.507313 [9,] 9 16.918978 [10,] 10 18.307038 \end{verbatim}