Student version

advertisement
Topic 2-3 Total probability and Bayes’ theorem
Total probability theorem
Fig. 3
Determining
total probability
Event A
n1 outcomes
n2 outcomes
n3 outcomes
P(A|E1) = n1/N1
P(A|E2) = n2/N2
P(A|E3) = n3/N3
N1 + N2 + N3 = N
E1
E2
with N1 outcomes
E3
with N2 outcomes
with N3 outcomes
Suppose events E1, E2, E3 are mutually exclusive, while their union gives the whole sample space
(“collectively exhaustive”, c.e.). The probability of some event A is needed, while only its conditional
probabilities inside the E’s are given, together with all the P(Ei)’s. Since
P(A) = (n1 + n2 + n3 )/N,
rewriting ni = (ni/Ni)Ni = P(A| Ei)Ni where i = 1,2,3, and since Ni/N is exactly P(Ei),
P(A) = P(AE1)P(E1) + P(AE2)P(E2) + P(AE3)P(E3)
In general, if S is the union of n mutually exclusive events E1, E2, ... , En , then for any event A,
P(A) = P(AE1)P(E1) + P(AE2)P(E2) + ... + P(AEn)P(En)
(8)
(8) is useful when P(A) is needed when only the conditional probabilities of A in various sub-sample spaces
are given, together with the probabilities of those sub-sample spaces.
Bayes’ Theorem
Another question often of interest is: suppose A occurs (e.g. defective product), what is the conditional
probability P(E2|A) (e.g. produced by worker number 2) ? By (5)
P(E2|A) = P(AE2) / P(A)
then by (6a)
= P(A|E2) P(E2) / P(A)
where P(A) can be found by (8). The general formula (Bayes’ theorem) is then
P( E i | A) 
P( A | E i ) P( E i )
P( A | E1 ) P( E1 )  P( A | E 2 ) P( E 2 )  ...  P( A | E n ) P( E n )
where S is the union of the mutually exclusive events E1, E2, ... , En.
(9)
Solved problems
Problem 2-3-1
Traffic signals were installed at an intersection involving two one-way streets. Suppose 85% of the vehicles
will decelerate when they see the amber light, whereas 10% will accelerate and 5% are "indecisive" and
simply continue with the same speed. Five percent of those who accelerated will eventually run a red light,
and only 2% of the "indecisive" drivers will be forced to run a red light. All of those who decelerated are
able to stop before the red light.
(a) For a vehicle encountering the amber light at this intersection, what is the probability that it will run
the red light?
(b) If a vehicle were found to have run a red light, what is the probability that the driver had accelerated?
(c) The likelihood of an accident resulting from a vehicle running the red light (referred to as a problem
vehicle) is studied as follows. Suppose in 60% of the time, vehicles are waiting on the other street at
the start of their green light cycle, ready to cross the intersection. Most of these drivers, say 80%, are
cautious before they entered the intersection; whereas the rest are not cautious. Given the presence of a
problem vehicle in the intersection zone, a cautious driver can avoid the problem vehicle 95% of the
time, whereas 20% of the incautious drivers will collide with the problem vehicle. What is the
probability that a problem vehicle will lead to an accident?
(d) Suppose the annual traffic flow in one of these one-way streets is 100,000 vehicles and 5% of them
would encounter the amber signal light. Estimate the number of accidents per year in the intersection,
that would be traced back to vehicles running through red light in that street.
Solution:
(a) Let A, D, I denote the respective events that a driver encountering the amber light will accelerate,
decelerate, or be indecisive. Let R denote the event that s/he will run the red light. The given
probabilities are
P(A) = 0.10, P(D) = 0.85, P(I) = 0.05, also the conditional probabilities
P(R | A) = 0.05, P(R | D) = 0, P(R | I) = 0.02
By the theorem of total probability,
P(R) = P(R | A)P(A) + P(R | D)P(D) + P(R | I)P(I)
= 0.050.10 + 0 + 0.020.05
= 0.005 + 0.001
= 0.006
(b) The desired probability is P(A | R), which can be found by Bayes’ Theorem as
P(A | R) = P(R | A)P(A) / P(R)
= 0.050.10 / 0.006 = 0.005 / 0.006
 0.833
