You are on page 1of 4

Stat 330 Solution to Homework 3

1 Independence, Baron p. 40
Events A and B are independent. Show, intuitively, and mathematically, that
(a) Their complements are also independent.
We know, that P (A ∩ B) = P (A)P (B).
We want to find out about the probability of the intersection of the complements. Intuitively, the
complements should be independent, since the occurrence of the event or the negative of the events
should not matter in the case of independence.
Mathematically, we get:

P (A ∩ B) = P (A) + P (B) − P (A ∪ B) =
= P (A) + P (B) − (1 − P (A ∩ B)) =
= P (A) + P (B) − (1 − P (A) · P (B)) =
= 1 − P (A) + P (B) − 1 + P (A) · P (B)) =
= P (A) 1 − P (B)) + P (B) = P (A) · P (B)

(b) If they are disjoint, then P (A) = 0 or P (B) = 0.


Since we know, that P (A ∩ B) = P (A)P (B) the statement follows directly, if we also assume, that the
events are disjoint, i.e. P (A ∩ B) = 0

(c) If they are exhaustive (i.e. A ∪ B = Ω), then P (A) = 1 or P (B) = 1.


From 1 = P (A ∪ B) we get,

1 = P (A ∪ B) = 1 − P (A ∩ B) = 1 − P (A) · P (B)

Therefore

P (A) · P (B) = 0,

which implies that either P (A) = 0 or P (B) = 0. Then either P (A) = 1 or P (B) = 1.
(4 points)

2 Bayes’ Theorem
(a) Suppose that a barrel contains many small plastic eggs. Some eggs are painted red and some are painted
blue. 40% of the eggs in the bin contain pearls, and 60% contain nothing. 30% of eggs containing
pearls are painted blue, and 10% of eggs containing nothing are painted blue. What is the probability
that a blue egg contains a pearl?
What do we know? - P (pearl) = 0.4, P (blue | pearl) = 0.3, and P (blue | no pearl) = 0.1.
We want to find P (pearl | blue)

1
This is an application of Bayes theorem:

P (pearl ∩ blue)
P (pearl | blue) = =
P (blue)
P (blue | pearl)P (pearl)
= =
P (blue | pearl)P (pearl) + P (blue | no pearl)P (no pearl)
0.3 · 0.4 0.12
= = = 2/3
0.3 · 0.4 + 0.1 · 0.6 0.12 + 0.06

(b) 1% of women at age forty who participate in routine screening have breast cancer. 80% of women
with breast cancer will get positive mammographies. 9.6% of women without breast cancer will also
get positive mammographies. A woman in this age group had a positive mammography in a routine
screening. What is the probability that she actually has breast cancer?
What do we know? - P (cancer) = 0.01, P (test pos. | cancer) = 0.8, and P (test pos. | no cancer) =
0.096.
We want to find P (cancer | test pos.)
This is an application of Bayes theorem:

P (cancer ∩ test pos.)


P (cancer | test pos.) = =
P (test pos.)
P (test pos. | cancer)P (cancer)
= =
P (test pos. | cancer)P (cancer) + P (test pos. | no cancer)P (no cancer)
0.8 · 0.01 0.08
= = = 0.0776.
0.8 · 0.01 + 0.096 · 0.99 0.08 + 0.9504

3 Debugging with Probabilities


Consider the following program segment:
if B then
while B1 do S
else
while B2 do S

Assume that P (B = true ) = p, P (B1 = true ) = 2/5, and P (B2 = true ) = 3/5.
S prints the message ’good day’ in each iteration.
Past evaluations have shown that the probability for exactly two ’good day’ messages is 3/25.
Use a tree diagram to determine the value of p (You will not be able to draw the whole tree, since it
is infinitely large. Just draw the part you need to solve the problem.)
The basic idea of this problem is to figure out a way how we get exactly two “good day” messages.

2
0.4 B1
0.4 B1
0.6 B1
B1
0.4
0.6 B1
B
p
0.6
B1
start 2 messages
B2
1-p 0.6
B

0.6 B2
0.4
B2
0.6 B2
0.4 B2
0.4 B2

There are two possibilities for exactly two “good day” messages:

• B true, B1 true, B1 true, B1 false =: way 1


• B false, B2 true, B2 true, B2 false =: way 2
The probabilities for each of the ways are:

12
P ( way 1 ) = p · 2/5 · 2/5 · 3/5 = p ·
125
18
P ( way 2 ) = (1 − p) · 3/5 · 3/5 · 2/5 = (1 − p) ·
125
Therefore

3/25 = P ( “exactly 3 ‘good day’ messages” ) = P ( way 1 or way 2 ) = P ( way 1 ) + P ( way 2 )

1 3
⇐⇒ [12p + (1 − p)18] =
125 25
⇐⇒ p = 0.5

4 Random Variables
Many answers are correct.

5 Missile Protection System


A missile protection system consists of n radar sets operating independently, each with probability 0.9 of
detecting a missile entering a zone that is covered by all of the units.

3
a) Find a nice expression for the probability of detecting at least one of the sets detects the missile. (Tip:
what is the probability, that a missile is not detected by any of the sets? - and what has this probability
to do with the above?)
The probability that the missile is not detected by any of n sets is given as (1 − 0.9)n = 0.1n .
This event is the exact opposite of ”at least one of the sets detects the missile”. Therefore, we can
compute the probability asked for as 1 − 0.1n .

b) How large must n be if we require that the probability of detecting a missile that enters the zone be
0.999 ? 0.999999 ?

0.999 = 1 − 0.13 , 0.999999 = 1 − 0.16

In the first case we would need 3 radar sets, in the second 6.

c) If n = 5 and a missile enters the zone, what is the probability that exactly 4 sets detect the missile?
At least one set?
we can think of this set-up as a Bernoulli sequence with 5 repetitions. Then, the probability that exactly
4 radar sets detect the missile is:
 
4 5
0.9 · 0.1 · = 0.32805.
1

At least one set - we computed that probability before: 0.99999.

Let X be the number of times a keyword is found. Then

P (X ≥ 2) = P (X = 2) + P (X = 3) + P (X = 4)

and the probability to find a keyword in exactly 2 databases out of a random four databases is
5
 4
2 · 2 10 · 6
P (X = 2) = 9
 = = 0.4762.
4
126

Similarly,
5 4
 
3 · 1 10 · 4
P (X = 3) = 9
 = = 0.3175
4
126
5 4
 
4 · 0 5
P (X = 4) = 9
 = = 0.0397
4
126

105
and P (X ≥ 2) = 126 = 0.8333.

You might also like