\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{fact}[example]{Fact}
\newtheorem{notation}[example]{Notation}

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

\definecolor{bgblue}{rgb}{0.03,0.39,0.23}
\vpagecolor{bgblue}

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

\begin{document}

{\Large Working with normal distributions}

Normal distributions arise in many settings. \pz
For example, if you had a large number of people (millions, say)
flip a coin 1000 times and took a histogram according to the
number of times Heads came up, you would see a normal
distribution with median at 500. \pz
Last time we developed the normal distribution and started to 
extract statistical facts from the two numbers,
mean and standard deviation, which describe a 
normal distribution. \pz  We will continue learning such
techniques this time, doing a number of exercises and learning
the concept of $z$-values. \pz

First, let's recall the basic outline of how data falls in
a normal distribution, and how we may use that to estimate
in some examples. \pz

All normal distributions are similar, when the distribution is
expressed in terms of the mean, $\mu$, and standard deviation, $\sigma$. \pb

\begin{fact}[The 68-95-99.7 rule]
Given normally distributed data (height, test scores, etc.)
\begin{enumerate}
\item 68\% of observations fall within $\sigma$ of $\mu$.
\item 95\% of observations fall within $2\sigma$ of $\mu$.
\item 99.7\% of observations fall within $3\sigma$ of $\mu$. \pz
\end{enumerate}
Thus roughly $2/3$ of observations fall within one standard deviation.
Almost all observations fall within three standard deviations.\pb
\end{fact}
\pause 

We often use the shorthand $N(\mu, \sigma)$ for the normal
distribution with mean $\mu$ and standard deviation $\sigma$. \pz

\begin{example}
The height of adult males in the U.S. is normally
distributed according to $N (\mu ,\sigma)$ with
\[
\mu  =69.3 \mbox{ and } \sigma =2.8
\]
in inches.  \pause
Where, then, does today's lecturer Prof. Budney fit in
this distribution?  Roughly, what percentage of men are shorter than he is? \pb
\end{example}

\begin{example}
Birth weight of babies born in the US is normally
distributed with 
\[
\overline{x} = 7.31 \mbox{ pound, and } s = 1.26 \mbox{ pounds.}  \pz
\]
\pz  Prof. Sinha's daughter Kiri was born at 6.12 pounds (6 pounds, 2 ounces).  
Roughly, what 
percentage of babies are born smaller than she?\pb
\end{example}

{\Large $z$-scores and comparing data on different distributions} \pz

Let's start with an example question:
Who's taller for their gender?  A 75 inch tall man, or a 72 inch tall
woman? \pz  (Who ranks more highly in terms of percentiles?) \pz

Male height distribution is $N (69.3,2.8)$.  So our man is height 5.7
inches taller than the mean $\mu$.  \pz But in order to figure
out where he is in terms of percentiles, we would need to know
how many $\sigma$'s (standard deviations) he was away from average. \pz
This is a matter of arithmetic:  $5.7 = 2.04\sigma$.  So our man's height
is $\mu +2.04\sigma$ because $75 = 69.3 + 2.04 \times 2.8$. \pz

Female height distribution is $N (64,2.7)$.  So our woman is 8 inches
taller than average.  We similarly compute that $8=2.96\sigma$, and
thus our woman's height is $\mu + 2.96 \sigma$. \pz

We don't need to compute the actual percentages to deduce that 
our woman is taller for a woman (more standard deviations above the
mean) than our man is for a man. \pause   

Notice that the numbers we are
looking (the multiples of the standard deviation by which our
observation is above or below the mean) are given by subtracting
the mean and then dividing by the standard deviation. \pz
The resulting numbers are called \emph{$z$-scores}. \pz


\begin{definition}
Given an observation $x$ among normally distributed data with
distribution $N (\mu ,\sigma)$, the $z$-score for $x$ is 
\[
\frac{x-\mu}{\sigma}.
\]
$z$-scores are also sometimes called standardized variables.
\end{definition} \pb

The $z$-score measures how many standard deviations $x$ is above the mean $\mu$
(or below, if the $z$-score is negative). \pz
It is a standard statistical measure. \pz For example, the class evaluations
you fill out at the end of each quarter get compiled within each department,
and instructors see their $z$-scores. \pz  If an instructor has $z$-scores
above $1$ or below $-1$ he or she is considered particularly good or, respectively,
bad - why would this be?  \pb


\begin{example}
If a professor gets an average score of $9.1$ on an item where the department
average is $8.6$ and the standard deviation is $0.45$, what is her $z$-score 
on this item? \pz  If instead her average was $8.2$, what would her $z$-score
be? \pz
\end{example}

But the use of $z$-scores to evaluate teaching might have its problems.  \pz
First of all, will these scores be normally distributed?  (Think about whether the scores 
are ``cut off'' anywhere, and what that might do to the distribution).   \pz
Also, the $z$-scores tend to correlate with the grades students
are expecting - why would this be? \pz  (Correlations will be a big topic later in the term.) \pz