(c) Let V denote “there exists vehicle waiting on the other street”, where P(V) = 0.60 and P(V’) = 0.40; and
let C denote “Cautious driver in the other vehicle”, where P(C) = 0.80 and P(C’) = 0.20. The probability
of collision is
P(collision) = P(collision | V)P(V) + P(collision | V’)P(V’)
But the second term is zero (since there is no other vehicle to collide with), while P(collision | V) in the
first term is
P(collision | C)P(C) + P(collision | C’)P(C’)
= (1 – 0.95)0.80 + (1 – 0.80)0.20
= 0.050.80 + 0.200.20
= 0.08,
hence
P(collision) = P(collision | V)P(V)
= 0.080.60
= 0.048
(d) 100000 vehicles  5% = 5000 vehicles are expected to encounter the yellow light annually. Out of these
5000 vehicles, 0.6% (i.e. 0.006) are expected to run a red light, i.e. 50000.006 = 30 vehicles. These 30
dangerous vehicles have 0.048 chance of getting into a collision (i.e. accident), hence 300.048 = 1.44
accidents caused by dangerous vehicles can be expected at the intersection per year
Problem 2-3-2
At a construction project, the amount of material used in a day’s construction is either 100 units or 200
units, with corresponding probabilities 0.60 and 0.40. If the amount of material required in a day is 100
units, the probability of shortage of material is 0.10; whereas if the amount of material required is 200 units,
the probability of shortage of material is 0.30.
(a)
What is the probability of shortage of material in a given day? (ans. 0.18)
(b)
If there is a shortage of material in a given day, what is the probability that the amount of material
required that day is 100 units? (ans. 1/3)
Solution:
(a) Let E1, E2 denote the respective events of using 100 and 200 units, and S denote shortage of material.
P(S) = P(S | E1)P(E1) + P(S | E2)P(E2)
= 0.10.6 + 0.30.4
= 0.06 + 0.12 = 0.18
(b) Using Bayes’ theorem with the result from part (a),
P(E1 | S) = P(S | E1)P(E1) / P(S)
= 0.06 / 0.18 = 1/3
Problem 2-3-3
A space vehicle is designed to land on Mars. Assume the ground condition on Mars is either hard or soft. If
hard ground is encountered during landing, the vehicle will be successfully landed with probability 0.9;
whereas, if soft ground is encountered, the corresponding probability of successful landing is only 0.5.
Based on the available information, it is judged that the chance of hitting hard ground is three times that of
hitting soft ground.
(a) What is the probability of a successful landing? (ans. 0.8)
(b) Suppose a stick can be projected to test the ground condition before landing. It will penetrate into soft
ground with probability 0.9, and hard ground with probability of only 0.2. If the stick indeed penetrated
into the ground,
(i) What is the probability that the ground is hard? (ans. 0.4)
(ii) What is the probability of a successful landing now? (ans. 0.66)
Solution:
Let H and S denote Hard and Soft ground, respectively, and let L denote a successful landing. Given
probabilities:
P(L | H) = 0.9; P(L | S) = 0.5;
P(H) = 3P(S) , but since ground is either hard or soft
 P(H) = 0.75, P(S) = 0.25
