Complete Solution Manual
Probability and Statistics for
Computer Scientists 2nd
Edition Baron LATEST
2O23
, CHAPTER 2 3
Chapter 2
2.1 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 if
the order matters).
Thus,
number of favorable outcomes
P (both chips are defective) = = 1/15
total number of outcomes
2.2 Denote the events:
M = { problems with a motherboard }
H = { problems with a hard drive }
We have:
P {M } = 0.4, P {H} = 0.3, and P {M ∩ H} = 0.15.
Hence,
P {M ∪ H} = P {M } + P {H} − P {M ∩ H} = 0.4 + 0.3 − 0.15 = 0.55,
and
P {fully functioning MB and HD} = 1 − P {M ∪ H} = 0.45
2.3 Denote the events,
I = {the virus enters through the internet}
E = {the virus enters through the e-mail}
Then
P {Ē ∩ I¯} = 1 − P {E ∪ I} = 1 − (P {E} + P {I} − P {E ∩ I})
= 1 − (.3 + .4 − .15) = 0.45
It may help to draw a Venn diagram.
2.4 Denote the events,
C = { knows C/C++ } , F = { knows Fortran } .
Then
}
(a) P F̄ = 1 − P {F } = 1 − 0.6 = 0.4
}
(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
(c) P {C\F } = P {C} − P {F ∩ C} = 0.7 − 0.5 = 0.2
, 4 INSTRUCTOR’S SOLUTION MANUAL
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 = 0.1
P { C ∩ F } 0.5
(e) P {C | F } = = = 0.8333
P {F } 0.6
P {C ∩ F } 0.5
(f) P {F | C} = = = 0.7143
P {C} 0.7
2.5 Denote the events:
D1 = {first test discovers the error}
D2 = {second test discovers the error}
D3 = {third test discovers the error}
Then
P { at least one discovers } = P {D1 ∪ D2 ∪ D3}
}
= 1 − P D̄1 ∩ D̄2 ∩ D̄3
= 1 − (1 − 0.2)(1 − 0.3)(1 − 0.5) = 1 − 0.28 = 0.72
We used the complement rule and independence.
2.6 Let A = {arrive on time}, W = {good weather}. We have
}
P {A | W } = 0.8, P A | W̄ = 0.3, P {W } = 0.6
By the Law of Total Probability,
} }
P {A} = P {A | W } P {W } + P A | W̄ P W̄
= (0.8)(0.6) + (0.3)(0.4) = 0.60
2.7 Organize the data. Let D = {detected} , I = {via internet} , E = {via e-mail } = I.
Notice that the question about detection already assumes that the spyware has entered
the system. This is the sample space, and this is why P {I} + P {E} = 1. We have
P {I} = 0.7, P {E} = 0.3, P {D | I} = 0.6, P {D | E} = 0.8.
By the Law of Total Probability,
P {D} = (0.6)(0.7) + (0.8)(0.3) = 0.66
2.8 Let A1 = {1st device fails}, A2 = {2nd device fails}, A3 = {3rd device fails}.
P { on time } = P { all function }
}
= P A1 ∩ A 2 ∩ A3
} } }
= P A1 P A2 P A3 (independence)
= (1 − 0.01)(1 − 0.02)(1 − 0.02) (complement rule)
= 0.9508
Probability and Statistics for
Computer Scientists 2nd
Edition Baron LATEST
2O23
, CHAPTER 2 3
Chapter 2
2.1 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 if
the order matters).
Thus,
number of favorable outcomes
P (both chips are defective) = = 1/15
total number of outcomes
2.2 Denote the events:
M = { problems with a motherboard }
H = { problems with a hard drive }
We have:
P {M } = 0.4, P {H} = 0.3, and P {M ∩ H} = 0.15.
Hence,
P {M ∪ H} = P {M } + P {H} − P {M ∩ H} = 0.4 + 0.3 − 0.15 = 0.55,
and
P {fully functioning MB and HD} = 1 − P {M ∪ H} = 0.45
2.3 Denote the events,
I = {the virus enters through the internet}
E = {the virus enters through the e-mail}
Then
P {Ē ∩ I¯} = 1 − P {E ∪ I} = 1 − (P {E} + P {I} − P {E ∩ I})
= 1 − (.3 + .4 − .15) = 0.45
It may help to draw a Venn diagram.
2.4 Denote the events,
C = { knows C/C++ } , F = { knows Fortran } .
Then
}
(a) P F̄ = 1 − P {F } = 1 − 0.6 = 0.4
}
(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
(c) P {C\F } = P {C} − P {F ∩ C} = 0.7 − 0.5 = 0.2
, 4 INSTRUCTOR’S SOLUTION MANUAL
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 = 0.1
P { C ∩ F } 0.5
(e) P {C | F } = = = 0.8333
P {F } 0.6
P {C ∩ F } 0.5
(f) P {F | C} = = = 0.7143
P {C} 0.7
2.5 Denote the events:
D1 = {first test discovers the error}
D2 = {second test discovers the error}
D3 = {third test discovers the error}
Then
P { at least one discovers } = P {D1 ∪ D2 ∪ D3}
}
= 1 − P D̄1 ∩ D̄2 ∩ D̄3
= 1 − (1 − 0.2)(1 − 0.3)(1 − 0.5) = 1 − 0.28 = 0.72
We used the complement rule and independence.
2.6 Let A = {arrive on time}, W = {good weather}. We have
}
P {A | W } = 0.8, P A | W̄ = 0.3, P {W } = 0.6
By the Law of Total Probability,
} }
P {A} = P {A | W } P {W } + P A | W̄ P W̄
= (0.8)(0.6) + (0.3)(0.4) = 0.60
2.7 Organize the data. Let D = {detected} , I = {via internet} , E = {via e-mail } = I.
Notice that the question about detection already assumes that the spyware has entered
the system. This is the sample space, and this is why P {I} + P {E} = 1. We have
P {I} = 0.7, P {E} = 0.3, P {D | I} = 0.6, P {D | E} = 0.8.
By the Law of Total Probability,
P {D} = (0.6)(0.7) + (0.8)(0.3) = 0.66
2.8 Let A1 = {1st device fails}, A2 = {2nd device fails}, A3 = {3rd device fails}.
P { on time } = P { all function }
}
= P A1 ∩ A 2 ∩ A3
} } }
= P A1 P A2 P A3 (independence)
= (1 − 0.01)(1 − 0.02)(1 − 0.02) (complement rule)
= 0.9508