Download ECE 302 Spring 2012 Ilya Pollak

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

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Birthday problem wikipedia , lookup

Probability interpretations wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability wikipedia , lookup

Transcript
ECE 302 Spring 2012
Practice problems: Multiple discrete random variables, joint PMFs, conditional PMFs,
conditional expectations, functions of random variables
Ilya Pollak
These problems have been constructed over many years, using many different sources.
If you find that some problem or solution is incorrectly attributed, please let me know
at [email protected].
Suggested reading: Sections 2.5–2.8 in the recommended text [1]. Equivalently, Sections
4.1–4.7 (discrete random variables only) in the Leon-Garcia text [3].
Problem 1. The Curious Case of a 1992 Virginia Lottery.
(Ilya Pollak.)
Before 1992, the state of Virginia ran a lottery where a winning six-number combination was selected
as six distinct numbers out of 44 numbers. Anybody could buy any number of tickets and, on each
ticket, select any set of six numbers. The price of one ticket was $1. Thus, in some drawings no one
selected the winning combination and therefore no one won the jackpot. On the other hand, there
were a few drawings where more than one person happened to select the winning combination. In
this case, the jackpot was divided equally among the winners. Whenever there was a drawing with no
jackpot winners, the jackpot for the next drawing would increase. This led to a $27M jackpot in the
February 15, 1992 drawing, payable in 20 yearly installments of $1.35M.
(a) If all six-number combinations are equally likely, what is the probability that any one particular
set of six numbers will be the winning combination?
Solution. The number of ways of choosing six distinct numbers out of 44 numbers is
44!
44
= 7059052.
=
6
6!38!
Since all combinations are equally likely, the probability for any one of them to be the winning
combination is 1/7059052.
(b) If you want to be guaranteed to win (or share) the jackpot, how much money do you need to
spend on the tickets?
Solution. You would need to buy one ticket for each six-number combination, i.e., you would
need to spend $7,059,052.
(c) Suppose you undertake to buy tickets with all possible six-number combinations. Suppose further
you estimate, based on historical data, that the chances that you will win the entire jackpot (i.e.,
that there will not be anyone else with the winning combination) are 0.70, the chances that you
will win one-half of the jackpot (i.e., that there will be one other person with the winning
combination) are 0.24, and the chances that you will win one-third of the jackpot are 0.06.
Assuming that the jackpot is $27M, what are your expected net winnings? For the sake of
1
simplicity, assume there are no prizes other than the jackpot (i.e., that you do not win anything
if you match five or fewer numbers).
Solution. Your expenses are $7,059,052. Your expected winnings are 0.7 · $27M + 0.24 · $27M ·
(1/2)+0.06·$27M ·(1/3) = $22, 680, 000. Therefore, the net expected winnings are $22, 680, 000−
$7, 059, 052 = $15, 620, 948.
(d) Under the same assumptions as in Part (c), what is your probability to incur a loss?
Solution. The least you can win is one-third of the jackpot, $9M, which is larger than your
investment of $7,059,052. Therefore, the probability of a loss under the model of Part (c) is zero.
(e) Suppose that, during your buying spree, you are prevented from completing the entire purchase
by the overwhelming logistics of having to buy so many tickets and fill them out by hand.
Suppose that in the end you are only able to buy 5 million tickets. What is your probability of
a net loss now? What are the net expected winnings?
Solution. The probability is 5000000/7059052 ≈ 0.71 that you have the winning ticket. Given
that you have the winning ticket, the conditional expectation of the gross winnings is, from
Part (c), equal to $22,680,000. The unconditional expectation of the gross winnings therefore is
5000000/7059052 · $22, 680, 000 ≈ 16, 064, 480, because we assume that if you do not have the
winning ticket, your gross winnings are zero. The expectation of the net winnings is equal to
the expected gross winnings less your $5M investment, i.e., $11,064,480.
Under the model of Part (c), no loss can occur if you have the winning ticket. However, if you
do not have the winning ticket, you lose your entire $5M investment. The probability of this is
1 − 0.71 = 0.29.
[The remainder of the text in this problem is historical background and intuition behind the questions.
It is not essential to read it in order to solve the problem.]
An Australian investment fund took the approach outlined in this problem. Even though it may seem
like a riskless way of making $27M from a $7M investment, Part (e) illustrates that actually there was
some risk. The fund, in fact, did run out of time and was able to only buy about 5 million tickets.
Despite this, it turned out that they did buy a winning ticket.
Another potential source of risk, which is not easily quantifiable, is touched on in Parts (c) and (d).
The probability estimates are based on prior history; however, an event that is not in the historical
data could always occur. Even in the case that you are able to get tickets with all the combinations
and thus guarantee that you have a winning ticket, it can happen that three or more people besides you
happen to have winning tickets. Your gross winnings will then be at most $6.75M, resulting in a loss.
In addition, the case of you sharing with two more winners should also be considered a loss because of
the fact that the winnings are paid in installments over a 20-year period. Investing the $7,059,052 in
any low-risk asset (FDIC-insured savings accounts, certificates of deposit, US saving bonds, etc.) for
any annual return exceeding 1.222% would produce more than $9M at the end of 20 years. The case
of a two-way win results in about 3.3% annual return which is still not stellar, considering the risks.
As it happens, the syndicate did win the entire jackpot as well as a number of lesser prizes, for a total
winnings of about $27.9M. Their outlays were $5M for the tickets they bought, plus some unknown
amount for the logistics and legal representation.
2
Another source of risk which is impossible to quantify was litigation. Virginia State Lottery took
several weeks to review its legal options but in the end paid up, having concluded that they would
not have a strong case in court. They have since changed the lottery rules to restrict block purchases.
In addition, they have increased the number of possible combinations, so that now the probability of
winning or sharing the jackpot is about 1 in 176 million. There were other risks faced by the fund,
also quite difficult to quantify, such as the possibility that Virginia State Lottery could default on its
obligations and be unable to pay some part of their winnings.
This story was reported by The New York Times [5, 6].
Problem 2. On life expectancies and life insurance.
(Ilya Pollak.)
(a) Let L be a discrete random variable, and let n be a number such that P(L > n) > 0. Show that
the following inequality holds:
E[L|L > n] > n
Let m be a number such that P(L ≤ m) > 0. Show that the following inequality holds:
E[L|L ≤ m] ≤ m
Solution. Consider the random variable X = L − n. The event L > n is then equivalent to the
event X > 0. Given this event, all nonpositive outcomes for X have zero conditional probability.
Therefore,
X
E[X|L > n] =
xpX|L>n (x) > 0.
x>0
This summation is greater than zero since all its terms are nonnegative, and, by assumption, at
least one term is positive. Since L = X + n, using the linearity of expectation, we have:
E[L|L > n] = E[X|L > n] + n > n.
To prove the second inequality, consider the random variable Y = L − m. The event L ≤ m is
then equivalent to the event Y ≤ 0. Given this event, all nonnegative outcomes for Y have zero
conditional probability. Therefore,
X
E[X|L ≤ m] =
ypY |L≤m (y) ≤ 0.
y≤0
This summation is nonpositive since all its terms are nonpositive. Since L = Y + m, using the
linearity of expectation, we have:
E[L|L ≤ m] = E[Y |L ≤ m] + m ≤ m.
(b) Use the total expectation theorem and your results from Part (a) to show that
E[L] < E[L|L > n]
3
for any random variable L and any number n such that P(L > n) > 0 and P(L ≤ n) > 0.
Solution. According to the total expectation theorem,
E[L] = E[L|L > n]P(L > n) + E[L|L ≤ n]P(L ≤ n)
= E[L|L > n](1 − P(L ≤ n)) + E[L|L ≤ n]P(L ≤ n)
= E[L|L > n] − P(L ≤ n)(E[L|L > n] − E[L|L ≤ n])
(1)
As shown in Part (a), E[L|L > n] > n and E[L|L ≤ n] ≤ n, and so E[L|L > n]−E[L|L ≤ n] > 0.
By assumption, P(L ≤ n) > 0. Therefore, P(L ≤ n)(E[L|L > n] − E[L|L ≤ n]) > 0. Referring
back to Eq. (1), this means that E[L] is obtained from E[L|L > n] by subtracting a positive
number. In other words, E[L] < E[L|L > n].
(c) This part refers to the life expectancies found in Table 7 on page 26 of National Vital Statistics
Reports for 2006, Vol. 57, No. 14, published April 17, 2009 [4]. It can be viewed at:
www.cdc.gov/nchs/data/nvsr/nvsr57/nvsr57 14.pdf
Looking at the first column, it appears that the life expectancy in the US has been steadily
decreasing. For example, somebody born in 2006 had life expectancy 77.7. A person born in
1996 and who therefore was 10 years old in 2006, had remaining life expectancy of 68.4, for a
total of 78.4. A person born in 1976 was 30 years old in 2006 and had remaining life expectancy
of 49.2, for a total of 79.2. A person born in 1936 was 70 years old in 2006 and had remaining life
expectancy of 14.9, for a whopping total of 84.9! Yet, here is a headline from The Washington
Post, April 19, 2009 [8]: Life Expectancy Hits New High of Nearly 78.
Is the headline wrong? If not, how do you reconcile this headline with the argument given above
that seems to show that the life expectancies are declining?
Solution. The numbers in the table refer to conditional expectations given that a person
has lived to a certain age, which are different from the unconditional life expectancy at birth.
Denoting the human lifespan in years by L, the life expectancy at birth is E[L] whereas the
conditional life expectancy given that a person has survived for n years is E[L|L > n]. As shown
in Part (b), E[L|L > n] > E[L] due to the fact that, for any age n, there exist people who die
before reaching that age. These people contribute small numbers to the overall life expectancy.
The conditional life expectancy given survival until age n does not include the people who did
not survive until age n. Therefore, this conditional life expectancy is always larger than the
unconditional life expectancy at birth.
The Washington Post headline referred to the fact that life expectancies at birth have been
increasing, which is true and does not contradict the fact that a person’s total conditional life
expectancy increases as a function of his/her age.
(d) Suppose you are a life insurance company and are offering a whole life insurance policy that pays
$100,000 to the family of the insured upon the insured’s death. Your every client gets charged a
yearly premium that remains constant throughout the client’s life. This premium is determined
by the sex of the client as well as his or her age at the time that they purchase the insurance
policy. The premium payments stop when the client dies. The premium is designed so that your
total expected profit per customer is $5000. What amount will you charge a male customer who
is 40 years old when he purchases the policy? What amount will you charge a female customer
4
who is 20 years old when he purchases the policy? Refer to the same life expectancy table as in
Part (c). Assume zero interest rates and inflation, i.e., assume that $1 today is worth exactly $1
at any time in the future.
Solution. Suppose you charge $c. Then your expected profit is E[(L−n)c−$100, 000|L > n] for
a customer of age n, where L is the customer’s total lifespan. Using the linearity of expectations,
we have that this is equal to cE[(L − n)|L > n] − $100, 000, i.e., c times the remaining life
expectancy of the customer less the $100,000 you are obligated to pay. For a 40-year-old male,
the remaining life expectancy is 37.6 years, therefore we need
37.6c − $100, 000 = $5000,
which means that c ≈ $2793 per year. For a 20-year-old female, the remaining life expectancy
is 61 years, therefore we need
61c − $100, 000 = $5000,
which means that c ≈ $1721 per year.
Problem 3. (Drake [2], Problem 2.06. Solutions by Ilya Pollak and Bin Ni.)
A fair four-sided die (with faces labeled 0, 1, 2, 3) is thrown once to determine how many times a fair
coin is to be flipped: if N is the number that results from throwing the die, we flip the coin N times.
Let K be the total number of heads resulting from the coin flips. Given K = k, the coin flips are
conditionally independent. Determine each of the following probability mass functions for all values
of their arguments:
(a) pN (n).
Solution. Since this is a fair die, N is equally likely to be any one of the four numbers:
1/4 n = 0, 1, 2, 3
pN (n) =
0
otherwise.
(b) pK|N (k|2).
Solution. The distribution of the number K of heads in 2 flips of a fair coin is binomial with
parameters n = 2, p = 1/2:

 2
