\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 Probability}

Probability is difficult to formulate in precise mathematical terms
(though it is well worth doing so!), but we can make do with some
intuitive characterizations. \pz

\begin{definition}
Let $X$ be the outcome of some event.
\begin{itemize}
\item The outcome of $X$ is a \emph{random event} if we cannot predict
it, but the distribution of such outcomes has a regular pattern over
many repetitions.\pause 
\item $X$ is called a \emph{random variable}.\pause 
\item The \emph{sample space} is the collection all possible values $X$
could take.\pause 
\item The \emph{probability} of a certain outcome is the proportion of
times it occurs after many repetitions.\pause 
\end{itemize}
\end{definition}

\begin{example}
 We flip a coin.  It comes up heads with
probability .5.  Does this mean if we flip the coin an even number of
times, we get $\frac{1}{2}$ heads? \pause Does this even mean that
over $N$ flips, as $N$ gets large the number of heads approaches
$N/2$? \pz
\end{example}


{\Large Probability formalities} \pz


While we have yet to completely define probability, 
we can still list properties
which it must obey. \pz (These are topics from Chapter 11 which 
we cover briefly.) \pz

\begin{itemize}

\item For any event $A$, $0 \leq P (A) \leq 1$.  Probability $1$ means
$A$ is certain to happen, probability $0$ means $A$ is certain not to happen. \pz
\item If there are $D$ outcomes in the sample space which are a priori
equally likely, then the chance of achieving one of $N$ of these
outcomes is $\frac{N}{D}$. \pz
\item $P (A \; \mbox{doesn't happen}) = 1 - P (A)$. \pz
\item If event $A$ and event $B$ have no outcomes in common, 
\[
P (A \mbox{ or } B) = P (A)+P (B). \pz
\]
\item If the outcome of event $X$ is unrelated to the outcome of event
$Y$  (they are {\emph{independent}}) then 
\[
P (X=A \mbox{ and } Y=B) = P (X=A)\times  P (Y=B)
\] \pz
\end{itemize}

\newpage


\begin{example}
You roll two dice;  each die has an equal probability ($1/6$) of
showing any number out of $\{1,2,3,4,5,6 \}$.  What is the probability
of getting a 12? \pz  An 11?  \pz A 7?  \pz
\end{example}

\begin{example}
Toss two coins (a nickel and a penny).  If we are told that at
least one came up heads, what is the probability of the other coming
up heads? \pb
\end{example}

\begin{example}
 Monty Hall easy version.
There are  3 doors;  you don't know what is behind any
of them.  You are told that there is a car behind one door, and a goat
behind the other two.  You get whatever is behind the door you choose
as a prize.  So you pick a door at random.  What is your chance of
getting a car? \pb
\end{example}

\begin{example}[Monty Hall problem]
Monty Hall wants to confuse you a little bit.  You get to pick a
door.  \emph{Then} (whichever door you pick, whether there is a goat
behind it or a car) Monty opens a different door that has a goat
behind it.  (He can always do this, even if you chose a goat door,
because there are 2 goats).

Now Monty gives you the opportunity to switch doors to the other
unopened door.  Should you switch? \pb
\end{example}

{\Large More flipping coins} \pz

The example of flipping coins is as simple as
possible but lets us see many of the features which are
prominent in the general case.

\begin{example}
Do 4 flips.  Let $X$ be the outcome.  
\begin{itemize}
\item What is the sample space?  \pause 
\item What is the probability of each outcome?  
(Key point: each outcome equally likely).  \pz
%Probability of 
%$TTHT$ is $\frac{1}{16} = .0625$.\pause 
\item Let $Y$ be the random variable giving the {\emph{number of heads}}.
\item What is the sample space? \pz %\item Sample space for $Y$ is $\{0,1,2,3,4 \}$.\pause 
\item How many outcomes in the original sample space give each $Y$? \pz
\item What are the probabilities of each $Y$ in this sample space? \pz
\end{itemize}
%Probability of no heads ($P (Y=0)$) is: \pause .0625 because
%there is only one way for this to happen.\pause 
%\item Probability of one heads ($P (Y=1)$) is: \pause $\frac{4}{16}$
%because 4 out of the 16 equally likely outcomes for $X$ lead to
%$Y=1$.  This is $.25$.\pause 
%\item Probability of half heads ($P (Y=2)$) is: \pause $\frac{6}{16}$
%because 6 out of the 16 equally likely outcomes for $X$ lead to
%$Y=1$.  This is $.375$.\pause 
\end{example}

Summary of answers to last part above: \pz 
\begin{tabular}{|c|c|c|c|c|c|}
\hline
$Y$ &  0  & 1 & 2 & 3 & 4  \\ \hline
\# Outcomes & 1 & 4 & 6 & 4 & 1 \\ \hline
Probability & .0625  & .25 &  .375 & .25 & .0625  \\ \hline \pb
\end{tabular}

\pb

{\large Digression: The number of possible ways to get $Y$ heads for $N$ coin flips} \pz

We now digress into one of the most beautiful areas
of elementary mathematics.  Our digression will quickly lead us back to 
very familiar territory!
The number of ways one can get $Y$ heads in $N$ coin flips
is  well-studied in mathematics, first by Pascal.  It is called a {\emph{ binomial coefficient}},
denoted $N \choose{Y}$.  \pz

\begin{example}
Write down the first few binomial coefficients in a triangle (Pascal's triangle). \pz
What patterns do you notice: \pz
\begin{itemize}
\item What do the rows add up to? \pz
\item Are they symmetric? \pz
\item How can you find the values in a row from the previous row? \pz
\item What are other immediate patterns? \pz (Odds and evens) \pz
\end{itemize}
\end{example}

Now for the fun part: plot the values of the rows as a histogram,
where the blocks each have area $\frac{1}{2^N}$, so that the total area
is one.  \pz What do we see? - The Bell Curve is approximating the rows
of Pascal's triangle!!! (and thus modeling coin flips!). \pz
Or conversely, the numbers in Pascal's triangle are telling
us about the Bell Curve (normal distribution)! \pb

{\large Back to coin flips}

\begin{example}
 Let $Y$ be the number of heads after 10
successive coin flips.  The probabilities for $Y$ are: \pz
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
$Y$ &  0  & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10   \\ \hline
Probability & .001  & .010 &  .044 & .117 & .205 & .246 & .205 & .117 & .044 & .010 & .001\\ \hline \pz
\end{tabular}

What is the probability of between 3 and 7 heads?  \pause 
%\[
%.117 + .205 + .246 + .205 + .117 = .89
%\]
\end{example}

\begin{example}
 All 80 of us flip coins at once.  Let $Y$
be the total number of heads.\pause 

\begin{itemize}
\item We probably won't get exactly 40 heads.  The probability of that is .089\pause
\item But $P (35\leq Y\leq 45) = .781$ \pause and
\item $P (30 \leq Y \leq 50) = .982$. \pz
\end{itemize}
\end{example}

Note that as the number of trials gets very large, the probability of any
one outcome gets very small.  It starts being less relevant to ask
for example what is the probability that you would get exactly 31 heads out of 80. \pz
The answer is just too small to matter.  \pz  What works better is asking the chances
that the number of heads will be in some range. \pz  This change of emphasis
(from ``individual'' measurement to ranges) is important when we look at
continuous variables. \pz

\newpage

{\Large Continuous (vs. discrete) 
random variables}.

\begin{itemize}
\item If a random variable $X$ takes on a finite number of possible
values,  it is called a \emph{ {discete}} random variable. \pz  All
of our examples so far have been discrete. \pz
\item If a random variable $X$ takes on a \emph{range} of possible
values,  it is called a \emph{ {continuous}} random variable. \pz
\item The  {sample space} is still the collection of possible
values for $X$. \pz
\item It no longer makes sense to ask what $P (X=a)$ is, but rather
what is $P (a \leq X \leq b)$.\pause 
\end{itemize}


\begin{example}
Let $X$ be a number randomly chosen between $0$
and $1$.  (Note that it is hard to randomly choose numbers in this
fashion.)\pause 
 \begin{itemize}
\item What is $P (X=.3)$  %The probability of $X$ being any specific
%number is $0$.
\item If we assume all choices between $0$ and $1$ are equally likely,
 what is $P (X \geq .5)$. \pause 
 %Since that
%is half the interval, the probability is .5.\pause 
\item What is $P (X \leq .3 \mbox{ or } X \geq .6)$?  \pause 
%This is 7
%tenths of the interval, so the probability is .7\pause 
\end{itemize}
\end{example}

The probabilities end up corresponding to (ratios of) lengths within
these state spaces.  Probabilities can also correspond to 
(ratios of) areas. \pz

\begin{example}
If a dartboard is 8 inches in radius and the center circle is $\frac{1}{2}$ inch in radius,
what is the probability that a dart thrown at random will hit the center square? \pz
What is the probability that a dart thrown at random will hit in the 20-point wedge? \pz
\end{example}



\end{document}
 