CIVL 281 Fall 2000 Solutions to Week 2 HW
Text 2.28
With
A
I
= “air pollution in city I is controlled”;
A
II
= “air pollution in city II is controlled”;
W
I
= “water pollution in city I is controlled”
We have been given:
P(A
I
) = 4 P(A
II
)
P(A
I
P(A
I
A
II
) = 0.9
W
I
) = 0.32
P(A
I
) = 2P(W
I
)
(a) The desired event is A
I
A
II
whose probability is
P(A
I
A
II
) = P(A
I
A
II
)P(A
II
) by Bayes’ rule
= P(A
I
A
II
)P(A
I
)/4 by (g1)
= (0.9/4) P(A
I
) by(g2)
(g1)
(g2)
(g3)
(g4)
So we need P(A
I
). Exploiting the s.i. between water and air problems in city I,
P(A
I
W
I
) = P(A
I
) P(W
I
), hence
0.32 = (1/2) (P(A
I
)) 2 by (g3) and (g4)
(b) The desired event is W
I
(A
I
A
II
), with the probability (since W
I
is disjoint from A
I
and A
II
and hence their intersection) so P(A
I
) = 0.8; plugging this back gives
P(A
I
A
II
) = (0.9/4)(0.8) = 0.18
P(W
I
) P(A
I
A
II
)
= P(A
I
)/2 x P(A
I
A
II
) by (g4)
= 0.8/2 x 0.18 using answers found in (a) = 0.072
(c) The desired event is (W
I
A
I
)
A
II
, and this event has the probability
P(W
I
A
I
) + P(A
II
) - P(W
I
A
I
A
II
)
= P(W
I
) P( A
I
) + P(A
II
) - P(W
I
) P(A
I
A
II
)
= (0.8/2)(0.8) + (0.8/4) - (0.8/2)(0.18) = 0.448
Text 2.39
To see an alternative way of thinking, and to have a geometric appreciation of probability, I’ll do this one “graphically” for a change:
(1) Draw the sample space S as a square of unit width and height; hence area unity (probability 1).
All events will be drawn with the rule ( occupied area = its probability ).
(2) Draw a verticle line to partition S into two vertical strips of ratio 1:3; these represent the events F and H with P( F ) = 0.25 and P( H ) = 0.75, obviously (area = width
unit height). See picture below.
(3) Draw a horizontal line near the bottom to have the events S and W occupy respective areas 0.1 and
0.9
(4) Let C denote the event “collapse”, which will be represented by shaded areas on the sample space.
We know that, given a strong earthquake, C must occur regardless of tank fullness, hence the entire bottom strip is shaded. However, given a weak earthquake (i.e. upper 90% of the square), and with a full tank (i.e. inside the left strip), C’ and C are equally likely, so we give those events equal heights of 0.45 each (hence equal areas).
Tank is
Full ( F )
Tank is Half Full ( H )
Weak
Earthquake
( W )
Shaded areas
= Event C
(Collapse)
Strong Earthquake ( S )
(5) Now the desired probability can be read off from the diagram: we want P( F | C ), i.e. “collapse” definitely occurred, hence we only care about the shaded regions whose total area is 0.45*0.25 +
0.1*1 = 0.2125, among which F occupies an area of (0.45 + 0.1)*0.25 = 0.1375, hence the ratio
0.1375 / 0.2125 = 0.647
is our answer.
You should be able to translate all these numbers and pictures into algebraic expressions such as conditional probability, total probability, Bayes’ theorem, etc. Try it.
Text 2.43
Letter denotes the event…
A
B
L device A detects a group of diseased trees device B detects a group of diseased trees locating a group of diseased trees
Given probabilities:
P(A) = 0.8; P(B) = 0.9; P(L | AB’) = 0.7; P(L | A’B) = 0.4; P(L | AB) = 1
Also given:
Independence between devices A and B
, hence P(AB) = P(A)P(B), P(AB’) = P(A)P(B’), etc., where ‘ denotes compliment of an event.
(a) P(detection of a group of diseased trees)
= P(A
B)
= P(A) + P(B) – P(AB)
= P(A) + P(B) – P(A)P(B)
= 0.8 + 0.9 – (0.8)(0.9)
= 1.7 – 0.72
= 0.98
( independence)
(b) P(detection by only one device)
= P(AB’) + P(A’B) (note: the two events are m.e.)
= P(A)P(B’) + P(A’)P(B) ( independence)
= (0.8)(1 – 0.9) + (1 – 0.8)(0.9)
= 0.08 + 0.18
= 0.26
(c) P(L) = P(L|AB’)P(AB’) + P(L|A’B)P(A’B) + P(L|AB)P(AB)
= P(L|AB’)P(A)P(B’) + P(L|A’B)P(A’)P(B) + P(L|AB)P(A)P(B)
= 0.7*0.8*0.1 + 0.4*0.2*0.9 + 1*0.8*0.9
= 0.848
Exercise 2-1-2
Solution:
(a) E = A
B
C (or simply written ABC); this E is indicated by the shaded area in the following
Venn diagram:
E = ABC
A B
C
(b) From the Venn diagram, the compliment to E is the white area; a moment’s thought shows that
A’ B’ C’ gives this white area (e.g. start with A and mentally wet everything outside the ellipse
(A’). Do the same for B and C. Then the only dry place left would be the shaded area). Hence
(A
B
C)’ = A’ B’ C’ which is De Morgan’s law for the intersection of 3 events. This easily generalizes to more events,
(E
1
E
2
…
E n
)’ = E
1
’
E
2
’ …
E n
’
Exercise 2-2-2
Solution:
(a) Let A, B denote the event of the respective engineers spotting the error. Let E denote the event that the error is spotted, P(E) = P(A
B)
= P(A) + P(B) – P(AB)
= P(A) + P(B) – P(A)P(B)
= 0.8 + 0.9 – 0.8
0.9 = 0.98
(b) “Spotted by A alone” implies that B failed to spot it, hence the required probability is
P(AB’|E) = P(AB’
E)/P(E)
= P(E|AB’)P(AB’) / P(E)
= 1
P(A)P(B’) / P(E)
= 0.8
0.1 / 0.98
0.082
(c) With these 3 engineers checking it, the probability of not finding the error is
P(C
1
’C
2
’C
3
’) = P(C
1
’)P(C
2
’)P(C
3
’) = (1 – 0.75) 3 , hence
P(error spotted) = 1 – (1 – 0.75) 3
0.984, which is higher than the 0.98 in (a), so the team of 3 is better.
(d) The probability that the first error is detected (event D
1
) has been calculated in (a) to be 0.98.
However, since statistical independence is given, detection of the second error (event D
2
) still has the same probability. Hence P(D
1
D
2
) = P(D
1
)P(D
2
) = 0.98
2
0.960
Exercise 2-2-4
Solution:
(a) Let L and B denote the respective events of lead and bacteria contamination, and C denote water contamination.
P(C) = P(L
B)
= P(L) + P(B) – P(LB)
= P(L) + P(B) – P(L)P(B) L and B are independent events
= 0.04 + 0.02 – 0.04
0.02 = 0.0592
(b) P(LB’ | C) = P(CLB’) / P(C)
= P(C | LB’)P(LB’) / P(C), but P(C | LB’) = 1 ( lead alone will contaminate for sure) and P(LB’) = P(L)P(B’) ( statistical independence), hence the probability
= 1
P(L)P(B’) / P(C)
= 1
0.04
(1 – 0.02) / 0.0592
0.662
Exercise 2-2-6
Solution:
(a) Event I = E(W’
H); Event II = E’W’H
(b) P(I) = P[E(W’ H)] = P(E)P(W’ H) = P(E)[P(W’) + P(H) – P(W’H)]
= P(E)[P(W’) + P(H) – P(W’ | H)P(H)]
= 0.2
[0.1 + 0.3 – (1 – 0.6)
0.3] = 0.056
P(II) = P(E’W’H) = P(E’)P(W’H)
= P(E’)P(W’| H)P(H) = 0.8
(1 – 0.6)
0.3 = 0.096
(c1) Since P(W|H) = 0.6 which is nonzero, W and H are not mutually exclusive. They are not statistically independent either, since P(W|H) = 0.6, which significantly less than the unconditional probability P(W) = 0.9.
(c2) Events I and II are mutually exclusive, since I is in E, but II is in E’. There are other events in the sample space that are not covered by I and II, for example, the “everything’s fine” event of
WH’E’, hence I and II are not collectively exhaustive.
(d) Either event I or II would mean leakage. Since they are mutually exclusive, we have
P(I
II) = P(I) + P(II) = 0.056 + 0.096 = 0.152
Exercise 2-3-2
Solution:
(a) Note that any passenger must get off somewhere, so the sum over any row is one. Let O i
denote
“Origin at station i” and D i denote “Departure at station i”, where i = 1,2,3,4.
P(D
3
) = P(D
3
| O
1
)P(O
1
) + P(D
3
| O
2
)P(O
2
) + P(D
3
| O
2
)P(O
2
)
= 0.3
0.25 + 0.3
0.15 + 0.1
0.25 = 0.145
(b) For a passenger boarding at Station 1, his/her trip length would be 4, 9 or 14 minutes for departures at stations 2, 3 or 4, respectively. These lengths have respective probabilities 0.1, 0.3 and 0.6, hence the expected trip length is
(4
0.1 + 9
0.3 + 14
0.6) miles = 11.5 miles
(c) Let E = “trip exceeds 10 miles”,
P(E) = P(E | O
1
)P(O
1
) + P(E | O
2
)P(O
2
) + P(E | O
3
)P(O
3
) + P(E | O
4
)P(O
4
)
= P(D
4
| O
1
) P(O
1
) + P(D
1
| O
2
) P(O
2
) + P(D
1
D
2
| O
3
) P(O
3
) + P(D
2
D
3
| O
4
) P(O
4
)
= 0.6
0.25 + 0.6
0.15 + (0.5 + 0.1)
0.35 + (0.1 + 0.1)
0.25 = 0.5
(d) P(O
1
| D
3
) = P(D
3
| O
1
) P(O
1
) / P(D
3
) = 0.3
0.25 / 0.145
0.517
Exercise 2-3-4
Solution:
(a) P(L) =
15
15
4
1
=
15
= 0.75
20
(b) Given a poorly constructed building (denoted by subscript B), its total probability of getting damaged is
P
B
(D) = P
B
(D | L)P(L) + P
B
(D | M)P(M) + P
B
(D | H)P(H)
= 0.1
15
20
+ 0.5
4
20
+ 0.9
1
20
= 0.22, whereas the total probability of damage for a well constructed building (denoted by subscript G) is
P
G
(D) = P
G
(D | L)P(L) + P
G
(D | M)P(M) + P
G
(D | H)P(H)
= 0
15
20
= 0.02,
+ 0.05
4
20
+ 0.2
1
20 hence, for any randomly picked building,
P(D) = P
B
(D)P(B) + P
G
(D)P(G)
= 0.22
0.2 + 0.02
0.8
= 0.06
(c)
(i) 90% of poorly constructed buildings and 20% of well constructed ones will be damaged during a high magnitude earthquake, hence, of all buildings,
90%
20% + 20%
80% = 34% will be damaged, i.e. P(D | H) = 0.34
(ii) We are still working inside H, the reduced sample space. In here, (1 – 34%) = 66% are
“survivors”. On the other hand, we can expect poorly constructed buildings to make up
20% of H (or M, or L, since the type of earthquake that occurs has no bearing on workmanship), furthermore, only (1 – 0.9)
100% = 10% of these bad buildings in the event H can survive. Hence the desired probability is (number of surviving bad buildings in H)
(number of surviving buildings in H), i.e.
0 .
2
0
0 .
66
.
1
0.030
Exercise 2-3-6
Solution:
Let A, B denote occurrence of earthquake in the respective cities, and D denote damage to dam.
(a) P(A
B) = P(A) + P(B) – P(AB)
= P(A) + P(B) – P(A)P(B) since A and B are independent events
= 0.01 + 0.02 – 0.01
0.02 = 0.0298
(b)
Given: P(D|AB’) = 0.3, P(D|A’B) = 0.1, P(D|AB) = 0.5, want: P(D)
Theorem of total probability gives
P(D) = P(D|AB’)P(AB’) + P(D|A’B)P(A’B) + P(D|AB)P(AB)
(note: P(D|A’B’) = 0 so it is not included)
= P(D|AB’)P(A)P(B’) + P(D|A’B)P(A’)P(B) + P(D|AB)P(A)P(B)
= 0.3
0.01
0.98 + 0.1
0.99
0.02 + 0.5
0.01
0.02 = 0.00502
(c) Now that B has dropped out of the picture,
P(D) = P(D|A)P(A) + P(D|A’)P(A’)
= 0.4
0.01 + 0 = 0.004 < 0.00502, the new site is preferred since the yearly probability of incurring damages is about 20% lower.
(d)
Let Di denote “damage due to event i”, where i = E(arthquake), L(andslide), S(oil being poor).
P(D
E
D
L
D
S
) = 1 – P[(D
E
D
L
D
S
)’]
= 1 – P(D
E
’D
L
’D
S
’) by De Morgan’s rule,
= 1 – P(D
E
’)P(D
L
’)P(D
S
’) due to independence,
= 1 – (1 – 0.004) (1 – 0.002)(1 – 0.001)
0.006986 > 0.00502, one should move the site in this case, as the new site has a higher risk.
Exercise 2-3-8
Solution:
Let A, B denote the events that these respective wells observed contaminants, and L denote that there was indeed leakage. Given: P(A | L) = 0.8, P(B | L) = 0.9, P(L) = 0.7, also these wells never falsealarm, i.e. P(A’ | L’) = 1, P(B’ | L’) = 1.
(a) Given A’, Bayes’ theorem yields
P(L | A’) = P(A’ | L)P(L) / P(A’) where P(A’) = P(A’| L)P(L) + P(A’| L’)P(L’) = 0.2
0.7 + 1
0.3 = 0.44, hence
P(L | A’) = 0.2
0.7 / 0.44
0.318
(b)
(i) It will be convenient to first restrict our attention to within L, the only region in which
A or B can happen. In here, P
L
(A) = 0.8 and P
L
(B) = 0.9, hence
P (A
B | L) = P
L
(A) + P
L
(B) – P
L
(A)P
L
(B)
= 0.8 + 0.9 – 0.8
0.9 = 0.98, but this is only a relative probability with respect to L, hence the true probability
P(A
B) = P(A
B | L)
P(L) = 0.98
0.7 = 0.686
(ii)
A’B’ is the event “both wells observed no contaminant”. Note that, even in L, there is a small piece of A’B’, with probability
P(A’B’| L)P(L) = (1 – 0.8)
(1 – 0.9)
0.7 = 0.014, adding this to
P(A’B’| L’) = 0.3 (since both wells never false alarm) gives the total probability
P(A’B’) = 0.014 + 0.3 = 0.314, hence
P(L’ |A’B’)
= P(A’B’ | L’)P(L’) / P(A’B’)
= 1
0.3 / 0.314
0.955
(a) In terms of the ability to confirm actual existence of leakage, P(B | L) = 0.9 > P(A | L) = 0.8, i.e.
B is better. Also, in terms of the ability to infer safety, we have
P(L | A’)
0.318 as calculated in part (a), while a similar calculation gives
P(L | B’) = P(B’ | L)P(L) / P(B’) = 0.1
0.7 / (0.1
0.7 + 1
0.3)
0.189
Hence B gives a better assurance of non-leakage when it observes nothing. In short, B is better.
1.in the text book p.51, could u tell me the answer of the last question of example2.21?
2.in p.54, eqt 2.19a,is the last term need or need not multiply P(En | B)?
3.in p.54, example2.24, why the probability of I3 is 1 if either I1 or I2 or both happen? if there is an accident at the intersection of I2 and I1, then I3 may still not happen.
Answers:
1.
First, we assume that the conditional probability P(B|S) is larger than 1/8.
If P(B|S)>1/8 then
P(BS)=P(B|S)P(S)>1/8*P(S)=1/8*0.008=0.001
Since P(B)=0.001,we have
P(BS)>0.001=P(B)
But P(BS)>P(B) is impossible which can be verified by Venn diagram.
So the first assumption is wrong which means P(B|S) cannot be larger than 1/8.
2.
Yes. The last term must multiply P(En|B).
3.
In the problem(a) we assume that the capacity of I3 is the same as that of I1 or I2. And I1 and I2 have equal capacities. So the three high ways have equal capacities.
What we consider is the traffic flow not accidents. So if the traffic in I1 or I2, or both is excessive, the traffic in I3 will be excessive. We don’t consider the time fact.
Exercise 2-2-7
The damage in a structure after an earthquake can be classified as none (N), light (L) or heavy (H).
For a new undamaged structure, the probability that it will suffer light and heavy damages after an earthquake is 0.2 and 0.05 respectively. However, if a structure was already lightly damaged, its probability of getting heavy damage during the next earthquake is increased to 0.5.
(a) For a new structure, what is the probability that it will be heavily damaged after 2 earthquakes?
Assume that no repair was performed after the first earthquake. (ans. 0.188)
(b) If a structure is indeed heavily damaged after 2 earthquakes, what is the probability that the structure was either undamaged or lightly damaged before the second earthquake? (ans. 0.733)
(c) If the structure is restored to undamaged condition after each earthquake , what is the probability that the structure will ever experience heavy damage during three earthquakes?
(ans. 0.143)
Solution:
(a) Let subscripts 1 and 2 denote “after first earthquake” and “after second earthquake”. Note that (i) occurrence of H
1
makes H
2
a certain event; (ii) H, L and N are mutually exclusive events and their union gives the whole sample space.
P(heavy damage after two quakes) = P(H
2
H
1
) + P(H
2
L
1
) + P(H
2
N
1
)
= P(H
2
| H
1
) P(H
1
) + P(H
2
| L
1
)P(L
1
)+ P(H
2
| N
1
)P(N
1
)
= 1
0.05 + 0.5
0.2 + 0.05
(1 – 0.2 – 0.05)
0.188
(b) The required probability is [P(H
2
L
1
) + P(H
2
N
1
)] / P(heavy damage after two quakes)
= (0.5
0.2 + 0.05
0.75) / (1
0.05 + 0.5
0.2 + 0.05
0.75)
0.733
(c) In this case, one always starts from an undamaged state, the probability of not getting heavy damage at any stage is simply (1 – 0.05) = 0.95 (not influenced by previous condition). Hence
P(any heavy damage after 3 quakes) = 1 – P(no heavy damage in each of 3 quakes)
= 1 – 0.95
3
0.143
.
Alternatively, one could explicitly sum the probabilities of the three mutually exclusive events,
P(H) = P(H
1
) + P(H
2
H
1
’) + P(H
3
H
2
’ H
1
’) = 0.05 + 0.05
0.95 + 0.05
0.95
0.95
0.143
Exercise 2-3-8
Leakage of contaminated material is suspected from a given landfill. Monitoring wells are proposed to verify if indeed leakage has occurred. The location of two wells are shown in the following figure:
B
A
If indeed leakage has occurred, it will be observed by well A with 80% probability; whereas well B is
90% likely to detect the leakage. Assume that either well will not register any contaminant if indeed there is no leakage from the landfill. Before the wells are installed, the engineer believes that it is
70% chance that the leakage has happened.
(a) Suppose Well A has been installed and no contaminants were observed. How likely will the engineer now believe that leakage has occurred? (ans. 0.318)
(b) Suppose both wells have been installed. Assume that the events of detecting leakage between the wells are statistically independent.
(i) What is the probability that contaminants will be observed in at least one of the wells?
(ans. 0.686)
(ii) If indeed contaminants were not observed by the wells, how confident is the engineer in concluding that no leakage has occurred? (ans. 0.955)
(c) If the cost of installing Well A is the same as Well B, and that budget allows installation of only one well, which well should be installed? Please justify. (ans. B)
Solution:
Let A, B denote the events that these respective wells observed contaminants, and L denote that there was indeed leakage. Given: P(A | L) = 0.8, P(B | L) = 0.9, P(L) = 0.7, also these wells never falsealarm, i.e. P(A’ | L’) = 1, P(B’ | L’) = 1.
(c) Given A’, Bayes’ theorem yields
P(L | A’) = P(A’ | L)P(L) / P(A’) where P(A’) = P(A’| L)P(L) + P(A’| L’)P(L’) = 0.2
0.7 + 1
0.3 = 0.44, hence
P(L | A’) = 0.2
0.7 / 0.44
0.318
(d)
(iii) It will be convenient to first restrict our attention to within L, the only region in which
A or B can happen. In here, P
L
(A) = 0.8 and P
L
(B) = 0.9, hence
P (A
B | L) = P
L
(A) + P
L
(B) – P
L
(A)P
L
(B)
= 0.8 + 0.9 – 0.8
0.9 = 0.98, but this is only a relative probability with respect to L, hence the true probability
P(A
B) = P(A
B | L)
P(L) = 0.98
0.7 = 0.686
(iv)
A’B’ is the event “both wells observed no contaminant”. Note that, even in L, there is a small piece of A’B’, with probability
P(A’B’| L)P(L) = (1 – 0.8)
(1 – 0.9)
0.7 = 0.014, adding this to
P(A’B’| L’) = 0.3 (since both wells never false alarm) gives the total probability
P(A’B’) = 0.014 + 0.3 = 0.314, hence
P(L’ |A’B’)
= P(A’B’ | L’)P(L’) / P(A’B’)
= 1
0.3 / 0.314
0.955
(b) In terms of the ability to confirm actual existence of leakage, P(B | L) = 0.9 > P(A | L) = 0.8, i.e.
B is better. Also, in terms of the ability to infer safety, we have
P(L | A’)
0.318 as calculated in part (a), while a similar calculation gives
P(L | B’) = P(B’ | L)P(L) / P(B’) = 0.1
0.7 / (0.1
0.7 + 1
0.3)
0.189
Hence B gives a better assurance of non-leakage when it observes nothing. In short, B is better.
Exercise 2-3-9
Drinking water may be contaminated by two pollutants. In a given community, the probability of its drinking water containing excessive amount of pollutant A is 0.1 whereas that of pollutant B is 0.2.
When pollutant A is excessive, it will definitely cause health problem; however, when pollutant B is excessive, it will cause health problem in only 20% of the population who has low natural resistance to that pollutant. Also, data from many similar communities reveal that the presences of these two pollutants in drinking water are not independent; half of those communities whose drinking water containing excessive amount of pollutant A will also contain excessive amount of pollutant B.
Suppose a resident is selected at random from this community, what is the probability that he/she will suffer health problem from drinking water? You may assume that a person’s resistance to pollutant B is innate, which is independent of the event of having excessive pollutant in the drinking water.
Solution:
Let A and B denote having excessive amounts of the named pollutant, and H denote having a health problem due contaminated water. Let us partition the sample space into AB, A’B, AB’, A’B’. The total probability of having a health problem is
P(H) = P(H | AB)P(AB) + P(H | A’B)P(A’B) + P(H | AB’)P(AB’) + P(H | A’B’)P(A’B’) where P(H | AB) = P(H | AB’) = 1 since existence of pollutant A causes health problem for sure;
P(H | A’B) = 0.2 since existence of pollutant B affects 20% of all people (even when A is absent)
P(H | A’B’) = 0 since there is no cause for any health problem; also
P(AB) = P(B | A)P(A) = 0.5
0.1 = 0.05;
P(A’B) = P(B) – P(AB) = 0.2 – 0.05 = 0.15 (this is clear from a Venn diagram);
P(AB’) = P(B’| A)P(A) = (1 – 0.5)
0.1 = 0.05;
P(H) = 1
0.05 + 0.2
0.15 + 1
0.05 = 0.13