Skip to document

Math127121 assignment 9solutions

Course

Discrete Mathematics  (Mathematics 1271)

23 Documents
Students shared 23 documents in this course
Academic year: 2021/2022
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Lakehead University

Comments

Please sign in or register to post comments.

Preview text

Math 1271/3071 Assignment 9 Solutions

  1. GivenP(A∪B) = 0. 9 , P(A∩B) = 0. 3 ,andP(A) = 0. 5 ,findP(A|B) and P(B|A).

Solution:We haveP(B|A) =P(A∩B)/P(A) = 0. 3 / 0 .5 = 3/ 5 .SinceP(A∪B) = P(A) +P(B)−P(A∩B),we have 0 = 0 +P(B)− 0. 3 ,soP(B) = 0. 7 .Thus P(A|B) =P(A∩B)/P(B) = 0. 3 / 0 .7 = 3/ 7.

  1. When a fair die is rolled five times, what is the probability that it comes up six exactly three times, given that the first roll was a two?

Solution:LetAdenote the event that the die comes up six exactly three times, and letBdenote the event that the first roll was a two. Our sample spaceShas|S|= 6 5. the probability we want isP(A|B) =P(A∩B)/P(B) =|A|∩BB|/||/S||S|=|A|B∩B||.Given

that the first roll was a two, there are 6 4 possible outcomes for the next four rolls. We have

( 4

3

)

ways to choose which rolls come up six, and for each of these 5 ways

to choose a different outcome for the other roll, so we have|A∩B|= 5

( 4

3

)

and our probability is 5

( 4

3

)

/ 64 .Alternatively, we could view this as a case of four independent Bernoulli trials with getting a six being a success. (The first onehaving already been a failure.) We then get the probability of getting exactly three( successes being 4 3

)

(1/6) 3 (5/6) 1 = 5

( 4

3

)

/ 64.

  1. A fair coin is tossed four times. LetAdenote the event “exactly one of the first two tosses is heads” and letBdenote the event “exactly two of the four tosses are heads”. AreAandBindependent events?

Solution:To check whether the events are independent, we need to check ifP(A∩ B) =P(A)P(B).We have that the successive coin tosses are independent Bernoulli trials, soP(A) =

( 2

1

)

(1/2) 1 (1/2) 1 = 2/4 = 1/2 andP(B) =

( 4

2

)

(1/2) 2 (1/2) 2 =

6 /16 = 3/ 8 .We haveA∩B={HTTH, HTHT, THHT, THTH},so|A∩B|= 4 .Since|S|= 2 4 = 16,we haveP(A∩B) = 4/16 = 1/ 4 .SinceP(A)P(B) = (1/2)(3/8) = 3/ 166 = 1/4 =P(A∩B),we see that the events are not independent.

  1. A pair of fair dice are rolled. Given the following events: A the sumis six, B the sum is even, C a least one die shows a 2, findP(C|A), P(C|B), P(B|C),and P(A|C).

Solution:We have|S|= 6 2 = 36,A={(5,1),(1,5),(2,4),(4,2),(3,3)},so |A|= 5 andP(A) = 5/36;B={(6,6),(6,4),(6,2),(4,6),(2,6),(4,4),(4,2),(2,4), (2,2),(5,5),(5,3),(5,1),(3,5),(1,5),(3,3),(3,1),(1,3),(1,1)},so|B|= 18 and P(B) = 1/2; andC={(2,6),(6,2),(2,5),(5,2),(2,4),(4,2),(3,2),(2,3),(2,2), (2,1),(1,2)},so|C|= 11 andP(C) = 11/ 36 .We haveA∩C={(2,4),(4,2)},so|A∩ C|= 2 andP(A∩C) = 2/36 = 1/18; andB∩C={(2,6),(6,2),(2,4),(4,2),(2,2)}, so|B∩C|= 5 andP(B∩C) = 5/ 36 .ThusP(C|A) = P(C∩A)/P(A) = (1/18)/(5/36) = 2/ 5 , P(C|B) =P(C∩B)/P(B) = (5/36)/(1/2) = 5/ 18 , P(B|C) = P(C∩B)/P(C) = (5/36)/(11/36) = 5/ 11 ,andP(A|C) =P(C∩A)/P(C) = (1/18)/(11/36) = 2/ 11. 1

2

  1. A box contains two coins, one fair and one with two heads. A coin is chosenat random and tossed. a) What is the probability that it comes up heads? b) Given that it comes up heads, what is the probability that the coin selected is the two headed one? c) If the selected coin is tossed twice, what is the probability that it comes up heads both times?

Solution:LetC 1 denote choosing the two headed coin andC 2 denote choosing the fair coin. LetHdenote tossing heads andTtossing tails. ThenP(C 1 ∩H) = P(C 1 )P(H|C 1 ) = (1/2)(1) = 1/ 2 , P(C 1 ∩T) =P(C 1 )P(T|C 1 ) = (1/2)(0) = 0, P(C 2 ∩H) =P(C 2 )P(H|C 2 ) = (1/2)(1/2) = 1/ 4 ,andP(C 2 ∩T) =P(C 2 )P(T|C 2 ) = (1/2)(1/2) = 1/ 4 .We have: a) The probability that it comes up heads isP(H) = P(H∩C 1 ) +P(H∩C 2 ) = 1/2 + 1/4 = 3/ 4 .b)P(C 1 |H) =P(C 1 ∩H)/P(H) = (1/2)/(3/4) = 2/ 3 .c)P(HH) =P(C 1 ∩HH) +P(C 2 ∩HH) = (1/2)(1) + (1/2)(1/4) = 3/ 8.

  1. Show that ifP(A) =P(B) = 2/ 3 ,thenP(A|B)≥ 1 / 2.

