Complete Solution Manual
Probability and Statistics for
Computer Scientists
Baron LATEST
2O25 u
, 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 {E¯ ∩ 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
, 4 INSTRUCTOR’S SOLUTION MANUAL
(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
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 = 0.1
(e) P {C | F
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
Probability and Statistics for
Computer Scientists
Baron LATEST
2O25 u
, 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 {E¯ ∩ 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
, 4 INSTRUCTOR’S SOLUTION MANUAL
(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
(d) P {F \C} = P {F } − P {F ∩ C} = 0.6 − 0.5 = 0.1
(e) P {C | F
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