Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we...
-
Upload
ronald-fitzgerald -
Category
Documents
-
view
219 -
download
0
Transcript of Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we...
Probability
Tossing a coin P(shows heads) =
what does this mean?
21
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 P(shows heads) =
Rolling a dice P(shows 1) =
P(shows even) =
National lottery P(ball shows 17) =
21
61
21
491
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?
P(shows tails) =
P(shows >1) =
P(shows odd) =
P(other than 17) =
Complementary probabilities
Tossing a coin P(shows heads) =
Rolling a dice P(shows 1) =
P(shows even) =
National lottery P(ball shows 17) =
21
61
21
491
21
65
21
4948
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 logs to cross a river
P(succeed on 1st jump) =
P(succeed on 2nd jump) =
P(succeed on 1st jump and succeed on 2nd jump)
=
10cm
7.5cm30cm
“and”
Tossing two coins
P(1st shows heads) =
P(2nd shows heads) =
So P(both show heads)
= P(1st shows heads and 2nd shows heads)
=
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
start2
1
21
2nd Heads
2nd Tails
21
21
2nd Heads
2nd Tails1st Heads
1st Tails
21
21
“and”
Rolling a dice
P(shows even) =
P(shows odd) =
So P(shows even and shows odd)
=
63
63
63
63 multiplication gives
result for “and” only when the events are independent...
WRONG!!
“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
)()() (
)()() and (
BPAPBAP
BPAPBAP
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 showstart
Ar Br Cr
chA chB chC chA chB 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 diceP(shows even) =
P(shows odd) =
So P(shows even or shows odd)
=
63
63
63
63
counting possible worlds
“or”
Rolling a dice
P(shows even) =
P(shows < 4) =
So P(shows even and shows < 4)
=
63
63
WRONG!!addition gives result for “or” only when the events are mutually exclusive ...
63
63
“or”
If A and B are mutually exclusive events
(ie. if A happens, then B can’t happen and vice versa)
then
)()() (
)()()or (
BPAPBAP
BPAPBAP
“or”
Rolling a dice
P(shows even) =
P(shows < 4) =
P(shows even or shows < 4)
= P(shows even) + P(shows < 4) - P(both)
=
63
63
61
63
63
“or”
For any A and B
) ()()() (
) and ()()()or (
BAPBPAPBAP
BAPBPAPBAP
“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) =
P(shows < 5) =6
3
64
42
64
62
63
64
63
62
1
62
62
61
61
P(shows even given that shows < 5) =
“given that”
Rolling a dice
P(shows even) =
P(shows < 5) =6
3
64
32
63
62
63
64
63
62
1
62
62
61
61
P(shows < 5 given that shows even) =
“given that”
Conditional probability:
p
q
p1
q1
1
x xq
xp qpx 1
A B
)(
) () | (
)(
) and ()given (
BP
BAPBAP
BP
BAPBAP
the algebra just says that the rows and
columns sum
“given that”
Conditional probability:
p
q
p1
q1
1
x xq
xp qpx 1
A B
)(
) () | (
)(
) and ()given (
AP
BAPABP
AP
BAPABP
the algebra just says that the rows and
columns sum
“given that”
If we know
then we can work out .
If we know
then we can work out .
If we know
then we can work out .
)( and BAPP(B)
)|( BAP
)( and ) | ( BAPBAP )(BP
)( and ) | ( BPBAP
)( BAP
)(
) () | (
BP
BAPBAP
)|(
) ()(
BAP
BAPBP
)()|( BPBAPBAP
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
q
0.14q
0.86q
p
0.88p
0.12p
The employers need to know
P(lying|fail)
They assume that this probability is high (rejecting candidates who fail the lie detector test). But this probability is unknown without more information.
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
0.007
0.043
0.05 0.95
0.836
0.114
Assume that overall, 5% of candidates lie.
0.843
0.157
1P(lie|fail) = 0.043 / 0.157
= 0.273