Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we...

28
Probability Tossing a coin P(shows heads) = what does this mean? 2 1 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”

Transcript of Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we...

Page 1: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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”

Page 2: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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

Page 3: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 4: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 5: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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

Page 6: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

Notation for complementary probabilities

P(A’) means P(not A)

so

P(A ’) = 1 - P(A)

Page 7: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 8: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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

Page 9: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 10: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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!!

Page 11: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 12: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 13: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 14: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“or”

Rolling a diceP(shows even) =

P(shows odd) =

So P(shows even or shows odd)

=

63

63

63

63

counting possible worlds

Page 15: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 16: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 17: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 18: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“or”

For any A and B

) ()()() (

) and ()()()or (

BAPBPAPBAP

BAPBPAPBAP

Page 19: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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.

Page 20: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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) =

Page 21: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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) =

Page 22: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 23: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 24: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

“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

Page 25: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 26: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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? ….

Page 27: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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?

Page 28: Probability Tossing a coinP(shows heads) = what does this mean? running an experiment repeatedly, we would expect half the outcomes to be “heads” considering.

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