Download P(Bi | A)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Birthday problem wikipedia , lookup

Inductive probability wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Test 1, ENCI303, 23 March 2010
Formula Sheet
P (A) = P (A | B1 )P (B1 ) + · · · + P (A | Bn )P (Bn )
P (A | Bi )P (Bi )
P (Bi | A) = P
i P (A | Bi )P (Bi )
P (A ∪ B) = P (A) + P (B) − P (AB)
V ar(X) = E(X 2 ) − (E(X))2
Binomial distribution: P (X = x) =
n
x
px (1 − p)n−x ,
n
x
=
n!
x!(n−x)!
Poisson distribution with rate λ: P (X = x) = e−λ λx /x!
INSTRUCTIONS:
1. For two events A and B, if p = P (A | B), which of the following is always
equal to 1 − p:
(a) P (Ac |B c )
(b) P (Ac |B)
(c) P (A|B c )
(d) P (B|A)
Solution. The answer is (b), because given that B occurs, either A occurs
or A doesn’t occur, and these are all the possibilities, so P (A|B)+P (Ac |B) = 1.
2. Suppose two events, A and B, are dependent, with 0 < P (A) < 1,
0 < P (B) < 1. Which of the following can be said about A and B c ?
(a) A and B c are independent.
(b) A and B c are mutually exclusive.
1
(c) A and B c are dependent.
(d) none of the above.
Solution (updated). Because A and B are dependent, P (B|A) 6= P (B).
Thus,
P (B c |A) = 1 − P (B|A) 6= 1 − P (B) = P (B c )
Because P (B c |A) 6= P (B c ), A and B c are not independent.
3. Suppose I flip a fair coin. If I get Heads, then I roll a 6-sided die. If I get
Tails, then I roll two 6-sided dice and count the total.
(a) Let X be the value of the die or dice that I get. Find P (X = 6).
Solution. Use the total probability formula:
P (X = 6) = P (X = 6|H)P (H) + P (X = 6|T )P (T ) =
5 1
11
1 1
· +
· =
6 2 36 2
72
(b) Suppose that I get X = 6. Given that I got X = 6, what is the probability that the coin landed Heads?
Solution. Use Bayes Formula.
P (H|X = 6) =
(1/6)(1/2)
72
6
P (X = 6|H)P (H)
=
=
=
P (X = 6)
11/72
12 · 11
11
4. Suppose the travel time between two major cities A and B by air is 6 or 7 hr
if the flight is nonstop; however, if there is one stop, the travel time would be
9, 10, or 11 hr. A nonstop flight between A and B would cost $1200, whereas
with one stop the cost is only $550. Then, between cities B and C, all flights
are nonstop requiring 2 or 3 hours at a cost of $300. For a passenger wishing to
travel from city A to city C,
(a) What is the possibility space or sample space of his travel times from A
to B? From A to C?
Solution:
S = {(6, $1200), (7, $1200), (9, $550), (10, $550), (11, $550)}
(b) What is the sample space of his travel cost from A to C?
2
Solution. You can write this in a couple ways, depending on whether you
keep track of just the total hours and total cost, or keep track of the outcomes
for the separate portions of the flights.
S = {(6, $1200, 2, $300), (7, $1200, 2, $300), (9, $550, 2, $300), (10, $550, 2, $300), (11, $550, 2, $300),
(6, $1200, 3, $300), (7, $1200, 3, $300), (9, $550, 3, $300), (10, $550, 3, $300), (11, $550, 3, $300)}
Or
S = {(8, $1500), (9, $1500), (11, $850), (12, $850), (13, $850), (9, $1500), (10, $1500), (14, $850)}
Note that some combinations can occur in more than one way.
(c) If T = travel time from city A to city C, and S = cost of travel from A
to C, what is the sample space of T and S?
Solution. For T , the travel time has sample space S = {8, 9, 11, 12, 13, 14}
and the cost has sample space S = {$850, $1500}.
5. The maximum intensity of the next earthquake in a city may be classified
(for simplicity) as low (L), medium (M ), or high (H) with relative likelihoods
of 15:4:1. Suppose also that buildings may be divided into two types; poorly
constructed (P ) and well constructed (W ). About 20% of all the buildings in
the city are known to be poorly constructed for earthquake resistance.
It is estimated that a poorly constructed building will be damaged with a
probability of 0.10, 0.50, or 0.90 when subjected to a low-, medium-, or highintensity earthquake, respectively. However, a well-constructed building will
survive a low-intensity earthquake, although it may be damaged when subjected to a medium- or high-intensity earthquake with probability of 0.05 or
0.20, respectively.
(a) What is the probability that a well-constructed building will be damaged
during the next earthquake?
Solution.
If the relative probabilities for intensities are 15:4:1, then we have P (L) =
0.75, P (M ) = 0.2 and P (H) = 0.05. The probability of damage for a well constructed building can be found using total probability, and we assume that the
intensity of the earthquake is independent of the quality of the building being
considered.
3
P (D|W ) = P (D|W L)P (L|W ) + P (D|W M )P (M |W ) + P (D|W H)P (H|W )
= P (D|W L)P (L) + P (D|W M )P (M ) + P (D|W H)P (H)
= 0 + (0.05)(0.2) + (0.2)(0.05)
= 0.02
(b) What proportion of the buildings in this city will be damaged during the
next earthquake?
Solution. A similar calculation as in (a) for poorly constructed buildings
gives
P (D|P ) = P (D|P L)P (L) + P (D|P M )P (M ) + P (D|P H)P (H)
= (0.1)(0.75) + (0.5)(0.2) + (0.9)(0.05)
= 0.22
Therefore,
P (D) = P (D|P )P (P ) + P (D|W )P (W ) = (0.22)(0.2) + (0.02)(0.8) = 0.06
(c) If a building in the city is damaged after an earthquake, what is the
probability that the building was poorly constructed?
P (P |D) =
P (D|P )P (P )
(0.22)(0.2)
=
= 0.73
P (D)
0.06
Note that 0.73 > 0.2, the fraction of buildings that are poorly constructed,
which makes sense. Knowing that a building was damaged in an earthquake
makes it more likely (knowing nothing else about the building) that the building
was poorly constructed.
6. The number of traffic accidents at a particular intersection has a Poisson
with a rate of 1 in every 3 yr.
(a) What is the probability that there will not be any accidents in the next five
years?
Solution. The rate over a five year interval is (1/3)(5) = 5/3, so the probability of no accidents in a five year interval is e−5/3 ≈ 0.19.
4
(b) Suppose that every accident at this intersection has a 5% chance of fatality. What is the probability that there is a fatal accident within the next 3 years?
Solution.
The rate of accidents in a three year period is 1. The rate of fatal accidents
is (1)(0.05) = 0.05. The probability of at least one fatal accident in the next 3
years is
P (X ≥ 1) = 1 − P (X = 0) = 1 − e−0.05 ≈ 0.049.
0.0
0.2
0.4
F(x)
0.6
0.8
1.0
7. Consider the cdf on the following page, which is only plotted from x = −2
to x = 7:
−2
0
2
4
x
Answer the following questions:
(a) What is P (X = −1)?
P (X = −1) = 0.2
(b) What is P (X ≤ 1)?
5
6
P (X ≤ 1) = 0.3
(c) What is P (X < 1)
P (X < 1) = P (X ≤ 0) = 0.3
(d) What is P (0 < X < 2)?
P (0 < X < 2) = 0
(e) Write the probability mass function P (X = i). Be sure to specify the
mass function for all real values i.

0.2





0.1



0.3
P (X = i) =

0.1




0.3



0
6
i = −1
i=0
i=2
i=3
i=5
otherwise
(1)