\pb

{\Large Using $z$-scores to calculate proportions} \pz

We did some of these kinds of questions informally before,
but with $z$-scores we can answer them precisely. \pz

\begin{example}
Birthweight in the United States is normally
distributed according to $N (7.31, 1.26)$.  Precisely
what proportion of babies are born
over 8 pounds? \pz
\end{example}

\includegraphics[height = 10cm]{Figures/birth-weight-dist.jpg} \pb

The steps we take to solve this problem are:
\begin{enumerate}
\item Compute the standardized variable (or $z$-score)
associated to this variable.  \pz In this case $z = .548$. \pz
\item Now we want to know how many babies are born with standardized
variable $z\geq .548$. \pause  
We look $.548$ up in Table A in the appendix.  First we round
to $.55$.  This number is in the 6th row and 6th column, and is
$.7088$. \pause  A way to think of this number is that the area under the standardized
normal curve with $z\leq .55$ is
.7088, while the area under the whole curve is 1. \pz
\item Finally, we translate this into a percentage.  This means 70.88\% of the
observations of $x$ satisfy $x \leq \mu +.55\sigma$.  So about 71\% of
babies are born less than 8 pounds, and about 29\% of babies are born
above 8 pounds.\pause 
\end{enumerate}

These three steps are worth repeating. \pb

If $x$ is observed in a normal distribution, then to find the percentile associated
to $x$ we:
\begin{enumerate}
\item Compute the associated $z$-score, or standardized variable.
\item Look up the $z$-score in Table A, to get an associated fraction.
\item Multiply by 100 to get a percentage score.
\end{enumerate} \pb

\begin{example}
What proportion of babies are born under 5 pounds? \pz
\end{example}

\begin{example}
What proportion of babies are born between 6
pounds and 8 pounds?  \pz (For problems like this, it is especially helpful
to draw a picture.) \pb
 \end{example}
 
{\Large Calculating variable ranges from proportions} \pz
 
The process we followed above can be reversed in order to find
specifications associated to percentages. \pz  We must use
Table A in reverse.

\begin{example}
You manufacture batteries whose duration times are
normally distributed with a mean of 80 hours and a standard deviation
of 10 hours.  You wish to guarantee to replace batteries that fail
before a certain time.  \pz
What time should you choose if you wish to ensure that you replace at
most 2.5\% of the batteries?\pz
\end{example}

We need to find a time $T$ so that $x \leq T$ only 2.5\% of the time
where $x$ is a variable with distribution $N (80,10)$.\begin{enumerate}
\item Convert 2.5\% into a decimal number.  It is 2.5 hundredths, so
it is $.025$.\pause 
\item Find $.025$ in the \emph{inside} of Table A.    This corresponds
to -2.81.  So the area under the part of the standardized normal curve
$z \leq -2.81$ is $.025$.\pause 
\item Unstandardize:  $z\leq -2.81$ is the same as 
\[
\frac{x-80}{10} \leq -2.81 \mbox{ or } x-80 \leq -28.1 \mbox{ or } x
\leq 51.9. \pz
\]
So if we take $T=51.9$  ($T=50$ might make better ad copy), you can
guarantee to replace batteries that die in less that 51.9 hours and be
confident that will be no more that 2.5\% of your batteries.
\end{enumerate}\pb

In general (for those who like formulae to follow), 
suppose $x$ is a normally distributed
variable with distribution $N (\mu ,\sigma)$ and you wish to find a
value $C$ so that K\% of the observations of $x$ satisfy $x \leq C$.
Take the following steps: \pz

\begin{enumerate}
\item Find $K/100$ inside of Table A.  Take the correspondong value,
call it $U$. \pz
\item Then K\% of observations of the standard normal variable $z$
will satisfy $z \leq U$. \pz
\item Unstandardize:  $z \leq U$ is the same as 
\[
\frac{x - \mu }{\sigma} \leq U \mbox{ or } x-\mu \leq \sigma U \mbox{
or } x \leq \sigma U + \mu. \pz
\]
So $C = \sigma U + \mu$. \pb
\end{enumerate}

\begin{example}
Suppose a professor has pre-ordained that 20\% of his
class should get A's, 40\% get B's, 30\% get C's, 5\% D's
and 5 \% get F's.  \pz (Such a system of pre-ordained percentages
is called ``grading on the (bell) curve'', a standard practice at places
like MIT, but not one that Prof. Sinha is a fan of.)  \pz  Suppose the final grade averages are 
normally distributed with an mean of $72$ and a standard deviation
of $8$.  \pz  Where should the grade lines be set to achieve the percentages
of this system?
\end{example}






\end{document}
 