(a) Using theorem of total probability,
P(L) = P(L | H)P(H) + P(L | S)P(S)
= 0.90.75 + 0.50.25
= 0.8
(b) Let E denote “penetration”. Given: P(E | S) = 0.9; P(E | H) = 0.2
(i) The “updated” probability of hard ground,
P’(H)  P(H | E)
= P(E | H)P(H) / [P(E | H)P(H) + P(E | S)P(S)] by Bayes’ theorem
= 0.20.75 / (0.20.75 + 0.90.25)
= 0.4
(ii) Using the updated probabilities P’(H) = 0.4, P’(S) = 1 - 0.4 = 0.6,
the updated probability of a successful landing now becomes
P’(L) = P(L | H)P’(H) + P(L | S)P’(S)
= 0.90.4 + 0.50.6
= 0.66
Problem 2-3-4
A small old bridge is susceptible to damages from heavy trucks. Suppose the bridge can have room for at
most two trucks, one in each lane. The event of possible damage to the bridge when two trucks are present
simultaneously is studied below.
Suppose 10% of the trucks are overloaded (i.e., above legal load limit) and the event of overloading is
statistically independent between trucks. The damage probability for the bridge is 30% when both trucks are
overloaded; the probability is 5% if only one is overloaded and 0.1% when both trucks are not overloaded.
(a)
What is the probability of damage to the bridge while supporting the two trucks?
(b)
If the bridge is damaged, what is the probability that it was indeed caused by overloaded truck (or
trucks)? [Hint: determine first the probability that was not caused by overloaded truck(s).]
(c)
Return to part (a). Suppose the county board can allocate a sum of money for strengthening the bridge
such that the probability of damage will be half of those given. Alternatively, that sum of money
could be used to increase the inspection frequency of trucks such that the fraction of overloaded
trucks entering the bridge is decreased from 10% to 6%. Which alternative is better if the objective is
to minimize the probability of damage to the bridge while supporting two trucks?
Solution:
Let O1 and O2 denote the events of truck 1 (in one lane) and 2 (in the other lane) being overloaded,
respectively, and let D denote the event of bridge damage. The given probabilities are P(O 1) = P(O2) = 0.1;
P(D | O1O2) = 0.3; P(D | O1O2’) = P(D | O1’O2) = 0.05; P(D | O1’O2’) = 0.001.
(a) P(D) can be determined by the theorem of total probability as
P(D| O1O2)P(O1O2) + P(D| O1O2’)P(O1O2’) + P(D| O1’O2)P(O1’O2) + P(D| O1’O2’)P(O1’O2’)
= 0.30.10.1 + 0.050.1(1 – 0.1) + 0.05(1 – 0.1)0.1 + 0.001(1 – 0.1)(1 – 0.1)
 0.0128
(b) P(O1  O2 | D) = 1 – P[ (O1  O2 )’ | D]
(but De Morgan’s rule says (O1  O2 )’ = O1’O2’)
= 1 – P(O1’O2’| D)
= 1 – P(D | O1’O2’)P(O1’O2’) / P(D)
= 1 – 0.0010.90.9 / 0.01281
 0.937
(c) The first alternative reduces all those conditional probabilities in (a) by half, hence the P(D) also
reduces by half to 0.0128 / 2 = 0.0064. If one adopts the second alternative, P(D) becomes
P(D| O1O2)P(O1O2) + P(D| O1O2’)P(O1O2’) + P(D| O1’O2)P(O1’O2) + P(D| O1’O2’)P(O1’O2’)
= 0.30.060.06 + 0.050.06(1 – 0.06) + 0.05(1 – 0.06)0.06 + 0.001(1 – 0.06)(1 – 0.06)
 0.0076
