You are on page 1of 2

ACM/EE 116, FALL 2016, HOMEWORK 3

Due: Tuesday, Oct 25


Please scan you solution and submit by 23:59:59, Oct 25, 2016 as a single zip
file LastnameFirstnameHW3.zip to acm116fall2016@gmail.com, with a subject line
Lastname Firstname HW3.
Problem 1. (10 points) A problem to warm up.
The joint PDF of random variables X and Y is
y 2 x2 y
e ,
0 < y < , y x y.
8
Find the conditional expectation E[X|Y = y].
f (x, y) =

(1)

Problem 2. (10 points) Caltech vs Influenza1.


A Caltech student whose level of exposure to an influenza virus is x [0, 1] contracts
the disease with probability q(x) = x . Suppose that the exposure level of a
randomly chosen student is modeled by a Beta random variable X Beta(, ),
with density fX (x) x1 (1 x)1 .
(a) Find the conditional density of the exposure level of that student given that
the student has influenza.
(b) Find the conditional expected value E[X|the student has influenza].
(c) Confirm the result obtained in (b) by simulation for the case = 2, = 6,
and = 2. Namely, seed the random number generator, rng(116), generate
n = 104 realization of the exposure level X and the corresponding outcomes
of the exposure to the virus (contracts the disease or does not contract),
and compute an appropriate sample average. Please submit your m-file
hw3problem2Lastname.m which implements this task.
Problem 3. (10 points) Tying shoelaces2.
A box contains n shoelaces. You randomly chose two free ends and tie them up.
You repeat this until there are no free ends. Find the expected number of loops
at the end of the process. Before solving the problem, guess the expected number
of loops if you start with 100 shoelaces. Then check you intuition by solving the
problem.
Problem 4. (10 points) Are the digits of random?
A real number d.d1 d2 d3 ... is called normal 3 if its infinite sequence of digits is distributed uniformly in the sense that each of m = 10 digit values has the same
limiting frequency 1/m. In other words, the digits d1 , d2 , d3 ... have all the appearance of being independent samples from a uniform distribution on {0, 1, . . . , 9}.
Remarkably, it is not known whether is normal, i.e. whether the digits
= 3.14159265358979323846264338327950288419716939937510 . . .

(2)

1http://www.cdc.gov/flu/about/season/flu-season-2016-2017.htm
2This problem is a popular guest at various tests, exams, and interviews.
3The exact definition of a normal number is a bit more complicated, https://en.wikipedia.

org/wiki/Normal_number.
1

ACM/EE 116, FALL 2016, HOMEWORK 3

are uniformly distributed. This question is in fact a premier unsolved problem of


mathematics4.
Possible evidence against the hypothesis that the digits of are random, is the
fact that starting with the 24,658,601th digit, there is a sequence of nine successive
7s (the longest sequence of the same digit value in the first 24,658,609 digits):
= 3. 1415
. {z
. . . . . . .}. 777777777 . . .
|
24,658,600 digits

(3)

Surely, this does not look random. In this problem, we will investigate whether this
fact indeed contradicts the normality hypothesis.
(a) Suppose that independent trials, each of which is equally likely to have any
of m possible outcomes {1, 2, . . . , m} are performed until the same outcome
occurs k consecutive times. Let Nk denote the number of trials. Show that
E[Nk ] = 1 + m + . . . + mk1 .

(4)

(b) If the normality hypothesis is true, the fact (3) means that n9 = 24, 658, 609
is a realization of random variable N9 with m = 10. The further away n9
from the mean E[N9 ] is, the stronger the evidence against the hypothesis.
If n9 is less then one standard standard deviation (which is the square root
of the variance) away from the mean, then the evidence is considered to be
weak. Use the fact that V[Nk ] E[Nk ]2 to assess whether the evidence is
weak or not.
Problem 5. (10 points) Democrats vs Republicans.
Assume for simplicity that all people living in the US support either Democrats
or Republicans. Draw a county at random, and Q and 1 Q be respectively the
proportions of people in that county that support the Democratic and Republican
parties. Suppose that Q is uniformly distributed, Q U [0, 1]. This model is
reasonable if we know nothing about the true distribution of Democrats. If some
information is available however, then more realistic models can be used, such as
the beta distribution, which is often used for modeling proportions5. Next, draw n
people at random from that county, and let X be the number of those people who
support Democrats. Given Q = q, we can model X as a Binomial random variable,
X|Q = q Bin(n, q). Find the expected value of X and its variance.

4For a popular introduction, see the following Huffington Post article at http://www.
huffingtonpost.com/david-h-bailey/are-the-digits-of-pi-random_b_3085725.html.
5The uniform distribution on [0, 1] is a special case of the beta distribution Beta(, ) with
= = 1.

You might also like