Math 421– Worksheet 6 Problem 1. Identify the type of random

Math 421– Worksheet 6
Problem 1. Identify the type of random variable X that is being described (including
its parameters) in the following scenarios and give its expected value.
(a) Justin calls the IRS on their help line every 5 minutes until he gets an open line.
If his attempts are independent and the probability of getting an open line on any
one call is .2, let X be the number of calls he makes until he gets an open line.
X∼
E[X] =
Geometric(.2)
5
(b) On average, 20% of the egg cartons at Food Tiger have at least one cracked egg.
If the egg case contains 40 cartons of eggs and assuming independence, let X be
the number of cartons with at least one cracked egg.
X∼
Binomial(40, .2)
E[X] =
8
(c) My laptop has an average life span of 60 hours before it needs to be rebooted. Let
X be the amount of time until the laptop needs to be rebooted.
1
)
Exponential( 60
X∼
E[X] =
60
Problem 2. Let X be a continuous random variable with density function
2
ax
0≤x≤2
f (x) =
0
otherwise.
(a) Determine a, the cdf of X, and E[X].
(b) Determine P {−1 ≤ X ≤ 1}.
(c) Let Y = X 2 . Determine the cdf of Y , the density of Y , and E[Y ].
Solution. (a) a = 83 . The cdf is
FX (x) =
E[X] =
(b)

 0
x≤0
0≤x≤2
x≥2
x3
8

1
Z
1
3
2
Z
1
1
3 2
x dx =
8
−1
0 8
(c) First note that FY (y) = 0 if y ≤ 0 and FY (y) = 1 if y ≥ 4. Now suppose that
0 ≤ y ≤ 4. Then
√
√
FY (y) = P {Y ≤ y} = P {X 2 ≤ y} = P {X ≤ y} = FX ( y) = 18 y 3/2 .
P {−1 < X < 1} =
f (x)dx =
In Summary:
FY (y) =

 0
y 3/2
8

1
3√
fY (y) =
16
y
0
y≤0
0≤y≤4
y≥4
0≤y≤4
otherwise.
Problem 3. The annual rainfall (in inches) in a certain region is normally distributed
with µ = 40 and σ 2 = 16. What is the probability that, starting with this year, it will
take over 10 years before a year occurs having a rainfall of over 50 inches? Assume that
annual rainfall in each year is independent of other years’ rainfall.
1
2
Solution. First, let X be the random variable that is the number of inches of rain in a
single year. The problem tells us that X ∼ Normal(40, 16). The probability of more
than 50 inches of rain in a single year is then
≥ 52 } = 1 − Φ( 52 ) ≈ .0062
P {X ≥ 50} = P { X−40
4
Now we want to know what is the probability that in it takes > 10 years for there to be a
year with 50 inches of rain or more. We could let Y ∼ Geometric(.0062) and calculate
P {Y > 10}, but a simpler argument is just to let Z ∼ Binomial(10, .0062) and calculate
P {Z = 0}. Which ever way you calculate, you will get that the probability it will take
over 10 years before a year occurs having a rainfall of over 50 inches is
Φ( 52 )1 0 ≈ .9396
Problem 4 (St. Petersburg Paradox). A person tosses a fair coin until a tail appears
for the first time. If the tail appears on the nth flip, the person wins 2n dollars. Let X
denote the player’s winnings.
(a) Show that E[X] = +∞.
(b) Would you be willing to pay $1 million to play this game once?
Solution. (a) X is similar to a geometric random variable (thought it is NOT a geometric
random variable). X takes values 2, 22 , 23 , 24 , . . .. And P {X = 2i } = 2−i . Hence
E[X] =
∞
X
i=1
i
−i
2 ×2
=
∞
X
1 = ∞.
i=1
(b) I wouldn’t! While the expected return on this bet is infinite, it is still not a very
good bet. The smallest i such that 2i is bigger than a million is i = 20. So you would need
to get 20 heads in a row to break even. This has probability 2120 which is about .00000095.
On the other hand, if you had tons of cash lying around and could keep playing the
game over and over again your eventual expected return goes to infinity. (Real world
application: venture capital)
Problem 5. Each of 500 soldiers in an army company independently has a certain disease
with probability 1/1000. This disease will show up in a blood test, and to facilitate
matters, blood samples from all 500 soldiers are pooled and tested.
(a) What is the (approximate) probability that the blood test will be positive (that
is, at least one person has the disease)?
(b) Suppose now that the blood test yields a positive result. What is the approximate
probability, under this circumstance, that more than one person has the disease?
(c) One of the 500 people is Jones, who knows that he has the disease. What does
Jones think is the probability that more than one person has the disease?
Solution. (a) Let X be the number of soldiers who have the disease. X ∼ Binomial(500, 1/1000).
We can approximate this with a Poisson Random variable Y with parameter λ = 12 . So
P {X ≥ 1} = 1 − P {X = 0} ≈ 1 − P {Y = 0} = 1 − e−1/2 ≈ .393
(b) We need to calculate P {X ≥ 2|X ≥ 1}. We again use the Poisson approximation
and instead calculate P {Y ≥ 2|Y ≥ 1} which is
1 − e−1/2 − e
P {Y ≥ 2, Y ≥ 1}
P {Y ≥ 2}
P {Y ≥ 2|Y ≥ 1} =
=
=
P {Y ≥ 1}
P {Y ≥ 1}
1 − e−1/2
−1/2
2
≈ .229
3
(c) From Jones’ standpoint, this problem is the same as part (a), but with only 499
soldiers. Hence, if we let X be the number of soldiers besides Jones who have the disease, then X ∼ Binomial(499, 1/1000). We can approximate X by the Poisson random
variable Y with parameter λ = 499/1000. So
P {X ≥ 1} = 1 − P {X = 0} ≈ 1 − P {Y = 0} = 1 − e−499/1000 ≈ .393
(the answers to (a) and (c) differ after the 3rd decimal place).
Problem 6. We have three coins A, B, and C, which have probabilities 1/2, 1/3, and 1/4
of coming up heads, respectively. We flip coin A and if it comes up heads we take coin
B and flip it repeatedly until we get a head, otherwise we flip coin C repeatedly until we
get a head. Suppose that we flipped the second coin 3 times until getting a head. What
is the probability that we got a head when we flipped coin A?
Solution. Let H be the event that we got a head on the flip of A. Let X be the random
variable that counts the number of flips of the second coin. We need to calculate P (H|X =
3). The problem tells us the following:
1
1
P (H) = , P (H c ) = .
2
2
We also know that the distribution of X given that H happened is a geometric random
variable with parameter 13 . On other hand, the distribution of X given that H didn’t
happen is a geometric random variable with parameter 14 . Hence we also know:
2
2
3 1
2 1
c
and P (X = 3|H ) =
.
P (X = 3|H) =
3 3
4 4
Now using Bayes Rule and the Law of Total Probability we get:
2 2 11
P (X = 3|H)P (H)
256
P (H|X = 3) =
= 2 3 3 2 2
=
c
c
3
1
1
2
1
1
P (X = 3|H)P (H) + P (X = 3|H )P (H )
499
+
3
32
4
42