1
2
 1/4 k = 0, 2

k = 0, 1, 2
=
1/2
k=1
pK|N (k|2) =
k
2


0 otherwise.
0
otherwise
Indeed, the probability that both flips come up heads is 1/4, the probability that neither of the
two flips comes up heads is 1/4, and the probability to get one tail and one head is 1/2.
(c) pN |K (n|2).
Solution. For this part, and the next two parts, drawing a table of the joint PMF of N and
K is very helpful. Keep in mind that the joint PMF is the most complete description of two
5
discrete random variables. For this problem, the joint PMF can be obtained as follows:
pN,K (n, k) = P(N = n, K = k) = P(K = k|N = n)P(N = n)
1
= pK|N (k|n)pN (n) = pK|N (k|n), for n = 0, 1, 2, 3,
4
(2)
where we used the fact that the four outcomes of throwing the die are equally likely. To determine
the conditional probability distributions pK|N (k|n) for each value of n, note that:
• If N = 0, then we do not flip the coin at all, and K must be zero. Therefore, pK|N (0|0) = 1
and pK|N (k|0) = 0 for k 6= 0.
• If N = 1, then we flip once, and have equal chances to get one head (K = 1) or no heads
(K = 0): pK|N (0|1) = pK|N (1|1) = 1/2.
• The case N = 2 was considered in Part (b).
• Finally, if we flip the coin three times, the probability to get three heads is the same as the
probability to get no heads, and is equal to 1/8; and the probability to get one head is the
same as the probability to get two heads, and is equal to 3/8: pK|N (0|3) = pK|N (3|3) = 1/8,
pK|N (1|3) = pK|N (2|3) = 3/8.
An alternative way to determine these conditional probabilities is to note–just like we did in
Part (b)–that the distribution of the number K of heads in n tosses of a fair coin is binomial
with parameters n and p = 1/2:
 n
