tutorial 6: probability i

26
Tutorial 6: Probability I Department of Computer Science and Engineering Hong Kong University of Science and Technology Tutorial 6: Probability I 1 / 26

Upload: others

Post on 09-Jan-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial 6: Probability I

Tutorial 6: Probability I

Department of Computer Science and EngineeringHong Kong University of Science and Technology

Tutorial 6: Probability I 1 / 26

Page 2: Tutorial 6: Probability I

Question 1

What is the probability that a hand of 5 cards chosen from anordinary deck of 52 cards, will consist of cards of the same suit?The first question is

What is the sample space(and associated probability weights)?

There are actually two different logical answers:

(a) The 5-element set model, in which each of the(525

)different

hands of 5 cards is equally likely.

(b) The 5-element permutation model, in which each of the 525

different ordered hands of 5 cards is equally likely.

Tutorial 6: Probability I 2 / 26

Page 3: Tutorial 6: Probability I

Question 1

Solution (Using the 5-element set model):There are

(525

)different possible 5-sets.

Among these possibilities, there are

4(13 · 12 · 11 · 10 · 9)/5!

ways of choosing one suit. Thus, the probability is

(52 · 12 · 11 · 10 · 9)/5!

(52 · 51 · 50 · 49 · 48)/5!=

12 · 11 · 10 · 951 · 50 · 49 · 48

=33

16660

which is approximately 0.00198.

Tutorial 6: Probability I 3 / 26

Page 4: Tutorial 6: Probability I

Question 1

Solution (Using the 5-element permutation model):There are 52 · 51 · 50 · 49 · 48 different possible 5-elementpermutations.Among these possibilities, we have 52 · 12 · 11 · 10 · 9 ways ofchoosing one suit.Thus, the probability is

52 · 12 · 11 · 10 · 952 · 51 · 50 · 49 · 48

=12 · 11 · 10 · 9

51 · 50 · 49 · 48=

33

16660

which is the same as the answer with sets as hands.

Tutorial 6: Probability I 4 / 26

Page 5: Tutorial 6: Probability I

Question 2

A five-card hands chosen from a standard deck of playing cardsconsist of five cards in a row is called a straight. E.g.,♦ 9, ♣ 10, ♣ J, ♥ Q, ♠ K.

What is the probability that a hand of 5 cards chosen from anordinary deck of 52 cards is a straight?

Explore whether you get the same answer by using 5-element setsas your model of hands, or 5-element permutations as your modelof hands.

To simplify the problem, we assume the rules forbid an ace-lowstraight (A,2,3,4,5).

Tutorial 6: Probability I 5 / 26

Page 6: Tutorial 6: Probability I

Question 2

Solution (5-element set model):There are

(525

)sets of 5 cards that can be dealt as hands. Among

them, there are 9 · 45 possibilities of choosing a straight.(There are 9 · 4 possibilities for the highest card;For each additional card, there are four possibilities.)

Thus, the probability is

9 · 45(525

) =192

54145

or approximately 0.003546

Tutorial 6: Probability I 6 / 26

Page 7: Tutorial 6: Probability I

Question 2

Solution (5-element permutation model):There are 52 · 51 · 50 · 49 · 48 possiblle hands that can be dealt.

Among them, 5! · 9 · 45 hands are a straight.(There are 9 · 4 possibilities for the highest card in a straight.For each additional card, there are four possibilities.)

Thus, the probability is

5! · 9 · 45

52 · 51 · 50 · 49 · 48

which turns out to be the same as the answer with sets as hands.

Tutorial 6: Probability I 7 / 26

Page 8: Tutorial 6: Probability I

Question 3

When we say throw m balls into n boxes we mean that each of thenm possible outcomes is uniformly likely.

(a) Throw 6 balls into 5 boxes.What is the probability that every box contains at least oneball?

(b) Throw 150 balls into 100 boxes.What is the probability that every box contains at least oneball? You can write the solution to this problem as asummation of numbers.

Tutorial 6: Probability I 8 / 26

Page 9: Tutorial 6: Probability I

Question 3

Solution (a):The number of ways to throw 6 balls into 5 boxes so that everybox contains at least one ball is exactly the same as the number ofonto functions from{1, 2, 3, 4, 5, 6} to {1, 2, 3, 4, 5}which is

(62

)5!

