Probability - University of Brighton

Download Report

Transcript Probability - University of Brighton

Probability
Tossing a coin
P(shows heads) =
1
2
what does this mean?
running an experiment repeatedly, we would expect
half the outcomes to be “heads”
considering all possible worlds, in half of them, the
coin shows “heads”
Simple probabilities
Tossing a coin
Rolling a dice
1
P(shows heads) = 2
P(shows 1) =
1
6
P(shows even) =
National lottery
1
2
P(ball shows 17) = 1 49
Permutation and combination Qs
How many 3-letter licence plates from {A, B,C,D}?
How many of those have distinct letters?
How many of those are in alphabetical order?
How many orders can be chosen for the letters A,B,C?
How many words can be made using all the letters of
ABBA?
How many subsets of {A,B,C} are there?
Permutation and combination Qs
How many 3-letter licence plates from {A, B,..,H}?
How many of those have distinct letters?
How many of those are in alphabetical order?
How many orders can be chosen for the letters A,..,H?
How many words can be made using all the letters of
MISSISSIPPI?
How many words can be made from 5H’s and 5T’s?
How many subsets of {A, B,..,H} are there?
Complementary probabilities
Tossing a coin
1
P(shows heads) = 2
1
P(shows tails) = 2
1
Rolling a dice
P(shows 1) = 6
5
P(shows >1) = 6
1
P(shows even) = 2
1
P(shows odd) = 2
National lottery
P(ball shows 17) = 1 49
P(other than 17) = 48
49
Notation for complementary
probabilities
P(A’)
means
P(not A)
so
P(A ’) = 1 - P(A)
Simple probabilities
In a Frogger game, I have to jump onto a log
to cross a river
The screen is 30cm wide, the log scrolls and
is 10cm long, and it takes 4 sec to cycle round
the screen.
What are my chances if I jump randomly?
Simple probabilities
In a Frogger game, I have to jump onto two
30cm
logs to cross a river
7.5cm
10cm
P(succeed on 1st jump) =
P(succeed on 2nd jump) =
P(succeed on 1st jump and succeed on 2nd jump)
=
“and”
Tossing two coins
P(1st shows heads) = 1 2
P(2nd shows heads) = 1
1
2
1
1
So P(both show heads)
2
start
2
1
2
1st Tails
2
2
1 1 1 1
2 2 2 2
2
1 1 1 1
2 2 2 2
= P(1st shows heads and 2nd shows heads)
1
2
1
1
1st
Heads
=

