Complete solutions manual
probability and statics for
computer scientist 2nd
edition.Questions and
answers with rationales.
• An outcome is the chosen pair of chips. The sample space in this problem consists of 15 pairs: AB, AC,
AD, AE, AF, BC, BD, BE, BF, CD, CE, CF, DE, DF, EF (or 30 pairs if the order of chips in each pair
matters, i.e., AB and BA are different pairs).
All the outcomes are equally likely because two chips are chosen at random.
One outcome is ‘favorable’, when both chips in a pair are defective (two such pairs ifthe order
matters).
Thus,
P (both chips are defective) =
number of favorable outcomes
1/15
=
total number of outcomes
• Denote the events:
We have:
M = { problems with a motherboard }
H = { problems with a hard drive }
, Hence,
P {M } = 0.4, P {H} = 0.3, and P {M ∩ H} = 0.15.
and
P {M ∪ H} = P {M } + P {H} − P {M ∩ H} = 0.4 + 0.3 − 0.15 = 0.55,
0.45
P {fully functioning MB and HD} = 1 − P {M ∪ H} =
• Denote the events,
Then
I = {the virus enters through the internet}
E = {the virus enters through the e-mail}
P {Ē ∩ Ī} = 1 − P {E ∪ I} = 1 − (P {E} + P {I} − P {E ∩ I})
0.45
= 1 − (.3 + .4 − .15) =
It may help to draw a Venn diagram.
• Denote the events,
C = { knows C/C++ } , F = { knows Fortran } .
}
Then
0.4
}
(a) P F̄ = 1 − P {F } = 1 − 0.6 =
(b) P F̄ ∩ C̄ = 1 − P {F ∪ C} = 1 − (P {F } + P {C} − P {F ∩ C})
= 1 − (0.7 + 0.6 − 0.5) = 1 − 0.8 = 0.2
, 0.2
(c) P {C\F } = P {C} − P {F ∩ C} = 0.7 − 0.5 =
4 Instructor’s solution manual
0.1
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 =
0.8333
{ ∩ }
P C F 0.5
(e) P {C | F } = = =
P {F } 0.6
0.7143
P {C ∩ F } = 0.5 =
(f) P {F | C} =
P {C} 0.7
• Denote the events:
Then
D1 = {first test discovers the error} D2 = {second test discovers the error}D3
= {third test discovers the error}
}
P { at least one discovers } = P {D1 ∪ D2 ∪ D3}
= 1 − P D̄1 ∩ D̄2 ∩ D̄3
0.72
= 1 − (1 − 0.2)(1 − 0.3)(1 − 0.5) = 1 − 0.28 =
We used the complement rule and independence.
• }
• Let A = {arrive on time}, W = {good weather}. We have
P {A | W } = 0.8, P A | W̄ = 0.3, P {W } = 0.6
} }
probability and statics for
computer scientist 2nd
edition.Questions and
answers with rationales.
• An outcome is the chosen pair of chips. The sample space in this problem consists of 15 pairs: AB, AC,
AD, AE, AF, BC, BD, BE, BF, CD, CE, CF, DE, DF, EF (or 30 pairs if the order of chips in each pair
matters, i.e., AB and BA are different pairs).
All the outcomes are equally likely because two chips are chosen at random.
One outcome is ‘favorable’, when both chips in a pair are defective (two such pairs ifthe order
matters).
Thus,
P (both chips are defective) =
number of favorable outcomes
1/15
=
total number of outcomes
• Denote the events:
We have:
M = { problems with a motherboard }
H = { problems with a hard drive }
, Hence,
P {M } = 0.4, P {H} = 0.3, and P {M ∩ H} = 0.15.
and
P {M ∪ H} = P {M } + P {H} − P {M ∩ H} = 0.4 + 0.3 − 0.15 = 0.55,
0.45
P {fully functioning MB and HD} = 1 − P {M ∪ H} =
• Denote the events,
Then
I = {the virus enters through the internet}
E = {the virus enters through the e-mail}
P {Ē ∩ Ī} = 1 − P {E ∪ I} = 1 − (P {E} + P {I} − P {E ∩ I})
0.45
= 1 − (.3 + .4 − .15) =
It may help to draw a Venn diagram.
• Denote the events,
C = { knows C/C++ } , F = { knows Fortran } .
}
Then
0.4
}
(a) P F̄ = 1 − P {F } = 1 − 0.6 =
(b) P F̄ ∩ C̄ = 1 − P {F ∪ C} = 1 − (P {F } + P {C} − P {F ∩ C})
= 1 − (0.7 + 0.6 − 0.5) = 1 − 0.8 = 0.2
, 0.2
(c) P {C\F } = P {C} − P {F ∩ C} = 0.7 − 0.5 =
4 Instructor’s solution manual
0.1
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 =
0.8333
{ ∩ }
P C F 0.5
(e) P {C | F } = = =
P {F } 0.6
0.7143
P {C ∩ F } = 0.5 =
(f) P {F | C} =
P {C} 0.7
• Denote the events:
Then
D1 = {first test discovers the error} D2 = {second test discovers the error}D3
= {third test discovers the error}
}
P { at least one discovers } = P {D1 ∪ D2 ∪ D3}
= 1 − P D̄1 ∩ D̄2 ∩ D̄3
0.72
= 1 − (1 − 0.2)(1 − 0.3)(1 − 0.5) = 1 − 0.28 =
We used the complement rule and independence.
• }
• Let A = {arrive on time}, W = {good weather}. We have
P {A | W } = 0.8, P A | W̄ = 0.3, P {W } = 0.6
} }