Ch2 Probability 02(Conditional Probability).ppt fileConditional probabilityConditional probability...

Post on 12-Jul-2019

244 views 0 download

Transcript of Ch2 Probability 02(Conditional Probability).ppt fileConditional probabilityConditional probability...

Conditional probability

Conditional probabilityConditional probability

So far, all (unconditional) probabilities were calculated with respect to the sample space S.

However, in many situations, we can obtain some new information such that we can update the sample space.

In such cases, we are able to update the probability calculations or

More specifically, we can restrict to a smaller sample space, instead of S.

to calculate conditional probabilities.

Conditional probabilityConditional probability

This problem is posed to Ben Campbell (played by Jim Sturgess) by Professor Micky Rosa (played by Kevin Spacey) in the movie "21“. Without hesitation Ben answers this correctly, which convinces Professor Rosa that Ben would be a good addition to their "card counting team".

“ The movie is inspired by the true story of a group of very smart M.I.T. students who use their math skills to count cards in Las Vegas and they

d ki t f “end up making a ton of money. “

http://www.youtube.com/watch?v=-EVsGaUVaFg&feature=related

Let’s see how Ben solves the problem.

ExamplesExamples Question 1: Fli f i i th ti Li t ll th ibl t iQuestion 1: Flip a fair coin three times. List all the possible outcomes, i.e. find the sample space of this experiment.

S = { HHH, HHT, HTH, THH, TTH, THT, HTT, TTT }.

Denote by A the event that “heads” occurs at the first time. Find A.

A = {HHH, HHT, HTH, HTT}.

.21

84

)()()( ===

SnAnAP

28)(Sn

New information: exactly two heads are obtained.New information: exactly two heads are obtained.

ExamplesExamples Question 1: Fli f i i th ti Li t ll th ibl t iQuestion 1: Flip a fair coin three times. List all the possible outcomes, i.e. find the sample space of this experiment.

S = { HHH, HHT, HTH, THH, TTH, THT, HTT, TTT }.

S” = {HHT, HTH, THH}.Given the new information find the updated P(A) or P(A|S”)Given the new information, find the updated P(A) or P(A|S )

A = {HHH, HHT, HTH, HTT}.

="SAI {HHT, HTH}

New information: exactly two heads are obtained..32

)"()"()"|( ==

SnSAnSAP I

New information: exactly two heads are obtained.3)"(Sn

ExamplesExamples There are 50 students, who can be classified in the following table.

Female (F) Male (M) TotalFemale (F) Male (M) Total

Major in 16 4 20Major in Engineering (E)

16 4 20

Not major in 10 20 30Not major in Engineering (EC)

10 20 30

T l 26 24 50Total 26 24 50

ExamplesExamples

Now we randomly select one of these 50 students, then what is the probability that the student is major in Engineering (E)?

All possible selections are equally likely.

ExamplesExamples There are 50 students, who can be classified in the following table.

Female (F) Male (M) TotalFemale (F) Male (M) Total

Major in 16 4 20Major in Engineering (E)

16 4 20

Not major in 10 20 30Not major in Engineering (EC)

10 20 30

Total 26 24 50

ExamplesExamples

Now we randomly select one of these 50 students, then what is the probability that the student is major in Engineering (E)?

n(S) = 50 n(E) = 20

All possible selections are equally likely.

n(S) 50 n(E) 20

