% This is a simple LaTex sample document that gives a submission format
%   for IEEE PAMI-TC conference submissions.  Use at your own risk.

% Make two column format for LaTex 2e.
\documentclass[11pt,twocolumn]{article} %,twocolumn
\usepackage[dvips]{graphicx,graphics}
%\usepackage{times,amsmath,amsfonts}

% Use following instead for LaTex 2.09 (may need some other mods as well).
% \documentstyle[times,twocolumn]{article}

% Set dimensions of columns, gap between columns, and paragraph indent
\setlength{\textheight}{9.2in} \setlength{\textwidth}{6.875in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0in} \setlength{\headsep}{-1in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.1875in}  % Centers text.
\setlength{\evensidemargin}{-.1875in}

% Add the period after section numbers.  Adjust spacing.
\newcommand{\Section}[1]{\vspace{-8pt}\section{\hskip -1em.~~#1}\vspace{-3pt}}
\newcommand{\SubSection}[1]{\vspace{-3pt}\subsection{\hskip -1em.~~#1}
        \vspace{-3pt}}
\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand {\diff}[1] {\frac{\partial}{\partial #1}}
\newcommand{\jacob}[3]{\frac{\partial^2 #3}{\partial #1 \partial #2}}
\newcommand{\der}[2]{\frac{\partial #2}{\partial #1}}
\begin{document}

% Make title bold and 14 pt font (Latex default is non-bold, 16pt)
\title{Stat 312: Lecture 21\\
Correlations}

% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle
\thispagestyle{empty}
\section*{Concepts}
\begin{enumerate}
\item The {\em coefficient of determination} $r^2 =
S_{xy}^2/S_{xx}S_{yy}$.

\item The {\em sample correlation coefficient} $r$ is defined as
$r = S_{xy}/\sqrt{S_{xx}S_{yy}}.$ In Lecture 20, we showed that
$0 \leq r^2 \leq 1$. Hence $-1 \leq r \leq 1$.

\item $r=0$ if and only if paired observations $(x_j,y_j)$ pass
through the same straight line. From Lecture 20 example 2, if
$(x_j,y_j)$ pass through a circle, $r=0$. So $r$ can be used to
measure if the paired observations show linear relationship.

\item {\em Population correlation coefficient} $$\rho(X,Y) =
\frac{{\bf Cov}(X,Y)}{\sqrt{{\bf Var}(X){\bf Var}(Y)}}$$.
\end{enumerate}

\section*{In-class problems}
{\em Example 1.} Is there any linear relationship between the
mathematical achievement test scores ($x_i$) and calculus grades
($y_i$) for 10 college freshmen?\\
x$\|39,43,21,64,57,47,28,75,34,52$\\
y$\|65,78,52,82,92,89,73,98,56,75$
\begin{verbatim}
> cor(x,y)
[1] 0.8397859
\end{verbatim}
\begin{figure}[t]
\centering
\renewcommand{\baselinestretch}{1}
\includegraphics[scale=0.26]{positivecor.ps}
\caption{Complete lack of linear fit.}
\end{figure}
\begin{figure}%[t]
\centering
\renewcommand{\baselinestretch}{1}
\includegraphics[scale=0.26]{negativecor.ps}
\caption{Complete lack of linear fit.}
\end{figure}
{\em Example 2.} Is there any relationship between the number of
times you miss submitting homeworks ($x_i$) and the final grade ($y_i$)?\\
x$\|03,04, 01,02,01,00,00,07,08,05$\\
y$\|70,75,80,75,85,95,90,70,50,60$
\begin{verbatim}
> cor(x,y)
[1] -0.8938321
\end{verbatim}
\section*{Self-study problems}
Please read P.529. Example 12.14.
\section*{Homework 7} Due April 29. 11:00am.\\
12.30., 12.36., 12.58., 12.60.,12.66.


\end{document}