1
n

0≤k≤n
pK|N (k|n) =
k
2

0
otherwise.
To get the joint PMF of N and K, Eq. (2) tells us to multiply the conditional probabilities by
1/4. We therefore have the following joint PMF:
n\k
0
1
2
3
0
1/4
1/8
1/16
1/32
1
0
1/8
1/8
3/32
2
0
0
1/16
3/32
3
0
0
0
1/32
To get the PMF pN |K (n|2), we take the probabilities from the k = 2 column of the table, and
normalize them by the probability of the event K = 2. The probability of the event K = 2 is
the sum of all probabilities in that column: P(K = 2) = 1/16 + 3/32 = 5/32. Therefore,

2/5
n = 2,
pN,K (n, 2)
pN,K (n, 2) 
pN |K (n|2) =
=
=
3/5
n = 3,

pK (2)
5/32
0 otherwise.
(d) pK (k).
6
Solution. The probability of K = k is
sponding column:






pK (k) =





obtained by summing the probabilities in the corre15/32
k=0
11/32
k=1
5/32
k=2
1/32
k=3
0
otherwise.
(e) Also determine the conditional PMF for random variable N , given that the experimental value k
of random variable K is an odd number.
Solution. The event “K is odd” corresponds to the columns k = 1 and k = 3. Note that when
K is odd, the only possible values for N are 1, 2 and 3. The probability of the event “N = 1 and
K is odd” is 1/8; the probability of the event “N = 2 and K is odd” is 1/8; and the probability
of the event “N = 3 and K is odd” is also 3/32+1/32=1/8. Thus, conditioned on K being odd,
the events N = 1, N = 2, and N = 3 are equally likely:
pN |K (n|K is odd) =
P(N = n, K is odd)
1/8
=
, for n = 1, 2, 3.
P(K is odd)
P(K is odd)
(3)
Since the conditional PMF must sum up to one, these probabilities have to be 1/3 each (another
way to show this is to simply notice that, according to our result in Part (d), the probability of
the event “K is odd” is 11/32+1/32 = 3/8):
1/3 n = 1, 2, 3
pN |K (n|K is odd) =
0 otherwise.
Problem 4. A pair of fair four-sided dice is thrown once. Each die has faces labeled 1, 2, 3, and
4. Discrete random variable X is defined to be the product of the down-face values. The down-face
values for the two dice are independent. Determine the conditional variance of X 2 given that the sum
of the down-face values is greater than the product of the down-face values.
Solution. Figure 1 depicts the sample space of the experiment where d1 and d2 are the down-face
values of the first and second die respectively. We assume that the two dice are independent. Since
they are fair, each of the 16 possible outcomes has probability 1/16. We let X be the product of the
two down-face values of the dice and we let S be the sum of the two down-face values of the two dice.
Figure 1 tabulates the values of X and S corresponding to each outcome. After inspecting this table,
we see that the outcomes in the first column and the first row of Figure 1 comprise the conditional
sample space given that the sum of the two down-face values is greater than the product of the two
down-face values. Since there are seven equally likely outcomes in this conditional sample space, the
conditional probability of each of these outcomes is 1/7. Note that, conditioned on S > X, X can
assume four values, 1, 2, 3, and 4, which means that X 2 can also assume four values, namely, 1, 4, 9,
and 16. X 2 = 1 for one of the outcomes (the top left corner), and the remaining three possibilities
occur under two outcomes each. Therefore, we have:
2
1
p(X 2 = 1|S > X) = , p(X 2 = 4|S > X) = p(X 2 = 9|S > X) = p(X 2 = 16|S > X) = .
7
7
7
d1
d2
1
1
2
X=1
S=2
X=2
S=3
1/16
2
X=4
S=4
X=2
S=3
X=3
S=4
4
X=6
S=5
X=6
S=5
1/16
1/16
1/16
X=12
S=7
1/16
X=12
S=7
1/16
1/16
1/16
X=8
S=6
X=9
S=6
X=8
S=6
X=4
S=5
X=4
S=5
1/16
1/16
1/16
4
X=3
S=4
1/16
1/16
3
3
1/16
X=16
S=8
1/16
1/16
Figure 1: Conditional sample space of the experiment in Problem 4. The entries inside the thick
line—i.e. the first column and the first row—are the conditional sample space given S > X.
The conditional mean and variance are therefore as follows.
2
59
1
E[X 2 |S > X] = 1 · + (4 + 9 + 16) · =
7
7
" 7
2
2 2 2 #
1
59
59
2
59
59
· +
+ 9−
+ 16 −
·
var(X 2 |S > X) =
1−
4−
7
7
7
7
7
7
#
" 2
52
4 2
53 2 2
1
31 2
=
· +
+
+
·
7
7
7
7
7
7
2704 + (961 + 16 + 2809) · 2
73
1468
=
49
≈ 29.959
=
Problem 5. Evaluate the following summation without too much work:
N X
N
n2 An (1 − A)N −n ,
n
n=0
where 0 < A < 1 and N > 2.
8
Solution. (Bin Ni and Ilya Pollak.) Consider a binomial random variable K with the following PMF:
N
pK (n) =
An (1 − A)N −n ,
n
where N can be thought of as the total number of independent Bernoulli trials and A the probability
of success in one trial. We then see that the summation we need to evaluate is equal to the expected
value of K 2 , i.e.:
2
E[K ] =
N
X
n=0
n
2
N
n
An (1 − A)N −n .
On the other hand, we have:
E[K 2 ] = var[K] + E[K]2
= N A(1 − A) + (N A)2 = N 2 A2 − N A2 + N A.
Problem 6. The joint PMF of discrete random variables X and Y is given by:
√
Cx2 y, for x = −5, −4, . . . , 4, 5 and y = 0, 1, . . . , 10.
pX,Y (x, y) =
0,
otherwise.
Here, C is some constant. What is E[XY 3 ]? (Hint: This question admits a short answer/explanation.
Do not spend time doing calculations.)
√
Solution. (Bin Ni and Ilya Pollak.) We first note that pX,Y (x, y) = pX,Y (−x, y), since Cx2 y =
X
√
C(−x)2 y. By definition, E[XY 3 ] =
xy 3 pX,Y (x, y). Consider the contribution xy 3 pX,Y (x, y) of
x,y
each pair (x, y) to the overall sum. When x = 0, the term xy 3 pX,Y (x, y) is equal to zero and thus
contributes nothing to the overall sum. For each pair (x, y) with x 6= 0, there is another pair (−x, y)
which contributes −xy 3 pX,Y (−x, y) = −xy 3 pX,Y (x, y). Thus, the contribution of each pair (x, y) is
canceled out by the contribution of (−x, y). Therefore, E[XY 3 ] = 0.
Problem 7. Let X and Y be independent random variables. Random variable X has a discrete
uniform distribution over the set {1, 2, 3}, and Y has a discrete uniform distribution over the set
{1, 3}. Let V = X + Y , and W = X − Y .
(a) Are V and W independent? Explain without calculations.
Solution. No. Independence of V and W would imply that:
pW |V (w|v) = pW (w),
which means the distribution of W cannot depend on the value of V . But in fact, unconditionally,
W can have several different experimental values, whereas conditioned on V = 6, both X and
Y must be 3 and so W = 0 with probability 1. Thus pW |V (w|6) 6= pW (w), and therefore V and
W are dependent.
9
w
1/6
2
1/6
1
1/6
0
1
2
1/6
3
4
5
6
v
−1
1/6
−2
1/6
Figure 2: A sketch of the joint probability mass function of V and W for Problem 7(c): there are
six equally likely pairs of values, each has probability 1/6. The two circled points comprise the event
W > 0 considered in Part (d).
(b) Find and plot pV (v). Also, determine E[V ] and var(V ).
(c) Find and show in a diagram pV,W (v, w).
Solution. To visualize this situation, it is helpful to look at the joint PMF of X and Y . Since
both X and Y are uniform, and since they are independent, each of the six possible pairs of
their experimental values has probability 1/6. In addition to these probabilities, let us tabulate
the corresponding experimental values v and w of random variables V and W :
y \ x
1
3
1
2
1/6
v=2
w=0
1/6
v=4
w = −2
1/6
v=3
w=1
1/6
v=5
w = −1
3
1/6
v=4
w=2
1/6
v=6
w=0
From this table, it is easy to determine the joint probability mass function of V and W , shown
in Fig. 2.
To get the marginal PMF for V , we need to sum pV,W over w, for each v, i.e., take vertical sums
in our picture of the joint PMF of V and W :
 1
 6 , v = 2, 3, 5, 6,
