Statistics - The Pingry School

Download Report

Transcript Statistics - The Pingry School

Chapter 4
Probability Theory
4.1 What is Probability?
Law of Large Numbers
Jacob Bernoulli: “For even the most stupid of men… is
convinced that the more observations have been
made, the less danger there is of wandering from
one’s goal”
Law of Averages is what people say when they
assume that eventually they will win the lottery. Law
of averages compensates for loss.
Law of Averages does not exist.
Imagine..
You have a hankering for an egg and cheese on a roll
(ketchup, salt, pepper..). It is the first day of open
campus for seniors, so during your free period you
get in the car and drive down to Neils. You get to
the light at the end of Martinsville road and it is red.
Are you anxious? Do you worry about getting back
in time, on this your first day of open campus?
The next day you have the same hankering… and the
light is red again – what are the odds???
The following day.. .you guessed it.
Would you then decide to go to O’Bagel?
Do you really think that the probability of hitting the
red light is 100%
Probably not…
Probability
Probability is the long run relative
frequency of an event. Randomness
eventually settles to probability.
Lets say you keep track….
Day
Light is…
% of time it is red
1
Red
100% (1 out of 1)
2
Green
50%
(1 out of 2)
3
Green
33%
(1 out of 3)
4
Red
50%
(2 out of 4)
5
Red
60%
(3 out of 5)
6
Green
50%
(3 out of 6)
What would the graph look like
over time
1.2
1
0.8
0.6
Series1
0.4
0.2
0
1
2
3
4
5
6
7
8
9 10 11 12
There is no stop light elf in there watching for your car…
Therefore, if the light is going to be red a certain percentage of
the time, over time you should see the prediction level out.
Predicting
Predicting particular results is difficult (call
heads or tails on a coin toss, win vs. loss for a
football pool)
Long run prediction is easier for certain events
(in the long run, the coin should be heads
roughly 50% of the time)
Each trial is an Attempt
What happen is the Outcome
Combination of outcomes is called the Event
Imagine this:
The probability of winning Mega Millions =
1/175,711,536.
Imagine 175,711,536 quarters in a row.
One is purple on the underside. You will win
the lottery if you pick up the quarter that is
purple.
How long is the row of quarters?
(5280 feet in a mile)
That would get us to….
Fresno CA, if we stopped in San Francisco
first… (as the crow flies)
Probability
http://www.ncaa.org/research/prob_of_competing/
http://anthro.palomar.edu/mendel/mendel_2.htm
http://www.wunderground.com/ndfdimage/viewimage?type=pop12&r
egion=us
Probability – the numerical measure of
the likelihood of an event.
0 ≤ P(A) ≤ 1
Probability (cont)
What does it mean if P(A) is close to 0?
What does it mean if P(A) is close to 1?
What does it mean if P(A) = 0? = 1?
Probability (cont)
What does it mean if P(A) is close to 0?
What does it mean if P(A) is close to 1?
What does it mean if P(A) = 0? = 1?
f
P(A)  Relative Frequency =
n
Probability (cont)
Lets try rolling dice. You keep track, and
when we are all done we will put the
results on a giant chart…
1
2
3
4
5
6
1
2
3
4
5
6
7
2
3
4
5
6
7
8
3
4
5
6
7
8
9
4
5
6
7
8
9
10
5
6
7
8
9
10
11
6
7
8
9
10
11
12
Predicted Frequency of 2, 12?
.028
Predicted Frequency 3, 11?
.056
Predicted Frequency of 4, 10?
.083
Predicted Frequency of 5, 9?
.111
Predicted Frequency of 6, 8?
.139
Predicted Frequency of 7?
.167
Probability (cont)
Was your probability close to predicted?
Did it get better the more sums
considered?
For Equally likely outcomes,
Probability (cont)
Was your probability close to predicted?
Did it get better the more sums
considered?
For Equally likely outcomes,
# of ways favorable to A
P(A) 
total # of outcomes
Probability (cont)
Some Definitions
Statistical Experiment (Observation) – any random
activity that results in a definite outcome.
Event – a collection of 1 or more outcomes of a statistical
experiment
Simple event – one outcome of a statistical experiment
Sample Space – set of all Simple Events
Sum of Probability of all Simple events = 1
Probability (contr)
The complement of event A = AC =
describes the event NOT occurring
Therefore
P(A) + P(AC) = 1
4.2 Probability Rules
Cards, Dice, etc
Dependent vs Independent
First, we need to define an independent vs a
dependent event.
Rolling two dice
Tossing two coins
Drawing two cards from a deck
Drawing three marbles from a bag
What is a distinguishing factor of
these four things
Independent events have no effect on
each other. That is, tossing one coin
has no impact on what you might get
when you toss the second.
Dependent events do. Draw a card
from a deck. Can you draw this card
again? Not without replacement.
Independent Events
Lets look back at our dice chart.
What is the probability of rolling a 6 and 1 (in that
order)?
What about rolling a 1 and 6 (in that order)?
What is the probability of getting two sixes (chart)?
What is the relationship between those numbers?
Order
matters!
P(A and B) = P(A) P(B)
Note: if A and B and C, then P(A)P(B)P(C)
Dependent Events
Kind of changes, but looks the same. That is, the
probability of the second event will be slightly
altered assuming success on the first. The basic
concept is the same
P(A and B) = P(A) P(B, given A occurs)
P(A and B) = P(B) P(A, given B occurs)
Dependent Events (cont)
Drawing cards from a deck, without
replacement, is a Dependent event.
Once you draw the Ace of Hearts, you
can’t draw it again.
What is the probability in Texas Hold’Em
of being dealt two aces?
What is the probability of being dealt
two red aces?
Conditional Probability
If P(A and B) = P(B) P(A, given B),
then
Conditional Probability (cont)
If P(A and B) = P(B) P(A, given B),
then
P(A and B)
P(A,given B) 
 P(A B)