1
2
2
1
2nd Heads
1
2
1
2
2nd Tails
2nd Heads
1
2nd Tails
2
“and”
Rolling a dice
P(shows even) = 3 6
P(shows odd) = 3
6
So P(shows even and shows odd)
= 36  36
multiplication gives
WRONG!!
result for “and” only
when the events are
independent...
“and”
If A and B are independent events
(ie. the outcome of A has no effect on the
outcome of B and vice versa)
then
P( A and B)  P( A)  P( B)
P( A  B)  P( A)  P( B)
Game show
A game show host shows you three possible answers
to a question. But you really have no idea and so you
just guessed randomly, thinking of a million pounds.
P(you win) =
Now the game show host points at a wrong answer
you didn’t choose and says “it’s good you didn’t
choose that answer, because it is a wrong answer!!”.
To heighten the drama, he gives you a chance to
change your mind about your choice…
Should you change your mind?
Game show
start
Ar
chA
chB
Br
chC
chA
chB
Cr
chC
chA
chB
chC
sB sC sC
sB
sC sA sC sA
sB
sA
sA sB
(r is for “is right”, ch is for “choose”, s is for “see that it’s wrong”)
Write probabilities on the arrows.
If I stick, what is the probability that I win?
If I change my choice, what is the probability that I win?
“or”
Rolling a dice
P(shows even) = 3 6
P(shows odd) = 3
6
counting possible worlds
So P(shows even or shows odd)
= 36  36
“or”
Rolling a dice
P(shows even) = 3 6
P(shows < 4) = 3
6
So P(shows even and shows < 4)
= 36  36
addition gives result
WRONG!!
for “or” only when
the events are
mutually exclusive ...
“or”
If A and B are mutually exclusive events
(ie. if A happens, then B can’t happen and
vice versa)
then
P( A or B)  P( A)  P( B)
P( A  B)  P( A)  P( B)
“or”
Rolling a dice
P(shows even) = 3 6
P(shows < 4) = 3
6
P(shows even or shows < 4)
= P(shows even) + P(shows < 4) - P(both)
= 3 6  3 6  16
“or”
For any A and B
P( A or B)  P( A)  P( B)  P( A and B)
P( A  B)  P( A)  P( B)  P( A  B)
“given that”
If I jumped off a ferry,
P(I could swim home) is small.
P(I could swim home given that I have a lifejacket)
is less small.
Still count amongst possible worlds, but
“given that” restricts the set of possible
worlds.
“given that”
Rolling a dice
P(shows even) = 3 6
P(shows < 5) = 4 6
2
1
3
6
2
6
1
6
6
3
6
6
2
4
2
6
6
1
P(shows even given that shows < 5) = 6 4  2 4
6
“given that”
Rolling a dice
P(shows even) = 3 6
P(shows < 5) = 4 6
2
1
3
2
6
1
6
6
3
6
6
2
P(shows < 5 given that shows even) =
6
6
3
4
2
6
1
2
6
6
3
“given that”
B
A
Conditional probability:
P( A and B)
P( A given B) 
P( B)
P( A  B)
P( A | B) 
P( B)
x
qx
q
px
1 x  p  q
1 q
p
1 p
the algebra just says
that the rows and
columns sum
1
“given that”
B
A
Conditional probability:
P( A and B)
P( B given A) 
P( A)
P( A  B)
P( B | A) 
P( A)
x
qx
q
px
1 x  p  q
1 q
p
1 p
the algebra just says
that the rows and
columns sum
1
“given that”
If we know P(B) and P( A  B)
then we can work out P( A | B).
If we know P( A | B) and P( A  B)
then we can work out P (B ) .
If we know P( A | B) and P( B)
then we can work out P( A  B).
P( A  B)
P( A | B) 
P( B)
P( A  B)
P( B) 
P( A | B)
P A  B  P( A | B)  P( B)
Sock problems
Einstein owns three pairs of socks that are of three
different colors. They are not paired or sorted. Each
morning he reaches into the the sock drawer and
takes two socks to wear without paying attention to
their color and that night puts them in the wash.
Einstein's housekeeper, Frau Ritter, washed the socks
Sunday night and will wash them again after
Einstein retires on Wednesday.
Is Einstein more likely to wear a matching pair of
socks on Monday, Tuesday, or Wednesday?
Lie detectors
Lie detectors measure blood pressure and skin
conductivity.
A person may fail a lie detector test, even if they are
truthful. This may be because of general anxiety.
machine tests show P(pass|lying) = 0.14
They may tell lies and pass the test. Calm under
pressure.
machine tests show P(fail|truthful) = 0.12
In 1989, the use of lie detector tests in job screening
was outlawed in the US supreme court. Why? ….
Lie detectors
machine tests show P(pass|lying) = 0.14
machine tests show P(fail|truthful) = 0.12
The employers need to know
P(lying|fail)
0.14q 0.88p
They assume that this
probability is high (rejecting
candidates who fail the lie
detector test). But this
probability is unknown
without more information.
0.86q 0.12p
q
p
What percentage of the
population lie in job interviews?
Lie detectors
machine tests show P(pass|lying) = 0.14
machine tests show P(fail|truthful) = 0.12
Assume that overall, 5% of
candidates lie.
P(lie|fail) = 0.043 / 0.157
= 0.273
0.007 0.836 0.843
0.043 0.114 0.157
0.05 0.95
1