\documentclass[30pt,landscape]{foils}

\usepackage{amsmath}

\usepackage{pause}               \usepackage{background}
\usepackage{graphicx}           \usepackage{geometry}
\usepackage{hyperref}

\usepackage{pp4slide}
\geometry{headsep=3ex,hscale=0.9}

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}


\newcommand{\pz}{\pause}
\newcommand{\pb}{\pagebreak}

\definecolor{bgblue}{rgb}{0.03,0.39,0.23}
\vpagecolor{bgblue}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}

\hypersetup{pdftitle={lecture},
  pdfsubject={A mathematics lecture},
  pdfauthor={Dev Sinha, University of Oregon},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor={red}
}


\begin{document}

{\Large Math 243: Introduction to Methods of Probability and Statistics}
\pb


Statistics, while originally developed for the physical sciences, 
now pervade the social sciences, politics, sports, and business.  \pz
Most articles in the main section of the newspaper (as well as the 
sports section) contain statistics
(especially now that polling data fills the news). \pz

But statistics can be misleading \pz in a couple of ways, \pz
and one of the main goals of this course is for you to be equipped to
judge the mathematical significance of statistics you encounter. \pz

Before going into the mathematics, let us clarify a common
non-mathematical way in which statistics can be misleading,
namely by telling only part of the story. \pz

For example, in the Register-Guard one can on occasion read 
arguments which bring up the fact that Oregon has the third-highest income
tax in the country to imply that our taxes are extraordinarily high. \pz  
But in total tax bill \pz
(including for example sales tax), \pz 
Oregon ranks 34th according to the Tax Foundation. \pb

Spotting incomplete,
misleading statistics, \pz is more a matter of common sense and experience. \pz

But even statistics which should tell the whole story can be
misunderstood unless we understand the ``shape'' of the data.   \pb

For example, suppose hypothetically that in total tax bill 
the data was:\\ \pz
NY 15\%; CA 14\%; OR 10.05\%; ... lots of other states between 9.5 and 10 \%; ... 
MS 7\% etc. \pz
Then one could rightly say that Oregon had the third-highest amount
of taxes, but would that imply that its taxes are out of line? \pz

One can loosely say that statistics is a set of tools which measure,
in various ways, the shape of data.  \pz   Let's get started putting
together those tools. \pb


{\large Review of chapter 1} \pz

We typically describe the distribution of a variable \pz 
(which always represents some quantity we want to measure)\pz 
by a \textbf{bar graph} or
\textbf{pie chart} or \textbf{table} if it is a categorical variable. \pz

We describe the distribution of a quantitative variable by a list of values or,
more often, a \textbf{histogram.}  \pz A description of the data usually includes \pz
\begin{itemize}
\item \emph{Center}:  This is the \textbf{median} value.  It is either the
middle value (if there are an odd number of values), or half-way
between the two middle values if there are an even number of values.
\pause 
\item \emph{Spread}:  We'll talk more about this in the next section.
A crude measure of spread is given by two numbers: the distance of the
lowest value from the center, and the distance of the largest value
from the center. \pz

\item \emph{Shape}.  \pz \\ 
The data is \textbf{symmetric} if the histogram
to the left of the center looks like a mirror image of the histogram
to the right of the center.  Histograms will almost never be perfectly
symmetric - we are only worried about approximate symmetry here. \pz

The data is \textbf{left skewed} if the data extends further to the
left of center than to the right of center.  (And of course
\textbf{right skewed} is \emph{vice versa}.) \pz

The data is in \textbf{clusters} if there is more than one region in
which a lot of the data is concentrated. \pz

It is usually interesting to try to understand \emph{why} the data has
the shape that it has.  \pz For example, let's think about the shape
of a histogram of heights of people. \pz
\end{itemize}


Final note:  will not stemplots or time plots in class, but will
expect you to be able to make them when necessary.

\pb

{\large Chapter 2.  Summarizing distributions numerically.} \pz

\textsc{\blue{Mean:}}