1
, v = 4,
pV (v) =
 3
0, otherwise.
The PMF of V is depicted in Fig. 3. Since it is symmetric about v = 4, we have: E[V ] = 4.
10
0.4
0.35
0.3
pV(v)
0.25
0.2
0.15
0.1
0.05
0
1
2
3
4
v
5
6
7
Figure 3: pV (v) for Problem 7(b).
1
1
V=2
0.5
0
0.5
1
2
1
0
3
1
2
1
V=4
0.5
0
V=3
3
V=5
0.5
1
2
1
0
3
1
2
3
x
V=6
0.5
0
1
2
3
x
Figure 4: Conditional PMF pX|V (x|v) in Problem 7(f), as a function of x, for each of the five possible
experimental values of V .
Also,
var(V ) = E[(V − E[V ])2 ] = E[(V − 4)2 ] =
=
=
X
v
(v − 4)2 pV (v)
1
1
1
· [(2 − 4)2 + (3 − 4)2 + (5 − 4)2 + (6 − 4)2 ] + · (4 − 4)2 = (4 + 1 + 1 + 4)
6
3
6
5
.
3
(d) Find E[V |W > 0].
Solution. The event W > 0 corresponds to the two circled points in the picture of the joint
PMF of V and W . Conditioned on this event, there are two equally likely values that V can
assume: 3 and 4. The conditional expectation is therefore 3.5.
(e) Find the conditional variance of W given the event V = 4.
11
Solution. Looking at our sketch of pV,W (v, w) again, we see that, conditioned on V = 4, there
are two equally likely values for W , 2 and −2:
1
2 w = −2, 2
pW |V (w|4) =
0 otherwise.
This conditional PMF is symmetric about 0 and therefore E[W |V = 4] = 0, and
var[W |V = 4] = E[W 2 |V = 4] = 22 ·
1
1
+ (−2)2 · = 4.
2
2
(f ) Find and plot the conditional PMF pX|V (x|v), for all values.
Solution. Looking back at the table of pX,Y and corresponding values of V and W that we
constructed in Parts (b), (c), we see that, given V = 2, 3, 5, 6, X has to be 1,2,2,3, respectively:
1
x=1
pX|V (x|2) =
0 otherwise
1
x=2
pX|V (x|3) =
0 otherwise
1
x=2
pX|V (x|5) =
0 otherwise
1
x=3
pX|V (x|6) =
0 otherwise
When V = 4, X is equally likely to be 1 or 3, and therefore we get:

