%% LyX 1.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\setlength\parskip{\medskipamount}
\setlength\parindent{0pt}

\makeatletter


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.0in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.2in}
\setlength{\columnseprule}{0.4pt}

\usepackage{times}
\usepackage{fancyheadings}
\usepackage[dvips]{graphicx}

\makeatother

\begin{document}

\Large

\title{Dealing with ``And'', ``Or'' in Probability Computations}

\author{}

\date{}

\maketitle

\pagestyle{fancy} 
\chead{}
\cfoot[]{III.\thepage:  Probability for Kids,
\copyright{2002}, N. Matloff, University of California, Davis}

{\bf Example:}

\begin{quote}

A certain pair of games, Game A and Game B, work as follows.

You toss a die until get get a total of a least 4 dots from all of your
tosses.  If you are playing Game A, you win if your final total is
exactly 5.  If you are playing Game B, you win if your total is exactly
6.

The rules say you must choose your game, A or B, \underline{before}
you start playing.  Which one gives you a better chance of winning?

\end{quote}

Kind of hard...let's work on an easier problem first and come back to
this one.

\newpage 

\

{\bf Example:}

\begin{quote}

Suppose we have 2 jars, named Jar I and Jar II.  Jar I
contains 10 green jelly beans and 5 purple jelly beans, and Jar II
contains 4 jelly beans of each color.  

We draw out one jelly bean at random from Jar I, and then put it in Jar
II.  We then mix up Jar II and draw one jelly bean at random from Jar II. 

We wish to find the following probabilities:

\begin{itemize}

\item P(bean from I is purple and bean from II is green)

\item P(bean from II is green)

\item P(at least 1 of the 2 beans drawn is green)

\end{itemize}

\end{quote}

\newpage 

\

Keep in mind what those probabilities mean.  Say we repeat the experiment
many, many times, keeping a record in a notebook.  Each line of the
notebook records what happened in one repetition of the experiment.
The notebook might look like this:

\begin{verbatim}

  outcome    p from I,  g from II?    at least 
             then g                     1 g?
             from II?

p I, g II    yes          yes           yes
p I, g II    yes          yes           yes
g I, g II     no          yes           yes
p I, g II    yes          yes           yes
p I, p II     no           no            no
g I, p II     no           no           yes
p I, g II    yes          yes           yes
p I, p II     no           no            no
g I, p II     no           no           yes
...
...

\end{verbatim}

\newpage

\ 

Say we do this experiment 10,000 times.  Then

\begin{itemize}

\item 
P(purple from I, green from II) is (approximately) the fraction of lines
with ``yes'' in that second column

\item 
P(green from II) is (approximately) the fraction of lines
with ``yes'' in that third column

\item 
P(at least 1 bean drawn is green) is (approximately) the fraction of lines
with ``yes'' in that fourth column

\end{itemize}

\newpage

\ 

We can also talk about {\bf conditional} probabilities, such as

\begin{quote}
P(bean from II is green {\Huge |} bean from I is purple)
\end{quote}

That vertical bar, {\Huge |}, is pronounced ``given.'' We read 

\begin{quote}
P(bean from II is green {\Huge |} bean from I is purple)
\end{quote}

aloud as ``the probability that the
bean from Jar II is green, \underline{given} that the bean from Jar I
is purple.''  It means this:

\begin{quote}

Say you have just drawn a bean from Jar I, and you saw that it is purple.
You threw it into Jar II, and you are just about to draw a bean from Jar
II.  There are now 4 green and 5 purple beans in Jar II.  So, your
chances of now getting a green bean from Jar II are 4 out of 9.  So,

P(bean from II is green {\Huge |} bean from I is purple) = $\frac{4}{9}$.

\end{quote}

Note that that means if you do the experiment, say, 10,000 times, then
{\bf among those notebook lines in which the bean from Jar I is purple,
4/9 of those lines} will have the bean from Jar II being green.



\newpage

\ 

Now, how do we find those probabilities?

We \underline{could} try ``enumerating'' (that means listing) all the
possible outcomes of this experiment.  But there are too many of them!
And it would be worse with three jars, etc.  (In some problems, there
are even infinitely many possible outcomes.)

So, we need better ways.

First, we need 

{\bf Handy Rule \#1:}

\begin{quote}

Say A and B are two ``events'' involving an experiment.  

Then P(A and B) = P(A) $\times$ P(B {\Huge |} A).

\end{quote}

\newpage

\ 

So now we can find P(I purple and II green).  Here 

\begin{quote}

A = ``the bean from I is purple''

B = ``the bean from II is green''

\end{quote}

$$
P(I~purple~and~II~green) = P(I~purple) \times 
P(II~green {\Huge |} I~purple) 
$$

So

$$
P(I~purple~and~II~green) = \frac{5}{15} \times \frac{4}{9}
= \frac{4}{27}. 
$$

\newpage

\

Now, what about P(bean from II is green)?

{\bf Handy Rule \#2:}

\begin{quote}

``Break big events into small events.''

That means to break the event you have into a bunch of ``and'' and
``or'' sub-events.

\end{quote}

Here, that means, break 

\begin{quote}
``bean from II is green''
\end{quote}

into

\begin{quote}
``I purple and II green or I green and II green''
\end{quote}  

So

P(bean from II is green) = 

P(I purple and II green or I green and II green)

Now, what do we find that?

\newpage

\ 

{\bf Handy Rule \#3:}

If the events A and B don't overlap, then

\begin{quote}
P(A or B) = P(A) + P(B)
\end{quote}

We can apply this to finding

P(\underline{I purple and II green} or \underline{I green and II green})

Here

\begin{quote}
A = ``I purple and II green''

B = ``I green and II green''
\end{quote}

(A and B do NOT overlap.  A refers to all the notebook lines which say
``I purple and II green'', and B is all the lines which say ``I green
and II green''.  These are nonoverlapping lines.)

\newpage

\ 

So,

P(bean from II is green) = 

P(I purple and II green or I green and II green) =

P(I purple and II green) + P(I green and II green)

We already found P(I purple and II green) a couple of pages ago; it's
4/27.

{\bf In-class work:}

Finish this yourself now, in groups.  Find P(bean from II is green).

\newpage

\ 

{\bf Homework:}

{\it Main problem:}  

Let's change the rules of the jelly bean problem a little:  If the bean you 
draw from Jar I is green, you eat the jelly bean instead of throwing it
in Jar II; if the jelly bean you draw from Jar I is purple, then you do
throw it into Jar II.

Find:

\begin{itemize}

\item
P(the jelly bean you draw from Jar II is green) 

\item
P(at least one of the two beans drawn is green)

\end{itemize}

{\it Challenge problem:}  

Review the rules of Games A and B on the first page.  Calculate which
game is better, and state the probability of winning that game.

{\bf Next week:}

We will finally be able to solve the poker-hand problem.

\end{document}

