% \documentclass[serif]{beamer} % Get Computer Modern math font. \documentclass[serif, handout]{beamer} % Handout mode to ignore pause statements \hypersetup{colorlinks,linkcolor=,urlcolor=red} \usefonttheme{serif} % Looks like Computer Modern for non-math text -- nice! \setbeamertemplate{navigation symbols}{} % Suppress navigation symbols % \usetheme{Berlin} % Displays sections on top \usetheme{Frankfurt} % Displays section titles on top: Fairly thin but still swallows some material at bottom of crowded slides %\usetheme{Berkeley} \usepackage[english]{babel} \usepackage{amsmath} % for binom % \usepackage{graphicx} % To include pdf files! % \definecolor{links}{HTML}{2A1B81} % \definecolor{links}{red} \setbeamertemplate{footline}[frame number] \mode \title{Chapter One of \emph{Regression Analysis}: Overview\footnote{See last slide for copyright information.}} \subtitle{STA302 Fall 2017} \date{} % To suppress date \begin{document} \begin{frame} \titlepage \end{frame} % \section{Section One} \begin{frame} \frametitle{Simple regression model} \pause %\framesubtitle{} { \Large \begin{displaymath} y_i = \beta_0 + \beta_1 x_i + \epsilon_i \pause , \end{displaymath} } % End size where \begin{itemize} \item[] $x_1, \ldots, x_n$ are observed, known constants. \pause \item[] $\epsilon_1, \ldots, \epsilon_n$ are random variables satisfying the \emph{Gauss-Markov conditions}. \pause \begin{itemize} \item[] $E(\epsilon_i)=0$ \pause \item[] $Var(\epsilon_i)=\sigma^2$ \pause \item[] $Cov(\epsilon_i,\epsilon_j)=0$ for $i \neq j$. \pause \end{itemize} \item[] $\beta_0$, $\beta_1$ and $\sigma^2$ are unknown constants with $\sigma^2>0$. \end{itemize} % 24 \end{frame} \begin{frame} \frametitle{Least Squares} \framesubtitle{Background that's not in the text} \pause \begin{itemize} \item The random variable $y$ has a distribution that depends on the parameter $\theta$. \pause \item How can we estimate $\theta$ from data $y_1, \ldots, y_n$? \pause \item The expected value $E(y)$ is a function of $\theta$. \pause \item Write it $E_\theta(y)$. \pause \item Estimate $\theta$ by the value that gets the observed data values as close as possible to their expected values. \pause \item Minimize \begin{displaymath} \mathcal{S} = \sum_{i=1}^n\left(y_i-E_\theta(y_i)\right)^2 \end{displaymath} over all $\theta$. \pause \item The value of $\theta$ that minimizes $\mathcal{S}$ is the \emph{least squares estimate}. \end{itemize} \end{frame} \begin{frame} \frametitle{Simplest example of least squares} \framesubtitle{Again, not in the text} \pause \begin{itemize} \item $y_1, \ldots, y_n$ all have $E(y_i) = \mu$. \pause \item The least squares estimate of $\mu$ is the value that makes the observed $y_i$ values as close as possible to what you would expect. \pause \item Minimize $\mathcal{S} = \sum_{i=1}^n\left(y_i-\mu\right)^2$ \pause \end{itemize} \begin{eqnarray*} \frac{d \mathcal{S}}{d\mu} & = & \frac{d}{d\mu} \sum_{i=1}^n\left(y_i-\mu\right)^2 \\ & = & \sum_{i=1}^n \frac{d}{d\mu} \left(y_i-\mu\right)^2 \pause \\ & = & 2 \sum_{i=1}^n \left(y_i-\mu\right) \, (-1) \pause \\ & \stackrel{set}{=} & 0 \end{eqnarray*} \end{frame} \begin{frame} \frametitle{Continuing the calculation: $-2 \sum_{i=1}^n \left(y_i-\mu\right) = 0$ \pause } %\framesubtitle{} \begin{eqnarray*} & \Rightarrow & \sum_{i=1}^n \left(y_i-\mu\right) = 0 \pause \\ & \Rightarrow & \sum_{i=1}^n y_i - \sum_{i=1}^n\mu = 0 \pause \\ & \Rightarrow & \sum_{i=1}^n y_i - n\mu = 0 \pause \\ & \Rightarrow & \sum_{i=1}^n y_i = n\mu \pause \\ & \Rightarrow & \mu = \frac{1}{n}\sum_{i=1}^n y_i \pause = \overline{y} \pause\\ \end{eqnarray*} So the least-squares estimate of $\mu$ is $\overline{y}$. \end{frame} \begin{frame} \frametitle{Least squares regression} \framesubtitle{Minimize $\mathcal{S} = \sum_{i=1}^n\left(y_i-E_\theta(y_i)\right)^2$} \pause \begin{itemize} \item Model equation is $y_i = \beta_0 + \beta_1 x_i + \epsilon_i$ \pause \item $E(y_i) = \beta_0 + \beta_1 x_i$ \pause \item Minimize $\mathcal{S} = \sum_{i=1}^n\left(y_i - \beta_0 - \beta_1 x_i \right)^2$ \pause over $\theta = (\beta_0,\beta_1)$. \pause \item Take partial derivatives, set to zero, solve two equations in two unknowns. \pause \item Least squares estimate of $\beta_0$ is $b_0$. \pause Least squares estimate of $\beta_1$ is $b_1$. \end{itemize} \end{frame} \begin{frame} \frametitle{Vocabulary and concepts in Chapter One} \framesubtitle{A preview of almost the entire course} \pause $y_i = \beta_0 + \beta_1 x_i + \epsilon_i$ \pause \begin{itemize} \item Linear regresson means linear in the $\beta$ parameters. \pause \item Polynomial regression $y_i = \beta_0 + \beta_1 x_i + \beta_2 x_i^2 + \epsilon_i$, etc. \pause \item Centered model $y_i = (\beta_0 + \beta_1\overline{x}) + \beta_1 (x_i-\overline{x}) + \epsilon_i$ \pause \item Predicted value $\widehat{y}_i = b_0 + b_1 x_i$ \pause \item Residual $e_i = y_i-\widehat{y}_i$ \pause \item Plotting residuals (p.5) to diagnose problems with the model. \pause \item Gauss-Markov conditions. \pause \item Measure of model fit $R^2$ \pause \item Mean and variance of $b_0$ and $b_1$. \pause \item Confidence intervals and tests. \pause \item Predicting future observations. \end{itemize} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \frametitle{Copyright Information} This slide show was prepared by \href{http://www.utstat.toronto.edu/~brunner}{Jerry Brunner}, Department of Statistical Sciences, 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/302f17} {\small\texttt{http://www.utstat.toronto.edu/$^\sim$brunner/oldclass/302f17}} \end{frame} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \frametitle{} %\framesubtitle{} \begin{itemize} \item \item \item \end{itemize} \end{frame} {\LARGE \begin{displaymath} \end{displaymath} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%