# Math 381 Professor Carlson Test 2 1. (10 points) You gamble on the ```Math 381
Professor Carlson
Test 2
1. (10 points) You gamble on the toss of a fair coin. If the first toss
is an H you win \$1, if the second toss is the first H you win \$2, if the third
toss is the first H you win \$4. If the first 3 tosses are all T, you lose \$10.
What is your expected gain or loss when you play?
Let X represent your winnings. The expected value is
E(X) = 1 ∗
1
1
1
3 10
2
1
+ 2 ∗ + 4 ∗ − 10 ∗ = −
= .
2
4
8
8
2
8
8
2. (20 points) (a) What is the formula defining the expected value
E(X) for a discrete random variable X with outcomes x1 , . . . , xJ ?
(b) You roll a die and win the face value if it is even, but you lose the
face value if it is odd. What is the expected gain or loss for each roll.
(a)
E(X) =
J
X
xj P rob(X = xj ).
j=1
Let X represent your winnings. The expected value is
2∗
1
1
1
1
1
3
1
1
+4∗ +6∗ −1∗ −3∗ −5∗ = = .
6
6
6
6
6
6
6
2
3. (20 points) (a) For events E and F , give the definition of the
conditional probability of E given F .
(b) Suppose E and F are two events such that
P (E|F ) = P (E).
Using the definition from part (a), show that
P (E ∩ F ) = P (E)P (F )
and that
P (F |E) = P (F ).
(a)
P (E|F ) =
1
P (E ∩ F )
.
P (F )
(b)
If P (E|F ) = P (E) the
P (E|F ) = P (E) =
P (E ∩ F )
,
P (F )
so
P (E ∩ F ) = P (E)P (F ).
Also
P (F |E) =
P (F ∩ E)
P (F )P (E)
=
= P (F ).
P (E)
P (E)
4. (10 points) Suppose H1 , . . . , HN are pairwise disjoint events such
that
Ω = H1 ∪ . . . ∪ HN .
If E is any event, then Bayes formula says
P (Hk )P (E|Hk )
.
P (Hk |E) = PN
P
(H
)P
(E|H
)
n
n
n=1
Use Bayes formula to answer the following question.
A doctor uses a blood test to diagnose disease. The probability that the
test is positive is 0.8 if a patient has disease 1, and 0.4 if a patient has
disease 2. Assume that no patients have both diseases. The test is positive
in two percent of all other cases. If three percent of the patients have disease
1, and one percent have disease 2, what is the probability that a patient has
disease 1 given that the blood test is positive.
In this example, the pairwise disjoint events are H1 : disease 1, H2 :
disease 2, H3 : neither disease. E is the event that the blood test is positive.
We have
P (H1 ) = .03, P (H2 ) = .01, P (H1 ) = .96,
and
P (E|H1 ) = 0.8,
P (E|H2 ) = 0.4,
P (E|H3 ) = 0.02.
By Bayes formula,
(.03)(.8)
P (H1 )P (E|H1 )
=
P (H1 |E) = PN
(.03)(.8) + (.01)(.4) + (.96)(.02)
n=1 P (Hn )P (E|Hn )
2
=
(.03)(.8)
≃ 1/2.
(.03)(.8) + (.01)(.4) + (.96)(.02)
5. (20 points) A hospital sees patients arrive at a rate described by the
density function
f (t) = 10e−10t .
That is, the probability that the next patient will arrive after time t0 (hours)
is
Z ∞
10 ∗ e−10t dt = e−10t0 .
t0
(a) Find the probability that the next patient will arrive in the time
interval .2 ≤ t ≤ .4.
(b) Given that no patient arrives before t0 = .1, find the probability that
the next patient will arrive in the time interval .2 ≤ t ≤ .4.
(a) Let E be the event that the next patient will arrive in the time
interval .2 ≤ t ≤ .4.
Z .4
10 ∗ e−10t dt = e−2 − e−4 .
P (E) =
.2
(b) Conditioning on the event F that no patient arrives before t0 = .1,
P (E ∩ F )
P (E)
e−2 − e−4
P (E|F ) =
=
=
= e−1 − e−3 .
−1
P (F )
P (F )
e
6. (20 points) (a) Suppose we throw ten dice. What is the expected
sum of all ten?
(b) Suppose that X and Y are discrete random variables with outcomes
x1 , . . . , xJ for X and y1 , . . . , yK for Y . Assume in addition that X and Y
are independent, so
P (X = xj , Y = yk ) = P (X = xj )P (Y = yk ).
Show that E(XY ) = E(X)E(Y ).
(a) Since the expected value of one roll X is E(X) = 3.5, if Xj is the
roll of die j we have
E(X1 + . . . + X10 ) = E(X1 ) + . . . + E(X10 ) = 35.
3
(b) The expected value of XY is
E(XY ) =
X
xj yk P (X = xj , Y = yk ) =
X
j
xj yk P (X = xj )P (Y = yk )
j,k
j,k
=
X
X
yk P (Y = yk )] = E(X)E(Y ).
xj P (X = xj )[
k
4
```