P(B)
That bar notation means probability of A, given B has occurred…
Probability of two events
happening together
Back to the dice:
What is the probability of getting a total
of 3? Look at your chart…
How many ways are there to get a 3?
How does this affect probability?
Probability of A or B (1 then 2 or 2 then 1)
It looks like we….
Probability of two events
happening together
Add them..
Yes, typically
P(A or B) = P(A) + P(B)
As long as the events are mutually exclusive.
That is, if they cannot occur together.
Could one of the dice be 1 and 2 at the same
time?? (P(A)+P(B)=0)
Mutually Exclusive Events
Imagine a deck of cards. What is the
probability of drawing a diamond OR an
ace?
P(diamond) + P(ace)
But is there overlap?
What if you draw the ace of diamonds?
How many ace of diamonds are there?
How to deal with this?
Mutually Exclusive Events
If events are mutually exclusive, then
P(A or B) = P(A) + P(B)
If events are not mutually exclusive, then
P(A or B) = P(A) + P(B) – P(A and B)
Back to dice
What is the probability of rolling a sum
greater than 7?
What is the probability of rolling a sum 7
or greater?
We can count on the chart, but how
would it be written?
M&M’s
In 2001 the maker of M&Ms decided to
add another color. They surveyed kids
in nearly every country and asked
them to vote among purple, pink and
teal. The global winner was purple.
In the US and Japan the results were:
US
Japan
Purple
42%
16%
Pink
19%
38%
Teal
37%
36%
M&M’s (cont)
1. What is the probability that a Japanese
M&M’s survey respondent selected at
random preferred pink or teal?
2. If we pick two Japanese respondents, what
is the probability that they both selected
purple?
3. If we pick three, what is the probability that
at least one preferred purple?
Suspicious driving
Police report that 78% of drivers stopped on
suspicion of drunk driving are given a breath
test, 36% a blood test, and 22% both tests.
What is the probability that a randomly
selected DWI suspect is given
A) A test?
B) A blood test or a breath test, but not both
C) Neither test?
Same situation…
Are a blood test and breath test mutually
exclusive?
Are they independent? (Independent means
P(B│A)= P(B)
Probability of B happening given A occurs is
the same as P(B)
P(A and B)
P(A B)  P(A,given B) 
P(B)
Same situation…
Are a blood test and breath test mutually
exclusive?
Are they independent? (Independent means
P(B│A)= P(B)
Probability of B happening given A occurs is
the same as P(B)
P(A and B)
P(A B)  P(A,given B) 
P(B)
4.3 Trees and Counting
Trees
Consider how many ways a team can
win or lose in a season…
Or how many sequences you can get if
you toss a coin 3 times.
Or how many ways you can ride 4
particular roller coasters at Great
Adventure.
A tree diagram allows you to look at all
possibilities.
Trees (cont)
Lets set up a tree for that last situation.
The choices are El Toro, Rolling Thunder,
Superman the Ultimate Flight, and
Kinda Ka.
Trees (cont)
By labeling each branch with an appropriate
probability, you can use the tree diagram to
compute probability of a particular
outcome.
In the reading there will be an example that
discusses pulling balls out of urns.
Write the probabilities as fractions on each
“branch” and then use the concepts from
last section to compute P(A and B)
Application
According to a study by the Harvard School of Public
Health, 44% of college students engage in binge
drinking, 37% drink moderately and 19% abstain
entirely. Another study published in the American
Journal of Health Behavior, finds that among binge
drinkers aged 21 to 34, 17% have been involved in
alcohol related automobile accidents while among
non-bingers of the same age, only 9% have been
involved in such accidents.
What is the probability that a randomly selected
college student will be a binge drinker that has had
an alcohol related car accident?
We could do this with
conditional probability
(That is, finding the probability of
selecting someone who is a binge
drinker AND a driver with an alcohol
related accident)
Lets look at it from a tree point of view –
this is sometimes organizationally a
good way to consider…
It also is a good way to solve a problem
that asks more than one question…
Going backwards
What if you instead wanted to know if a
student has an alcohol related
accident, what is the probability that
the student is also a binge drinker?
Remember
Going backwards
What if you instead wanted to know if a
student has an alcohol related
accident, what is the probability that
the student is also a binge drinker?
Remember
P(A and B)
P(A B)  P(A,given B) 
P(B)
P(A B)  P(A,given B) 
P(A and B)
P(B)
Tree gives P(accident | binge) but we
want P(binge |accident)
Using the above formula,
P(binge |accident) =
P(binge and accident)
P(accident)
=.075/.108 (remember the tree?)=69%
Trees (cont)
Why does this work?
The Fundamental Theorem of Counting says
If there are m1 ways to do a first task, m2 ways
to do a second task, m3 ways to do a third
task…… mn ways to do the nth task,
then the total possible “patterns” or ways you
could do all the tasks is
m1· m2· m3...mn
Permutations
Now is the time we can introduce a few new
mathematical operators (that you should
already know)
! is called the factorial symbol
n! = n(n-1)(n-2)(n-3)…..1
3! = 3(2)(1) = 6
5! = 5(4)(3)(2)(1)= 120
0! = 1
Calculators use a
special formula to
compute factorials; this
is a large number
formula but as result
your calculator will give
you an answer for 1.5!
which is false
Permutations (cont)
So what is a permutation?
A permutation of “n” elements taken “r” at a
time is an ordered arrangement (without
repetition) of r of the n elements and it is
called nPr.
Permutations (cont)
So what is a permutation?
A permutation of “n” elements taken “r” at a
time is an ordered arrangement (without
repetition) of r of the n elements and it is
called nPr.
n!
nPr 
(n  r)!
The thing to remember is that ORDER
MATTERS!!
How to recognize a permutation
problem
The wording will imply somehow that
order matters.
In how many different ways can you ride
5 out of 11 of the max rated rides at
Great Adventure?
“different ways” means order matters
Combinations
What if order doesn’t matters?
How many combinations of 5 of the 11
max rated rides at Great Adventure
are there?
Groupings, in which order doesn’t
matter, are called combinations.
Smaller or larger?
Combinations (cont)
It looks like a permutation formula but
with one crucial difference.
A Combination n elements, r at a time, is
equal to
n!
r !(n  r)!
Dividing by r! gets rid of overlap