Download Quiz 6 - Math Berkeley

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

Probability wikipedia , lookup

Transcript
Name:
Quiz 6
Problem 1. Determine if each of the following is true or false. No justification is required.
(a) A fair 6-sided dice is rolled three times. Let X be the random variable that is equal to twice the first roll minus
the sum of the second and third rolls. Then E(X) = 0.
(b) We flip a fair coin n times. The probability of seeing k heads is
k
n
1
.
k
2
(c) If A, B and C are events in a finite sample space such that
p(A ∩ B ∩ C) = p(A)p(B)p(C),
then A, B and C are mutually independent.
(d) If X and Y are random variables on a finite sample space, and V (X + Y ) = V (X) + V (Y ), then X and Y are
independent.
Solution. (a) True. Let Xi be the random variable that tells us the result of the ith roll. Then E(Xi ) = 7/2, and
X = 2X1 − (X2 + X3 ), so
E(X) = 2E(X1 ) − E(X2 ) − E(X3 ) = 0.
(b) False. The probability is nk (1/2)n .
(c) False. For example, suppose we flip a fair coin. Let A be the event that it lands heads, let B be the event
that it lands heads, and let C be the event that a dragon flies into the room and eats our coin before it
lands (which is a fancy way of saying that C = ∅). Then p(A) = 1/2 and p(B) = 1/2 and p(C) = 0. Then
A ∩ B ∩ C = ∅ also, so p(A ∩ B ∩ C) = 0 also, so the condition is satisfied. But clearly A and B are not
independent: p(A ∩ B) = 1/2 6= 1/4 = p(A)p(B).
(d) False. Let X and Y be those two dependent random variables from the problems from 7/30 that had covariance
zero. Then
V (X + Y ) = V (X) + V (Y ) + 2 Cov(X, Y ) = V (X) + V (Y )
even though X and Y are independent.
Problem 2. There’s an epidemic ravaging Mars! One common symptom of the disease is red eyes: 90% of infected
Martians have red eyes. But some Martians have red eyes naturally: 20% of uninfected Martians have red eyes. It
is estimated that 10% of Martians are infected.
(a) What percentage of Martians have red eyes?
Solution. The sample space is the set of all Martians. The event R is the set of Martians with red eyes, and
¯ = 0.20.
the event I is the set of Martians who are infected. We are told that p(R | I) = 0.90 and that p(R | I)
¯ = 0.90. Thus, by the law of total probability, we get
We also know that p(I) = 0.10 which means that p(I)
¯ I)
¯ = 0.90 · 0.10 + 0.20 · 0.90 = 0.09 + 0.18 = 0.27.
p(R) = p(R | I)p(I) + p(R | I)p(
Thus 27% of Martians have red eyes.
(b) What is the probability that a randomly chosen Martian with red eyes is infected?
Solution. We are looking for p(I | R). Using Bayes’s theorem and part (a), we have
p(I | R) =
p(R | I)p(I)
0.90 · 0.10
0.09
1
=
=
= .
p(R)
0.27
0.27
3
1
Problem 3. You go out gambling at a casino and decide to play the following game. You put some amount of
money into a pot and you guess either “heads” or “tails.” The casino matches your bet, so that the amount in the
pot is doubled. Then a fair coin is flipped. If your guess turns out correct, you win all of the money in the pot. If
your guess turns out incorrect, you lose the money in the pot to the casino.
You decide that your strategy for the night is to keep playing this game until you win, but at most 10 times.
On the first round, you will put $1 into the pot. Every time you lose, up to the 10th time, you will put in twice
the amount that you put into the pot the last time. How much money do you expect to gain tonight?
Solution. Let X be the random variable that calculates the amount you have gained at the end of the night. If you
guess all 10 coin flips incorrectly, you will have lost 1 + 2 + · · · + 29 = 210 − 1. The probability of this happening is
(1/2)10 . In other words,
p(X = 1 − 210 ) = (1/2)10 .
Now suppose you do guess correctly on the nth try. That means you will have put 1 + 2 + · · · + 2n−1 = 2n − 1 into
the pot total, counting the 2n−1 you put in to play the nth try, and you will win 2 · 2n−1 = 2n . Thus your total
gain is 1. This happens as long as you don’t guess all 10 coin flips incorrectly, so
p(X = 1) = 1 − (1/2)10 .
Thus
E(X) = (1 − 210 )p(X = 1 − 210 ) + 1 · p(X = 1) = (−210 + 1)(1/2)10 + 1 · (1 − (1/2)10 ) = 0.
2