Sie sind auf Seite 1von 4

PSTAT 120A: HW1 - Solutions

Problem 1. A biologist is studying the appearance of three genotypes, denoted by A, B and C,


in certain insects. For each of the three genotypes, the probability is 0.1 that an insect has only
this genotype, and no others. For any two of the genotypes, the probability is 0.12 that an insect
has exactly those genotypes, but not the third one. The probability of an insect having all three
genotypes, given that it has A and B, is 0.2. Find the probability that an insect has none of the
genotypes, given that it does not have genotype A.
Solution: It is helpful to draw a Venn diagram. From P(A B C|A B) = 0.2 we have
P(A B C|A B) =

P(A B C)
P(A B C)
=
= 0.2,
P(A B)
P(A B C) + 0.12

which gives P(A B C) = 0.03. Then you can easily see that P(Ac ) = 0.63 and P((A B C)c ) =
0.31, so
0.31
P((A B C)c |Ac ) =
= 0.4921.
0.63
Problem 2. I have a bag containing three pancakes: One golden on both sides, one burnt on
both sides, and one golden on one side and burnt on the other. You shake the bag, draw a pancake
at random, look at one side, and notice that it is golden. What is the probability that the other
side is golden? Does your answer make sense intuitively?
Solution: Let
A = {The side we look at is golden}
Bi = {The pancake with i burnt sides is drawn from the bag},

i = 0, 1, 2.

Then, using Bayes theorem:


P(B0 |A) =

P(B0 A)
P(A)

P(B0 )P(A|B0 )
P(B0 )P(A|B0 ) + P(B1 )P(A|B1 ) + P(B2 )P(A|B2 )
1
1
3
= 1
1 1
1 + 3 2 + 13 0
3

= 2/3.
One can also argue that after reaching for a pancake, each of the six sides {(G1 , G2 ), (G3 , B1 ), (B2 , B3 )}
is equally likely to be the one we look at. We observe a golden side and for two of those the other
side is also golden, but for one the other side is brown. The probability that the other side is golden
is therefore 2/3.
1

One might reason as follows: The pancake must be either (G1 , G2 ) or (G3 , B1 ). These are equally
likely, so the chance of (G1 , G2 ) must be half. Why is that not the case?
Problem 3 (Pitman Ex. 1.5.2). An urn contains 4 white balls and 6 black balls. A ball is chosen
at random and its color noted. The ball is then replaced, along with 3 more balls of the same color
(so that there are now 13 balls in the urn). Then another ball is drawn at random from the urn.
(a) Find the chance that the second ball drawn is white.
(b) Given that the second ball drawn is white, what is the probability that the first ball drawn is
black?
(c) Suppose the original contents of the urn are w white and b black balls, and that after a ball is
drawn from the urn, it is replaced along with d more balls of the same color. In part (a), w was 4,
b was 6, and d was 3. Show that the chance that the second ball drawn is white is w/(w + b). Note
that the answer does not depend on the value of d. Why is that?
Solution: It is helpful to draw a tree diagram. Let {Wi } and {Bi } denote the event that the i-th
ball (i = 1, 2) is white and black, respectively.
(a) By conditioning on the color of the first ball drawn, we have
P(W 2) = P(W 1)P(W 2|W 1) + P(B1)P(W 2|B1) =

4 7
6 4

= 0.4.
10 13 10 13

(b) Using the conditional probability formula gives


P(B1|W 2) =

P(B1 W 2)
P(B1)P(W 2|B1)
=
=
P(W 2)
P(W 2)

6
10

4
13
= 0.4615.
0.4

(c)
P(W 2) =

w
w+d
b
w
w(w + b + d)
w

=
=
.
w+b w+b+d w+b w+b+d
(w + b)(w + b + d)
w+b

Problem 4 (Pitman Ex. 1.5.5). The fraction of people in a population who have a certain
disease is 0.01. A diagnostic test is available to test for the disease. It is found that 95% of people
with the disease produce a positive result. But 5% of people without the disease will also produce a
positive result. Suppose the test is performed on a person selected at random from the population.
(a) What is the probability that the test shows a positive result?
(b) Suppose the test shows a positive result. What is the probability that the person tested actually
has the disease?
(c) A doctor examines a particular patient and, before seeing the result of the laboratory test, the
doctors opinion is that there is a 30% chance that the patient has the disease. The patient then
goes to the lab and gets his test done; the result is positive. How should the doctor revise her
opinion, i.e. what is the probability that the patient actually has the disease? Compare to the
answer in (b).
2