There are 56 different ways of throwing the 6 balls into 5 boxes, sothe probability is. (6

2

)5!

56.

Tutorial 6: Probability I 9 / 26

Page 10: Tutorial 6: Probability I

Question 3

Solution (b):Let A be the event that every box contains at least 1 ball.Let B be the event that at least 1 box is empty.Since B is the complement of A, P(A) = 1− P(B).

Now, for i = 1, . . . , 100, let Ei be the event that box i is empty.Since B =

⋃100i=1 Ei , from the inclusion-exclusion formula,

P

(100⋃i=1

Ei

)=

100∑k=1

(−1)k+1∑

i1,i2,...,ik :1≤i1<i2<···<ik≤100

P(Ei1 ∩ Ei2 ∩ · · · ∩ Eik )

Tutorial 6: Probability I 10 / 26

Page 11: Tutorial 6: Probability I

Question 3

Let Ei be the event that box i is emptyNote that, for all i1, i2, . . . , ik :

P(Ei1) =

(100− 1

100

)150

=

(1− 1

100

)150

P(Ei1 ∩ Ei2) =

(100− 2

100

)150

=

(1− 2

100

)150

and, in general,

P(Ei1 ∩ Ei2 ∩ · · · ∩ Eik ) =

(100− k

100

)150

=

(1− k

100

)150

There are(100

k

)ways of choosing such k-tuples, so∑

i1,i2,...,ik1≤i1<i2<···<ik≤100

P(Ei1 ∩ Ei2 ∩ · · · ∩ Eik ) =

(100

k

)(1− k

100

)150

Tutorial 6: Probability I 11 / 26

Page 12: Tutorial 6: Probability I

Question 3

Therefore,

P(B) =100∑k=1

(−1)k+1∑

i1,i2,...,ik :1≤i1<i2<···<ik≤n

P(Ei1 ∩ Ei2 ∩ · · · ∩ Eik )

=100∑k=1

(−1)k+1

(100

k

)(1− k

100

)150

and P(A) = 1− P(B)

Tutorial 6: Probability I 12 / 26

Page 13: Tutorial 6: Probability I

Question 4

Five married couples (i.e., 10 people) sit down at random in a rowof 10 seats. That is, each one of the 10! different ways of seatingthe people is equally likely to occur.We say that a couple sits together if the husband and wife in thatcouple sit next to each other.

(a) What is the probability that k(1 ≤ k ≤ 5) specified couplesend up sitting together (regardless of whether the other 5− kcouples sit together or not)?

(b) What is the probability that no couple sits together? You mayuse the summation (

∑) sign and

(nm

)to express your answer.

Tutorial 6: Probability I 13 / 26

Page 14: Tutorial 6: Probability I

Question 4

Solution (a):There are totally 10! ways to seat the 5 couples.

If a couple sits together, we treat it as one single unit.If there are k specified couples sitting together, we can think of theproblem as randomly permuting the (10-k) units in (10-k)!different ways.For each permutation, ∃2k ways to set the k bound couples.Therefore, the probability is

(10− k)!2k

10!

Tutorial 6: Probability I 14 / 26

Page 15: Tutorial 6: Probability I

Question 4

Solution (b):Let Ei denote the event that the ith couple sits together.The probability that at least one couple sits together can becomputed using the inclusion-exclusion principle as

P

(5⋃

i=1

Ei

)=

5∑k=1

(−1)k+1∑

i1,i2,...,ik :1≤i1<i2<···<ik≤5

P(Ei1 ∩ Ei2 ∩ · · · ∩ Eik )

From part (a)

P

(5⋃

i=1

Ei

)=

5∑k=1

(−1)k+1

(5

k

)(10− k)!2k

10!

Tutorial 6: Probability I 15 / 26

Page 16: Tutorial 6: Probability I

Question 4

Thus, the probability that no couple sits together is

1− P

(5⋃

i=1

Ei

)= 1−

5∑k=1

(−1)k+1

(5

k

)(10− k)!2k

10!

=5∑

k=0

(−1)k(

5

k

)(10− k)!2k

10!

Tutorial 6: Probability I 16 / 26

Page 17: Tutorial 6: Probability I

Question 5

Suppose that boys and girls are equally likely to be born.

(a) In a family consisting of a mother, father, and two children ofdifferent ages, what is the probability that the family has twogirls, given that one of the children is a girl?

