hw04
hw04
Homework #4
Due Thursday February 6, beginning of lecture. Submit on Gradescope.
1. Using your class notes, prepare a 1-2 paragraph summary of what we talked about
in class in the last week. I do not want just a bulleted list of topics, I want you to
use complete sentences and establish context (Why is what we have learned relevant?
How does it connect with other things you have learned here or in other classes?).
The more insight you give, the better.
2. St. Petersburg Paradox. Suppose you are playing the following very favorable
game of “heads and tails”. A fair coin is flipped until it comes up tails. If it comes
up tails on the q th flip, you receive $2q .
3. M&Ms come in six different colors; within a bag of any size, the color of each M&M
is uniformly distributed between these six colors, and is independent of the colors of
the other M&Ms.
You are drawing M&Ms one at a time from a very large bag and observing their color.
(a) Suppose that all of the M&Ms you have drawn out so far have n distinct colors,
where 1 ≤ n ≤ 5. Define
Calculate E[X].
(Hint: Let X1 be the number of draws to get one color, X2 be the number of
draws to get the second color after the first is in hand, X3 be the number of
draws to get the third color after the first two are in hand, etc. Realize that
E[X] = E[X1 + X2 + · · · + X6 ] = E[X1 ] + E[X2 ] + · · · + E[X6 ].)
4. You are playing “heads or tails” with a friend. The coin is fair and you are playing a
“best of 9” game: the coin flipped until either the 5th head comes up or the 5th tail
comes up. if the fifth head comes up first, your friend pays you $50, otherwise you
pay her $50. Obviously, the probability you win this game is 0.5 and so your expected
return is $0.
(a) What is the standard deviation of your net outcome (total money you win/lose)
if you play this game 5 times?
1
(b) On a given game, after six flips, your friend is up 4-2 (there have been four
tails and two heads). Your friend gets an urgent phone call and has to leave
immediately and so can’t finish the game. Fortunately, an observer offers to
take her place. What is a fair price (expected money outcome) for the observer
to pay your friend to inherit her position for that game?
5. Recall that a binomial random variable, which models the number of “successes” (or
“failures”) over n Bernoulli trials, has pmf
n k
pX (k) = p (1 − p)n−k , k = 0, 1, . . . , n.
k
(a) Using the fact that we can write a binomial random variable X as X = ni=1 Xi
P
where the Xi are independent Bernoulli random variables, calculate E[X], i.e.,
the expectation of a binomial random variable.
(b) Using a similar approach, calculate var(X).
(c) Recall that the pmf of a Poisson random variable is given by
λk
pX (k) = e−λ , k = 0, 1, 2, . . .
k!
It is a fact that the binomial pmf can be very closely approximated by a Poisson
pmf when n is large and p is small, i.e.,
k
−λ λ n k
e ≈ p (1 − p)n−k
k! k
6. A telecommunications system digitizes your voice, breaks it into small time time
bins ( 10ms) called packets, and transmits these packets through a hardware system
serving many users simultaneously. Many packets don’t have any speech content and
don’t need to be transmitted, but there is no way to know for sure how many that
will be at a given time (it depends on the current activity of the users). Let X be
a RV denoting the number of packets containing speech during a given small time
window for n = 48 users (i.e., X = 0, 1, . . . , 48). We consider X to be governed by
a binomial distribution with parameter p = 1/3, meaning that roughly 33% of the
users will be speaking at a time.
2
To save bandwidth (=$), the hardware is designed to only support the transmission
of M = 20 packets in any time window and any excess packets are discarded. In other
words the system is effectively compressing the data by discarding up to 28/48 ≈ 58%
of the data.
(a) What is the expected number of packets produced in a time window? Find the
pmf, and then use Matlab to compute the value of the expectation (include your
code in the PDF you submit).
(b) What is the expected number of packets discarded in a time window? Find the
pmf, and then use Matlab to compute the value of the expectation (include your
code in the PDF you submit).