220)(E .52

5020

)()()( ===

SnEnEP

550)(SnNew information: the student is femaleNew information: the student is female.

ExamplesExamples

Now we randomly select one of these 50 students, then what is the probability that the student is major in Engineering (E),

given that the student is female?given that the student is female?Based on this information, now we can update the sample space S to a smaller

F { ll f l t d t }one, i.e. F = {all female students}.

ExamplesExamples There are 50 students, who can be classified in the following table.

Female (F) Male (M) TotalFemale (F) Male (M) Total

Major in 16 4 20Major in Engineering (E)

16 4 20

Not major in 10 20 30Not major in Engineering (EC)

10 20 30

Total 26 24 50

ExamplesExamples

Now we randomly select one of these 50 students, then what is the probability that the student is major in Engineering (E),

given that the student is female?given that the student is female?Based on this information, now we can update the sample space S to a smaller

F { ll f l t d t }one, i.e. F = {all female students}.

Thus, the probability that the student is major in Engineering given that the student is a female is

ExamplesExamples There are 50 students, who can be classified in the following table.

Female (F) Male (M) TotalFemale (F) Male (M) Total

Major in 16 4 20Major in Engineering (E)

16 4 20

Not major in 10 20 30Not major in Engineering (EC)

10 20 30

Total 26 24 50

ExamplesExamples

Now we randomly select one of these 50 students, then what is the probability that the student is major in Engineering (E),

given that the student is female?given that the student is female?Based on this information, now we can update the sample space S to a smaller

F { ll f l t d t }one, i.e. F = {all female students}.

Thus, the probability that the student is major in Engineering given that

816)()|( FEnFEP I

the student is a female is

.1326)(

)()|( ===Fn

FEP

ExamplesExamples

)()(/)()( FEPSnFEnFEn III .)(

)()(/)(

)(/)()(

)()|(FP

FEPSnFn

SnFEnFn

FEnFEP III===

Conditional probabilityConditional probability

Definition (Conditional probability of event)

If A and B are any two events in a sample space SIf A and B are any two events in a sample space Sand P(B) > 0, then the conditional probability of A given B is

)( BAP I

then the conditional probability of A given B is

.)(

)()|(BP

BAPBAP I=

Thi f l b d f t f th f

)(BPThis formula can be used for any cases, not necessary for the case of equally likelihood outcomes.

Conditional probabilityConditional probability

Multiplication ruleMultiplication rule

)()|()( I

For any two events A and B with P(B) > 0,

.)()|()( BPBAPBAP =I

,0)( >CBP IFor any three events A, B and C with

.)()|()|()( CPCBPCBAPCBAP III =

,0)( CIy

)()|()|()(

ExampleExampleA b f f t i 20 f f hi h 5 d f tiA box of fuses contains 20 fuses, of which 5 are defective. If 3 of the fuses are selected at random and removed from the box in succession without replacement, what is the probability that all three fuses are defecti e?defective?

Let A be the event that the first fuse is defective,B be the event that the 2nd fuse is defective andB be the event that the 2nd fuse is defective andC be the event that the 3rd fuse is defective.Then 3)|(4)|(5)( BACPdABPAP I

Substitution into the formula yields

183)|(

194)|(,

205)( === BACPandABPAP I

1345)|()|()()( = BACPABPAPCBAP III

Substitution into the formula yields

.1141

183

194

205

=××=

Tree diagramTree diagramExample 10:Suppose that we are asked for the probability of exactly ONE ace in the draw of three cards from a bridge deck.

⎟⎞

⎜⎛⎟⎞

⎜⎛ 484 4’s aces

Choose 1

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛21

=)(An

Choose 2)(Sn 48’s non-aces

Choose 2

⎟⎟⎞

⎜⎜⎛52

⎟⎟⎠

⎜⎜⎝ 3

Tree diagramTree diagramExample 10:Suppose that we are asked for the probability of exactly ONE ace in the draw of three cards from a bridge deck.

We can imagine that we draw the cards sequentially, and the possibilities on each draw are ace or non-ace. Thenthe possibilities on each draw are ace or non ace. Then we can draw a tree to show all the possible outcomes.

Tree Diagram

513

AceAce

48

502

Case 1

51

48

AceNon-Ace50

48

Ace50352

4 Case 2

Case 3

5148 Non-Ace

Non-Ace

50

5047

3Case 4

514

Ace

N A48

Ace

Non-Ace

503

47

Case 5

Case 6

Non-Ace

Non-Ace5247

Non Ace50

Ace504

Case 6

Case 7

51 Non-Ace5046

Case 8

Tree Diagram

513

AceAce

48

502

Case 1

51

48Ace

Non-AceAce 50

48

50352

4 Case 2

Case 3

5148

Non-Ace

Non-Ace50

5047

3Case 4

514 Ace

Non-AceAce

N A48

503

47

Case 5

Case 6

Ace

Non Ace

Non-Ace

Non-Ace5247 50

450Case 6

Case 7

Non-Ace515046

Case 8

Tree Diagram

513

AceAce

48

502

Case 1

51

48Ace

Non-AceAce 50

48

50352

4 Case 2

Case 3

5148

Non-Ace

Non-Ace50

5047

3Case 4

514 Ace

Non-AceAce

N A48

503

47

Case 5

Case 6

Ace

Non Ace

Non-Ace

Non-Ace5247 50

450Case 6

Case 7

Non-Ace515046

Case 8

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

47484××

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

505152××

Tree Diagram

513

AceAce

48

502

Case 1

51

48Ace

Non-AceAce 50

48

50352

4 Case 2

Case 3

5148

Non-Ace

Non-Ace50

5047

3Case 4

514 Ace

Non-AceAce

N A48

503

47

Case 5

Case 6

Ace

Non Ace

Non-Ace

Non-Ace5247 50

450Case 6

Case 7

Non-Ace515046

Case 8

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

47484×× 47448

××

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

505152××

505152××

Tree Diagram

513

AceAce

48

502

Case 1

51

48Ace

Non-AceAce 50

48

50352

4 Case 2

Case 3

5148

Non-Ace

Non-Ace50

5047

3Case 4

514 Ace

Non-AceAce

N A48

503

47

Case 5

Case 6

Ace

Non Ace

Non-Ace

Non-Ace5247 50

450Case 6

Case 7

Non-Ace515046

Case 8

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

47484×× 47448

×× 44748××

the probability of exactly ONE ace in the draw of three cards from a bridge deck is

505152××

505152××

505152××

⎞⎛⎞⎛= 0.2042⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛248

14

⎠⎝⎠⎝=

⎟⎞

⎜⎛52

⎟⎟⎠

⎞⎜⎜⎝

⎛3