We assume we have a list of $n$ values for some variable
\[
x_{1},\dots ,x_{n}.
\]
The \textbf{mean} of this set of values is 
\[
\overline{x} = \frac{x_{1}+\dots +x_{n}}{n} = \frac{1}{n}\sum_{i=1}^{n}x_{i}.
\]
This is another possible measure of the center (besides the median,
which we've already discussed).  

\pause 
EXAMPLE: State populations.  From our data, 
\begin{eqnarray*}
\mbox{median} = M & = & 4.01 \mbox{ million}\\
\mbox{mean} = \overline{x} & = & 5.51 \mbox{ million}
\end{eqnarray*}
This is typical of a distribution skewed to the
\textbf{\blue{right}}; in that case the mean will be further to the
\textbf{\blue{right}} than the median. \pz


In general the mean is much more sensitive to outliers than the median
is.  Because of this the median is called a \textbf{resistant measure}
in that it resists distortion by outliers.  Whereas the mean is
\emph{not} a resistant measure.

\pz

\begin{example}
  Suppose we pick 10 people at random and find out what their
annual incomes are in thousands of dollars.  
\[
45, 18, 25, 29, 37, 12, 82, 130, 21, 19.
\]
What are the median and mean?\pz
%\begin{eqnarray*}
%M & = & 27 \mbox{ thousand}\\
%\overline{x} & = & 41.8 \mbox{ thousand}
%\end{eqnarray*}

Now suppose we pick one more person at random, and this person happens
to be Bill Gates, whose annual income is something like 1.9 billion
dollars. Now our distribution is (still in thousands of dollars)
\[
45, 18, 25, 29, 37, 12, 82, 130, 21, 19, 1.9\times 10^{6}
\]
What are the median and mean now?
\pz
%\begin{eqnarray*}
%M & = & 29 \mbox{ thousand}\\
%\overline{x} & = & 1,727 \mbox{ thousand}
%\end{eqnarray*}
\end{example}
We see that although we shifted the median only slightly, the
mean has been shifted dramatically.  \pz (Does this imply that the
mean is always the right thing to measure?) \pz

\pb 
\textsc{\blue{Quartiles:}}

The mean and median give measures of the center of the distribution.  The
quartiles give partial information about the spread of the
distribution.  \pz

The \textbf{first quartile}, $\mathbf{Q}_{1}$ is the median of
the data below the overall median.  In other words,  $\frac{1}{4}$ or $25\%$ 
of the list should be below $\mathbf{Q}_{1}$, and $\frac{3}{4}$ of the list should
be above $\mathbf{Q}_{1}$. \pz

The \textbf{second quartile} is the median.  \pz

The \textbf{third quartile}, $\mathbf{Q}_{3}$ is the median of the
data above the 
overall median.  In other words, $\frac{3}{4}$ of the list should be
below $\mathbf{Q}_{3}$ and $\frac{1}{4}$ of the list should be above
$\mathbf{Q}_{3}$. \pb


\textsc{\blue{Five-number summary and boxplots}}

The \textbf{five-number summary} for a list of observations of a variable is: \pz
\[
\mbox{Minimum}, \pz Q_{1}, \pz  \mbox{Median}, \pz Q_{3}, \pz \mbox{Maximum}.
\] \pz
A \textbf{boxplot} is a graphical representation of the five number
summary.
\pz


\begin{example} Calculate the five-number summary
for the price of a quart of milk in the 30 largest economies
(in US dollars), arranged in order:

1.20, 1.24, 1.32, 1.33, 1.35, 1.38, 1.43, 1.47, 1.48, 1.62, 1.84,
1.84, 1.86, 1.86, 1.95, 1.96, 2.01, 2.18, 2.18, 2.19, 2.21, 2.21,
2.29, 2.32, 2.34, 2.71, 2.71, 2,97, 3.14, 3.60, 4.10, 4.59
\end{example}
\pz

%We compute that the five-number summary is 
%\[
%1.20, 1.47, 1.955, 2.34, 4.59
%\]\pause 
Notice the skew of this distribution: \pz
The first quarter of values is spread between $1.47-1.20$, a difference of 27 cents \pz \\
The second quarter is between $1.955-1.47$, a difference of  48.5 cents \pz \\
The third quarter is between $2.34-1.955$, a difference of 38.5 cents \pz \\
The last quarter is $4.59-2.34$, a difference of  \$1.25 \pz 


\pb 

\textsc{\blue{Standard Deviation}}

The \textbf{standard deviation} is another measure of spread.  \pz


Calculating medians and quartiles involves arranging the data in
order.  Calculating \textbf{standard deviation} (like calculating the
mean) does not involve doing this, but involves more arithmetic. \pb

Let 
\[
x_{1},..,x_{n}
\]
be a list of values of our variable.  \pz $\overline{x}$ is the mean.  \pz The
standard deviation is given by 
\[
\sigma \mbox{(or $s$)} = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n}
(x_{i}-\overline{x})^{2}} 
\] \pb

We will talk more about standard deviation throughout the course. \pz
For now just note that if it is small then one expects the quartiles to be close
together, \pz and if it is large then the quartiles should be spread apart. \pz
One of our goals will be to understand why the formula above behaves
in this way, \pz and in general we will be forging links between 
intuitive notions such as ``spread'' and sometimes complicated
formulae which we use to measure these notions accurately. 

\pz



\end{document}

\pb 
\textsc{\blue{Which description?}} \pz

Use $\overline{x}$ and $s$ when you have a symmetric distribution of
data.  Use the five-number summary otherwise.

If the distribution is approximately symmetric, the median and the
mean will be close, and the quartiles will be about equally placed
around the mean.  In that case, the mean, and the standard deviation
provide a similar level of information.  