x=1
 1/2
pX|V (x|4) =
1/2
x=3

0 otherwise
These five conditional probability mass functions are depicted in Figure 4.
Problem 8. (Ross [7], Chapter 4, Problem 27.)
An insurance company writes a policy to the effect that an amount of money x must be paid if some
event A occurs within a year. If the company estimates that A will occur within a year with probability
p, what should it charge the customer so that its expected profit will be 10% of x?
Solution. (Ilya Pollak.)
The amount of money to be paid, X, is a Bernoulli random variable with two possible outcomes: x
and 0. The probability of X = x is p, and the probability of X = 0 is 1 − p. Therefore, E[X] = px.
The profit is Y = c − X where c is the amount the company charges the customer for the policy. The
expected profit is E[Y ] = E[c − X] = c − E[X] = c − px. If this is to be equal to 0.1x, we must have
c = (p + 0.1)x.
12
Problem 9. (Ross [7], Chapter 4, Problem 21.)
A total of four buses carrying 148 students from the same school arrive at a football stadium. The buses
carry, respectively, 40, 33, 25, and 50 students. One of the students is selected randomly (according to
a discrete uniform distribution) from the set of all 148 students. Let X denote the number of students
that were on the bus carrying this randomly selected student. A bus driver is selected randomly (also
according to a discrete uniform distribution) from the set of the four bus drivers. Let Y denote the
number of students on his bus. Compute E[X] and E[Y ].
Solution. (Ilya Pollak.)
For 40 out of the 148 students, X = 40; for 33 out of the 148 students, X = 33; for 25 out of the 148,
X = 25; and for 50 out of the 148 students, X = 50. Therefore, the PMF of X is:

