You are on page 1of 5

Homework 4 (Chapter 4)

1. Given events A and B that may overlap, derive the probability in terms of sets using the
axioms of probability for:

a) neither A nor B

P( (A∪B)’ ) = 1 – P(A∪B) = 1 – ( P(A) + P(B) – P(A∩B) )

b) either A or B, not both (exclusive OR)

P( A∪B – A∩B ) = P(A) + P(B) – 2*P(A∩B)

2. Three bins contain some good and defective components as follows:

Bin Good Bad


1 8 2
2 3 1
3 2 2

Over a long period of time, 20% of components are drawn from bin 1, 30% from bin 2, and
50% from bin 3.

(a) Draw a probability tree.


(b) If a defective part is drawn, what are the probabilities it came out of each bin ? Write
the probability table showing the outcomes, prior, conditional, joint, and posterior
probabilities.
(a) Let G = good and B = bad

0.2 0.3 0.5

Bin 1 2 3

G B G B G B
0.8 0.2 0.75 0.25 0.5 0.5

b)

Prior Conditional Joint Posterior


Hi P(Hi) P(B | Hi) P(B | Hi) P(Hi) P(Hi | B)
Bin 1 0.2 0.2 0.04 0.110
Bin 2 0.3 0.25 0.075 0.205
Bin 3 0.5 0.5 0.25 0.685

where probability of drawing a bad part from any bin is

P(B) = P(Bin1 ∩ B) + P(Bin2 ∩ B) + P(Bin3 ∩ B)


= 0.04 + 0.075 + 0.25
= 0.365

(since P(H ∩ E) = P(E | Hi) P(Hi)) and the posterior probabilities, which are the
probabilities the defective component came from bin 1, 2, or 3 are

P(Bin1 ∩ B) 0.04
P(Bin1 | B) = P(B) = 0.365 = 0.110

P(Bin2 ∩ B) 0.075
P(Bin2 | B) = P(B) = 0.365 = 0.205

P(Bin3 ∩ B) 0.25
P(Bin3 | B) = P(B) = 0.365 = 0.685
3. A screening test is a low-cost way of checking large groups of people for a disease. A more
costly but accurate test shows that 1% of all people have the disease. The screening test
indicates the disease (test positive) in 90% of thoses who have it, and in 20% of those who
do not have the disease (false positive).

(c) Make a table showing the outcomes, prior, conditional, joint, and posterior probabilities.
(d) What percentage of people who test positive don’t have the disease (false +) ?
(e) What percentage of people who test negative do have the disease (false – ) ?

a)
Outcomes Prior Conditional Joint Posterior
Hi P(Hi) P(+ | Hi) P(+ | Hi) P(Hi | +)
P(Hi)
Disease H1 0.01 0.90 0.009 0.043

No H2 0.99 0.20 0.198 0.957


Disease

P(+) = ∑ P(+ | Hi) P(Hi) = 0.009 + 0.198 = 0.207


i

is the probability that a person tests positive.

P(+ | H1) P(H1) 0.009


P(H1 | +) = P(+) = 0.207 = 0.043

P(+ | H2) P(H2) 0.198


P(H2 | +) = P(+) = 0.207 = 0.957

b)
Since P(H1 | +) = 0.043, this means that 4.3% of the people who test positive have
the disease. Since P(H2 | +) = 0.957, this means that 95.7% of the people who test
positive do not have the disease (false-positive).
c)
Redo the table with the conditional probabilities of test negative (i.e. 1 − 0.9 = 0.1
and 1 − 0.2 = 0.8).

Outcomes Prior Conditional Joint Posterior


Hi P(Hi) P(− | Hi) P(− | Hi) P(Hi | −)
P(Hi)
Disease H1 0.01 0.10 0.001 0.0013
No H2 0.99 0.80 0.792 0.9987
Disease

P(−) = ∑ P(− | Hi) P(Hi) = 0.001 + 0.792 = 0.793


i

is the probability that a person tests negative.

P(− | H1) P(H1) 0.001


P(H1 | −) = P(E) = 0.793 = 0.13%

is the probability of a person testing negative having the disease (false-negative)

P(H2 | −) = 99.87%

is the probability of a person testing negative and not having the disease.
4. A disk drive may malfunction with either fault F1 or F2, but not both. The possible
symptoms are the following:

A = { bad writes, bad reads } B = { bad reads }

and F2 is three times as likely to occur as F1. For this type of drive

P(A | F1) = 0.4 P(B | F1) = 0.6


P(A | F2) = 0.2 P(B | F2) = 0.8

Find: P(F1), P(F2), P(A), P(B), P(F1 | A), P(F2 | A), P(F1 | B), P(F2 | B)

By Bayes' Theorem
P(A | F1) · P(F1) P(A | F1) P(F1)
P(F1 | A) = P(A | F ) P(F ) + P (A | F ) P(F ) = P(A)
1 1 2 2

It is given that
P(F2) = 3 P(F1)

and since the total probability is 1

P(F2) + P(F1) = 1
then
3 P(F1) + P(F1) = 1
and so
P(F1) = 0.25 P(F2) = 0.75
Also
P(A) = P(A ∩ F1)+ P(A ∩ F2) = P(A | F1) P(F1) + P(A | F2) P(F2)
= (0.4) (0.25) + (0.2) (0.75) = 0.25

P(B) = P(B ∩ F1)+ P(B ∩ F2) = P(B | F1) P(F1) + P(B | F2) P(F2)
= (0.6) (0.25) + (0.8) (0.75) = 0.75

P(A | F1) P(F1) (0.4) (0.25)


P(F1 | A) = P(A) = 0.25 = 0.4

P(B | F1) P(F1) (0.6) (0.25)


P(F1 | B) = P(B) = 0.75 = 0.2

P(A | F2) P(F2) (0.2) (0.75)


P(F2 | A) = P(A) = 0.25 = 0.6

P(B | F2) P(F2) (0.8) (0.75)


P(F2 | B) = P(B) = 0.75 = 0.8

As a check, note that

P(F1 | A) + P(F2 | A) = 1
P(F1 | B) + P(F2 | B) = 1

Note that these equations are also simpler to use in calculating the complementary probabilities
such as P(F1 | A) and P(F2 | A).

You might also like