Hence one should take the first alternative (strengthening the bridge) to minimize P(D).
Exercises
Exercise 2-3-1
A geologic anomaly embedded at a site could induce geotechnical failure if the anomaly is sufficiently large
and consists of undesirable soil properties. Suppose an engineer estimates that there is a 30% likelihood that
anomaly may be present at a given site on the basis of the geology in the region. An exploration program
may be performed at the site to verify the presence of an anomaly.
One plan calls for the use of geophysical techniques. If indeed an anomaly is present, such techniques will
have 50% probability of detecting the anomaly; otherwise, no signal will be registered.
(a)
If the geophysical technique is used but it failed to detect any anomaly, what is the probability that
the occurrence of an anomaly is still possible at the site? (ans. 0.176)
(b)
At this point, a more discriminating plan is used such that the probability of detecting an anomaly is
as high as 80% if an anomaly is indeed present. Suppose this new plan also fails to detect any
anomaly.
(i)
How confident is the engineer now about his claim that the site is free of an anomaly? (ans.
0.959)
(ii)
A foundation system will be built at the site. The engineer estimates that the foundation should
be 99.99% safe if an anomaly does not exist. However, if an anomaly exists the reliability of
the foundation reduces to 80%. What is the probability of failure of this foundation system?
(ans. 0.992)
(iii)
Suppose failure of the foundation system could bring a loss of one million dollars; whereas
survival of the foundation system will not result in any loss. What is the expected loss
associated with the foundation? How much of this expected loss can be saved if the site can be
verified to be anomaly free? (Hint: Expected loss = probability of failure  failure loss) (ans.
$8300, $8200)
Exercise 2-3-2
A transit system consists of one-way trains running between four stations as shown in the following figure.
1
4
inter-station
distance in miles
7
2
4
5
3
5
The distance between stations are also shown. The probabilities concerning origin and destination of
passengers are summarized in the following matrix.
destination
origin
1
2
3
4
1
0
0.6
0.5
0.8
2
0.1
0
0.1
0.1
3
0.3
0.3
0
0.1
4
0.6
0.1
0.4
0
For example, a passenger originating from Station 1 will get off at Station 2, 3 or 4 with probabilities 0.1,
0.3 and 0.6, respectively. Furthermore, the fraction of trips originating from Stations 1, 2, 3 and 4 are 0.25,
0.15, 0.35 and 0.25, respectively.
(a)
What is the probability that a passenger will leave the train at Station 3? (ans. 0.145)
(b)
What is the expected trip length for a passenger boarding at Station 1? (note: “expected value of X” =
xi pi where pi is probability of the outcome xi) (ans. 11.5 miles)
(c)
What proportion of passenger trips will exceed 10 miles? (ans. 0.5)
(d)
What fraction of the passengers departing the train at Station 3 originated from Station 1? (ans.
0.517)