Solution:We have 1≥P(A∪B) =P(A)+P(B)−P(A∩B) = 2/3+2/ 3 −P(A∩ B),soP(A∩B)≥ 1 / 3 .ThusP(A|B) =P(A∩B)/P(B) =P(A∩B)/(2/3)≥ (1/3)/(2/3) = 1/ 2 ,as required.

  1. Recall that a poker hand is called a flush if all five cards are of the same suit. What is the probability that a hand is a flush, given that are all five cards are red (hearts or diamonds)?

Solution:LetFdenote the event that a hand is a flush, and letRdenote the event that all five cards are red. Our sample spaceSis the set of all five card poker hands. The probability we are looking for isP(F|R) =P(PF(∩RR))=|A|∩RR|/||/S|S||=|A|R∩R||.There

are 26 red cards, so|R|=

( 26

5

)

.There are

( 13

5

)

flushes with all five cards hearts and the same number with all 5 cards diamonds, so|F∩R|= 2

( 13

5

)

.Our probability is therefore 2

( 13

5

)

/

( 26

5

)

.

  1. Suppose that 7% of the patients tested in a clinic for a disease are infected with it. Suppose further that 96% of patients who have the disease and are tested test positive, and 3% of patients who do not have the disease and are tested test positive. Find: a) The probability that a person who tested positive has the disease b) The probability that a person who tested positive does not have the disease c) The probability that a person who tested negative has the disease d) The probability that a person who tested negative does not have thedisease.

Solution: LetDdenote the event that the person tested has the disease, and letP denote the event that the person tests positive. We haveP(D) = 0. 07 , P(P|D) = 0. 96 ,andP(P|D ̄) = 0. 03 .From these, we getP(P ̄|D) = 1− 0 .96 = 0. 04 , P(D ̄) = 1− 0 .07 = 0. 93 ,andP(P ̄|D ̄) = 1− 0 .03 = 0. 97 .We have:

Was this document helpful?

Math127121 assignment 9solutions

Course: Discrete Mathematics  (Mathematics 1271)

23 Documents
Students shared 23 documents in this course
Was this document helpful?
Math 1271/3071 Assignment 9
Solutions
1. Given P(AB) = 0.9, P (AB) = 0.3,and P(A) = 0.5,find P(A|B) and
P(B|A).
Solution: We have P(B|A) = P(AB)/P (A) = 0.3/0.5 = 3/5.Since P(AB) =
P(A) + P(B)P(AB),we have 0.9 = 0.5 + P(B)0.3,so P(B) = 0.7.Thus
P(A|B) = P(AB)/P (B) = 0.3/0.7 = 3/7.
2. When a fair die is rolled five times, what is the probability that it comes up six
exactly three times, given that the first roll was a two?
Solution: Let Adenote the event that the die comes up six exactly three times, and
let Bdenote the event that the first roll was a two. Our sample space Shas |S|= 65.
the probability we want is P(A|B) = P(AB)/P (B) = |AB|/|S|
|B|/|S|=|AB|
|B|.Given
that the first roll was a two, there are 64possible outcomes for the next four rolls.
We have 4
3ways to choose which rolls come up six, and for each of these 5 ways
to choose a different outcome for the other roll, so we have |AB|= 54
3and our
probability is 54
3/64.Alternatively, we could view this as a case of four independent
Bernoulli trials with getting a six being a success. (The first one having already
been a failure.) We then get the probability of getting exactly three successes being
4
3(1/6)3(5/6)1= 54
3/64.
3. A fair coin is tossed four times. Let Adenote the event “exactly one of the first
two tosses is heads” and let Bdenote the event “exactly two of the four tosses are
heads”. Are Aand Bindependent events?
Solution: To check whether the events are independent, we need to check if P(A
B) = P(A)P(B).We have that the successive coin tosses are independent Bernoulli
trials, so P(A) = 2
1(1/2)1(1/2)1= 2/4 = 1/2 and P(B) = 4
2(1/2)2(1/2)2=
6/16 = 3/8.We have AB={HT T H, HT HT, T HHT, T HT H},so |AB|=
4.Since |S|= 24= 16,we have P(AB) = 4/16 = 1/4.Since P(A)P(B) =
(1/2)(3/8) = 3/16 6= 1/4 = P(AB),we see that the events are not independent.
4. A pair of fair dice are rolled. Given the following events: A the sum is six, B
the sum is even, C a least one die shows a 2, find P(C|A), P (C|B), P (B|C),and
P(A|C).
Solution: We have |S|= 62= 36.Also, A={(5,1),(1,5),(2,4),(4,2),(3,3)},so
|A|= 5 and P(A) = 5/36; B={(6,6),(6,4),(6,2),(4,6),(2,6),(4,4),(4,2),(2,4),
(2,2),(5,5),(5,3),(5,1),(3,5),(1,5),(3,3),(3,1),(1,3),(1,1)},so |B|= 18 and
P(B) = 1/2; and C={(2,6),(6,2),(2,5),(5,2),(2,4),(4,2),(3,2),(2,3),(2,2),
(2,1),(1,2)},so |C|= 11 and P(C) = 11/36.We have AC={(2,4),(4,2)},so |A
C|= 2 and P(AC) = 2/36 = 1/18; and BC={(2,6),(6,2),(2,4),(4,2),(2,2)},
so |BC|= 5 and P(BC) = 5/36.Thus P(C|A) = P(CA)/P (A) =
(1/18)/(5/36) = 2/5, P (C|B) = P(CB)/P (B) = (5/36)/(1/2) = 5/18, P (B|C) =
P(CB)/P (C) = (5/36)/(11/36) = 5/11,and P(A|C) = P(CA)/P (C) =
(1/18)/(11/36) = 2/11.
1