40/148, x = 40



33/148, x = 33
pX (x) =
25/148, x = 25



50/148, x = 50
Calculating the expectation for this PMF, we get:
E[X] = 40 ·
33
25
50
1600 + 1089 + 625 + 2500
5814
40
+ 33 ·
+ 25 ·
+ 50 ·
=
=
≈ 39.28
148
148
148
148
148
148
The PMF for Y is discrete uniform:

1/4,



1/4,
pY (y) =
 1/4,


1/4,
y
y
y
y
= 40
= 33
= 25
= 50
Calculating the expectation for this PMF, we get:
E[Y ] =
148
40 + 33 + 25 + 50
=
= 37.
4
4
When we are randomly selecting a bus driver, each bus has equal probability. When we are randomly
selecting a student, we are more likely to select a student from a more populated bus. Hence, in computing the expectation, the more populated buses are weighted more heavily. This is why E[X] > E[Y ].
Problem 10. (Aditya Mohan and Ilya Pollak.)
Let n be a non-random, fixed positive integer. Let p be a non-random, fixed positive real number such
that p < 1. Let X1 , . . . , Xn be independent Bernoulli random variables, with P ({Xi = 1}) = p and
P ({Xi = 0}) = 1 − p for all i = 1, . . . , n. Random variable Z is defined as
Z = X1 + X2 + . . . + Xn .
It is given that nP(Z = 0) = P(Z = 1). Find the value of p.
Solution. Since Z is the sum of n independent Bernoulli random variables with parameter p, it is
binomially distributed with parameters n and p. Therefore, P(Z = 0) = (1 − p)n , nP(Z = 0) =
13
n(1 − p)n , and P(Z = 1) = np(1 − p)n−1 . We are therefore given that n(1 − p)n = np(1 − p)n−1 .
Dividing both sides of this equation by n(1 − p)n−1 , we get 1 − p = p, and therefore p = 1/2.
Problem 11: Expected utility theory and St. Petersburg paradox.
(Ilya Pollak.)
Recall that, in the St. Petersburg paradox problem, a fair coin gets independently flipped until the
first H comes up. If N is the total number of flips up to and including the first H, the casino pays the
player 2N dollars. The paradox is in the fact that, while the player’s expected winnings are infinite,
most people would not pay much for the privilege of playing this game.
An explanation provided by G. Cramer and D. Bernoulli is that, rather than maximizing the expected
value of their wealth, people try to maximize the expected utility of wealth. Both Cramer and Bernoulli
furthermore argued that any person’s marginal utility of wealth1 is a decreasing function of wealth:
an additional $1 is less important to you when you are wealthy than when you are poor. Bernoulli
proposed a logarithmic function as a model for utility.
Let U be the utility function, and W wealth. We assume that
U (W ) = log2 W for any W > 0.
Thus, if a person with initial wealth w0 plays one coin-flipping game and gets charged a fee of f < w0 ,
his wealth W after the game will be
W = w0 − f + 2N .
His utility after the game will be
U (W ) = log2 (w0 − f + 2N ).
Before playing the game, however, he does not know N and therefore does not know W and U (W ).
He does, however, know that N is a geometric random variable with parameter p = 1/2. To decide
whether or not to play, he compares the expected utility of wealth after playing, E[U (W )], with the
utility of current wealth, U (w0 ) = log2 w0 . If the expected utility E[U (W )] exceeds log2 w0 , he will
play. If the expected utility E[U (W )] is smaller than log2 w0 , he will not play. If the expected utility
E[U (W )] is equal to log2 w0 , he will be indifferent between playing and not playing. His expected
utility from playing is:
∞
X
1
log2 (w0 − f + 2n )
(4)
E[U (W )] =
2n
n=1
(a) Let m∗ be the smallest positive integer that is greater than or equal to log2 (w0 − f ). Let m ≥ m∗
be an integer. Show that
∞
X
1
m+2
log2 (w0 − f + 2n ) ≤ m−1
n
2
2
n=m
Solution. Note that w0 − f ≤ 2m , because log2 (w0 − f ) ≤ m. Thus, for any n ≥ m, we have
w0 − f + 2n ≤ 2m + 2n ≤ 2n + 2n = 2n+1 .
1
Marginal utility is the first derivative of utility with respect to wealth.
14
Therefore, for any n ≥ m,
log2 (w0 − f + 2n ) ≤ log2 2n+1 = n + 1.
Using this inequality for every term in the sum, we get:
∞
X
1
log2 (w0 − f + 2n )
n
2
n=m
∞
X
1
(n + 1)
n
2
n=m
≤
n−m=k
=
=
=
=
=
∞
X
1
(m + k + 1)
2k+m
k=0
"∞
#
∞
1 Xm+1 X k
+
2m
2k
2k
k=0
k=0
1
m+1
1/2
+
2m 1 − 1/2 (1 − 1/2)2
1
[2m + 4]
2m
m+2
2m−1
(Here we used
P the result from the chocolate bar example considered in class on how to sum series
of the form k k2−k .)
(b) With m defined as in Part (a), and assuming m ≥ 2, show that
m
X
1
log2 (w0 − f + 2n ) ≤ (m + 1)(1 − 2−m+1 )
2n
n=1
Solution. As argued above, w0 − f ≤ 2m . Therefore, for any n < m, we have:
w0 − f + 2n ≤ 2m + 2m = 2m+1 .
Using this inequality for every term in the sum, we obtain:
m−1
X
n=1
1
log2 (w0 − f + 2n ) ≤
2n
m−1
X
n=1
m+1
2n
= (m + 1)
1/2 − (1/2)m
1 − 1/2
= (m + 1)(1 − 2−m+1 ).
(c) Show that E[U (W )] is finite and nonnegative.
Solution. By assumption, w0 − f > 0. Therefore, w0 − f + 2n > 2 for any integer n ≥ 1, which
means that log2 (w0 − f + 2n ) > 1 for n ≥ 1. Therefore, each term in the summation (4) is
nonnegative, and E[U (W )] > 0.
15
On the other hand, with m∗ defined as in Part (a), it follows from Parts (a) and (b) that
( ∗
m +2
=3
if m∗ = 1
2m∗∗ −1
E[U (W )] ≤
∗
1
m +2
∗
+ (m∗ + 1) − 2mm∗+1
if m∗ ≥ 2
−1 = m + 1 − 2m∗ −1
2m∗ −1
≤ max(3, m∗ + 1 −
1
2m∗ −1
)
(d) Write a Matlab function that, given an initial wealth w0 , a fee f , and a precision parameter
d, approximately computes the expected utility E[U (W )] with error not exceeding d. In other
words, the output of your function must be a number V such that
|V − E[U (W )]| ≤ d
(i) First, your function should compute m∗ as follows:
if (w0 <= f)
error(’The fee must be smaller than the initial wealth’);
end;
m_star = ceil(log2(w0-f));
if (m_star < 1)
m_star = 1;
end;
(ii) Then use the result from Part (a) to find an m such that
∞
X
1
log2 (w0 − f + 2n ) ≤ d
n
2
n=m
According to Part (a), any m ≥ m∗ such that
m+2
≤d
2m−1
will do. One way of doing this is:
m = m_star;
while ((m+2)/2^(m-1) >= d)
m = m+1;
end;
(iii) Finally, compute
V =
m−1
X
n=1
1
log2 (w0 − f + 2n )
2n
Since, according to Part (c), E[U (W )] − V > 0 and
∞
X
1
log2 (w0 − f + 2n ) ≤ d,
E[U (W )] − V =
n
2
n=m
V approximates E[U (W )] to within d. Here is a possible implementation:
16
V=0;
for n=1:m-1
V = V + 2^(-n)*log2(w0-f+2^n);
end;
(e) Write a Matlab function that, given an initial wealth w0 and a precision parameter d, determines
the maximum fee f which a person with initial wealth w0 would be willing to pay for playing
one game. Assume that the fee f is an integer number of dollars. The precision parameter d is
to be used for approximately computing the expected utility, as in Part (d).
Solution.
f = 0;
u0 = log2(w0);
V = expected_log_utility(w0,0,d);
while ((V >= 0) & (f < w0))
f = f+1;
if (f < w0)
V = expected_log_utility(w0,f,d) - u0; % This is the function written in
% Part (d)
end;
end;
f_max = f-1;
(f) Using precision parameters d1 = 10−5 and d2 = 10−10 , calculate the maximum acceptable fees
for:
(i) w0 = $10;
(ii) w0 = $100;
(iii) w0 = $1000;
(iv) w0 = $10000;
(v) w0 = $1, 000, 000.
Are the answers the same for the two precision parameters?
Solution. Suppose that the name of the function written in Part (e) is max StPetersburg fee.
Then we can use the following script:
for w = [10,100,1000,10000,1000000]
for d = [0.00001, 0.0000000001]
[log10(w),log10(d),max_StPetersburg_fee(w,d)]
end;
end;
17
The answers for the first four initial wealth levels are, respectively, $4, $7, $10, and $14, and
are the same for the two precision parameters. Precision d1 = 10−5 is not enough to determine
the largest fee for last case, w0 = $1, 000, 000. With this precision, the largest fee is $16. With
precision d2 = 10−10 , the largest fee is $20.
References
[1] D.P. Bertsekas and J.N. Tsitsiklis. Introduction to Probability, 2nd Edition, Athena Scientific, Belmont, Massachusetts, 2008.
[2] A. Drake. Fundamentals of Applied Probability Theory, McGraw-Hill, Inc., 1988.
[3] A. Leon-Garcia. Probability and Random Processes for Electrical Engineering, 2nd Edition, Addison Wesley Longman, 1994.
[4] National Vital Statistics Reports, vol. 57, no. 14, p. 26, 2009. www.cdc.gov/nchs/data/nvsr/nvsr57/nvsr57 14.pdf.
[5] Group Invests $5 Million to Hedge Bets in Lottery. The New York Times, February 25, 1992.
www.nytimes.com/1992/02/25/us/group-invests-5-million-to-hedge-bets-in-lottery.html
[6] Lottery Will Pay Disputed Jackpot. The New York Times, March 11, 1992.
www.nytimes.com/1992/03/11/us/lottery-will-pay-disputed-jackpot.html
[7] S. Ross. A First Course in Probability, 6th Edition, Prentice-Hall, 2002.
[8] Life Expectancy Hits New High of Nearly 78. The Washington Post, August 19, 2009.
www.washingtonpost.com/wp-dyn/content/article/2009/08/19/AR2009081904131.html
18