all
Exercise 2-3-3
A tower may be subjected to an earthquake load which could be of high intensity (event H) and of long
duration (event L). It is estimated that if the load has long duration, the probability that its intensity is high
is 0.7. Also, if the load has high intensity, there is 20% probability that it will be of short duration. Finally,
the probability of having a long duration earthquake load is 0.3. The designer estimates that the probability
of failure when the tower is subjected to a short duration high intensity earthquake is 0.05; whereas, this
probability is doubled if the earthquake is of long duration but low intensity. Also, he is certain that the
tower will fail if subjected to both high intensity and long duration earthquake, and that it will survive if
subjected to low intensity and short duration earthquake.
(a)
Are the events H and L mutually exclusive? Why? (ans. no)
(b)
Are the events H and L statistically independent? Why? (ans. no)
(c)
Are the events H and L collectively exhaustive? Why? (ans. no)
(d)
Determine the probability of failure of this tower subject to earthquake. (ans. 0.222)
Note: In parts (a), (b) and (c), please support your answers mathematically if possible.
Exercise 2-3-4
The likelihood of building damages during the next earthquake for a city is studied. The magnitude of the
next earthquake can be classified as low (L), medium (M), and high (H) with relative likelihood 15:4:1.
Suppose buildings may be divided into two types, namely, poorly constructed (B) and well constructed (G).
About 20% of the buildings are poorly constructed. It is estimated that a poorly constructed building will be
damaged with probability 0.1, 0.5, or 0.9 when subject to a low, medium or high magnitude earthquake,
respectively. Although a well constructed building will survive a low magnitude earthquake, it will be
damaged when subject to a medium or high magnitude earthquake with probability 0.05 or 0.2 respectively.
(a)
What is the probability that the next earthquake is a low magnitude one? (ans. 0.75)
(b)
What is the probability that a building picked at random in the city will be damaged during the next
earthquake? (ans. 0.06)
(c)
During a high magnitude earthquake,
(i)
(ii)
What percentage of the buildings will be damaged? (ans. 34%)
If a building survived without damage, what is the probability that it had been poorly
constructed? (ans. 0.030)
Exercise 2-3-5
The structure shown in the figure could be subject to settlement problem.
STRUCTURE
Weak zone?
Large or small?
The likelihood of having a settlement problem (event A) depends on the subsoil condition; in particular, if a
weak zone exists in the subsoil or not. If there is a small weak zone (event S), the probability of A is 0.2; if
the weak zone is large (event L), the probability of A becomes 0.6; lastly, if no weak zone exists (event N),
then the probability of A is only 0.05. Based on her experience with the neighborhood and the soil
information from the preliminary site exploration program, the engineer believes that there is 70% chance
that no weak zone underlies the structure; if there is a weak zone, it is twice as likely to be small than large.
(a)
What is the probability that the structure will have a settlement problem? (ans. 0.135)
(b)
Suppose an additional boring can be performed at the site to gather more information about the
presence of the weak material. The engineer judges that: if a large weak zone exists, it is 80% likely
that the boring will encounter it; this probability drops to 30% for a small weak zone. Obviously, the
boring will not encounter any weak material if the weak zone does not exist at all. Suppose the
additional boring indeed failed to encounter any weak material,
i.
ii.
iii.
What is the probability of the presence of a large weak zone? (ans. 0.023)
What is the probability of a small weak zone? (ans. 0.163)
What is the probability that the structure will have a settlement problem now? (ans. 0.087)
Exercise 2-3-6
A dam is proposed to be built in a seismically active area as shown in the following figure:
A
New Site
Dam
B
Two regions, A and B, can be identified in the vicinity such that earthquake eruption in either areas could
cause damage to the proposed dam. Earthquakes occur independently between region A and B. Suppose the
annual probabilities of earthquake occurrence in regions A and B are 0.01 and 0.02, respectively. Moreover,
the chance of two or more earthquakes occurring in each region is negligible.
(a)
What is the probability of an earthquake occurring in the vicinity of the dam in a given year? (ans.
0.0298)
(b)
If indeed an earthquake occurred in A (but not in B), the likelihood of damage to the dam is 0.3;
however, if an earthquake occurred in B (but not in A), the likelihood of damage is only 0.1.
Furthermore, if earthquakes occurred in both regions, the dam would have a 50/50 chance of damage.
What is the probability that the dam will be damaged in a given year? (ans. 0.00502)
(c)
Suppose the dam can be relocated close to the center of region A, such that earthquakes in region B
will not cause any damage to the dam. However, the likelihood of damage due to an earthquake in
region A will increase to 0.4. Should the dam be sited in this new location if the objective is to
minimize the probability of incurring damages? Please substantiate your answer. (ans. yes)
(d)
Would the decision in part (c) change if the new site is also susceptible to: (i) a landslide caused by
severe storms with an annual probability of 0.002, and (ii) a 0.001 annual probability of subsidence
due to poor supporting soil structures. Explain. Assume the dam will be damaged during landslide or
subsidence. Also the events of damage caused by earthquake, landslide, and subsidence are
statistically independent. (ans. do not move)
Exercise 2-3-7
Delays at the airport are common phenomenon. The likelihood of delay often depends on the weather
condition and time of the day. The following information is available at a local airport:
(i)
In the morning (AM), flights are always on time if good weather prevails; however, during bad
weather, half of the flights will be delayed.
(ii)
For the rest of the day (PM), the chances of delay during good and bad weather are 0.3 and 0.9,
respectively.
(iii)
30% of the flights are during AM hours, whereas 70% of the flights are during PM hours.
(iv)
Bad weather is more likely during morning; in fact, 20% of the mornings are associated with bad
weather, but only 10% of PM hours are subject to bad weather.
(v)
Assume only two kinds of weather, namely good or bad.
Define the events as follows:
A = AM (morning)
P = PM (rest of the day)
D = Delay
G = Good weather
B = Bad weather
Answer the following:
(a)
What fraction of the flights at this airport will be delayed? Observe that this is the same as the
probability that a given flight will be delayed. (ans. 0.282)
(b)
If a flight is delayed, what is the probability that it is caused by bad weather? (ans. 0.330)
(c)
What fraction of the morning flights at this airport will be delayed? (ans. 10%)
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
Landfill
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.
(c)
(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)
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)
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.
Download