(b) What is the probability that the children are both girls, giventhat the older child is a girl?

Tutorial 6: Probability I 17 / 26

Page 18: Tutorial 6: Probability I

Question 5

Solution (a):Let G2 be event that the family has two girls. P(G2) = 1/4.

Let G1+ be event that the family has at least one girl. Then

P(G1+) = 1− P(the family has two boys) = 1− 1

4=

3

4.

We have P(G1+ ∩ G2) = 1/4. Therefore,

P(G2|G1+) =P(G1+ ∩ G2)

P(G1+)=

1/4

3/4=

1

3

Tutorial 6: Probability I 18 / 26

Page 19: Tutorial 6: Probability I

Question 5

It might be easier to visualize this if you write out all of theoutcomes as GG ,GB,BG ,BB, where, e.g., GB means that theyoungest child is a girl and the oldest child is a boy. Now

G1+ = {GG ,GB,BG},G2 ∩ G1+ = {GG}

Conditioning on G1+ means that all of the three outcomescontaining at least one girl are equally likely, so

P(G2|G1+) =1

3.

Tutorial 6: Probability I 19 / 26

Page 20: Tutorial 6: Probability I

Question 5

Solution (b):Let G2 be event that the family has two girls. P(G2) = 1/4.

Let Gold be event that the older child is a girl. P(Gold) = 1/2.

Since P(Gold ∩ G2) = P(G2) = 1/4.This gives,

P(G2|Gold) =1/4

1/2=

1

2

Again, it might be easier to visualize this by writing out:

G1+ = {BG ,GG},G2 ∩ G1+ = {GG}

Conditioning on Gold means that each of the two events {BG ,GG}are equally likely, in which case P(G2|Gold), which is theprobability of GG given Gold , is 1

2 .

Tutorial 6: Probability I 20 / 26

Page 21: Tutorial 6: Probability I

Question 5

We have just shown that if a family has two children then

Probability both children are girls, given that one child is a girl = 13

Probability both children are girls, given that the oldest child is agirl = 1

2

It is instructive to understand the difference between these twoproblems.

Tutorial 6: Probability I 21 / 26

Page 22: Tutorial 6: Probability I

Question 5 (more)

Suppose that a family has 3 children of different ages,

(a) What is the probability that all three children are girls, giventhat at least 1 is a girl?

(b) What is the probability that all three children are girls, giventhat the youngest child is a girl?

Tutorial 6: Probability I 22 / 26

Page 23: Tutorial 6: Probability I

Question 5 (more)

Solution (a):Let G3 be event that the family has three girls. P(G3) = 1/8.Let G1+ be event that family has at least one girl. Then

P(G1+) = 1− P(the family has three boys) = 1− 1

8=

7

8.

We have P(G1+ ∩ G3) = 1/8. Therefore,

P(G3|G1+) =P(G1+ ∩ G3)

P(G1+)=

1/8

7/8=

1

7

Tutorial 6: Probability I 23 / 26

Page 24: Tutorial 6: Probability I

Question 5 (more)

Solution (b):Let G3 be event that the family has three girls. P(G3) = 1/8.Let Gyoungest be event that the youngest child is a girl.P(Gyoungest) = 1/2.

We have P(Gyoungest ∩ G3) = 1/8.

This gives P(G3|Gyoungest) = 1/81/2 = 1

4 .

Tutorial 6: Probability I 24 / 26

Page 25: Tutorial 6: Probability I

Question 6

If a student knows 75% of the material in a course, and if a100-question multiple-choice test with five choices per questioncovers the material in a balanced way. What is the student’sprobability of getting a right answer to a question, given that thestudent guesses at the answer to each question whose answer hedoes not know?

Tutorial 6: Probability I 25 / 26

Page 26: Tutorial 6: Probability I

Question 6

Solution:Let K be the event that the student knows the correct answer andC be the event that the student gets the correct answer.

Then, we know the conditional probabilities P(C |K ) = 1 andP(C |K ) = 1

5 .

Then C = (C ∩ K ) ∪ (C ∩ K ). Since the events (C ∩ K ) and(C ∩ K ) are disjoint. This gives

P(C ) = P(C ∩ K ) + P(C ∩ K ) = P(C |K )P(K ) + P(C |K )P(K )

= (1)(0.75) +1

5(0.25) = 0.8.

Tutorial 6: Probability I 26 / 26