Solution: (a) It is helpful to draw a tree diagram. Denote by D the event that a person has the
disease, and by + the event that a person tests positive. Then
P(+) = P(+|D)P(D) + P(+|Dc )P(Dc ) = (0.95)(0.01) + (0.05)(0.99) = 0.059.
(b) By Bayes theorem we have
P(D|+) =

P(+|D)P(D)
(0.95)(0.01)
=
= 0.1610.
P(+)
0.059

Conclude: Only 16% of the people with a positive test actually have the disease. The reason for
this low number is that the disease is so rare that the number of true positives coming from the
few people with the disease is comparable to the number of false positives coming from the many
people without the disease.
Some terminology: The unconditional probability P (D) is called a prior probability because it refers
to the labs opinion about whether the person has the disease prior to learning the result of the
blood test;
The conditional probability that we try to calculate, P (D|+), is called a posterior probabilities.
(c) This time the person is not chosen at random and the prior probability is P (D) = 0.3. The
effectiveness of the test remains the same: P (+|D) = .95 and P (+|Dc ) = .05. Then, by Bayes
theorem,
P (D|+) =

(0.95)(0.3)
P (+|D)P (D)
=
= 0.8906.
P (+|D)P (D) + P (+|Dc )P (Dc )
(0.95)(0.3) + (0.05)(0.7)

Conclude: When the prior probability of having the disease is high, the test result carries a lot of
weight.
Problem 5. Let A and B be independent events. Show formally that
(a) A and B c are independent.
(b) Ac and B are independent.
(c) Ac and B c are independent.
Solution: We know that P(A B) = P(A)P(B) since A and B are independent. It may be useful
to draw a Venn diagram for what follows.
(a) Need to show that P(A B c ) = P(A)P(B c ). We have:
P(A B c ) = P(A) P(A B) = P(A) P(A)P(B) = P(A)(1 P(B)) = P(A)P(B c ),
where the third equality follows from the independence of A and B.
(b) Similar to (a).

(c) Need to show that P(Ac B c ) = P(Ac )P(B c ). By De Morgans law we have:
P(Ac B c ) = P((A B)c ) = 1 P(A B)
= 1 (P(A) + P(B) P(A B))
= (1 P(A))(1 P(B))
= P(Ac )P(B c ).

Problem 6. Toss a fair coin twice and consider the events:


H1 : head in the first toss
H2 : head in the second toss
S: both coins landed the same way, i.e. both heads or both tails.
(a) Show that events H1 , H2 , S are pairwise independent.
(b) Show that events H1 , H2 , S are dependent.
Solution: (a) It is easy to show that P(H1 H2 ) = P(H1 )P(H2 ), P(H1 A) = P(H1 )P(S), and
P(H2 S) = P(H2 )P(S), so the events are pairwise independent. For instance P(H1 H2 ) = 1/4 =
P(H1 )P(H2 ).
(b) We have P (H1 H2 S) = P (H1 H2 ) = 1/4, while P (H1 )P (H2 )P (S) = (1/2)3 = 1/8, so the
three events are not independent (in fact, any two of the events determine whether the third one
happened or not).
Problem 7. Mary needs a new lock for her bike since her last one was stolen. There are 4 slots
numbered 0 to 9, and Mary randomly selects a combination. What is the probability that she gets:
(a) A combination that only includes even numbers?
(b) A combination such that the first number is not 0 and all four numbers are different?
(c) A combination that has at least one 4 or at least one 5
Solution: The total number of combinations is 104 .
(a) There are 54 combinations that only include even numbers so the probability is 54 /104 = 0.0625.
(b) There are 9 9 8 7 = 4536 such combinations and the probability is 4536/104 = 0.4536.
(c) Rather than finding the number of combinations that satisfy the condition (have at least one
4 or at least one 5), it is easier to subtract from 104 the number of combinations that do not
satisfy the condition. Then the probability of a combination with at least one 4 or at least one 5 is
(104 84 )/104 = 0.5904.

Das könnte Ihnen auch gefallen