







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








EECS 126 Probability and Random Processes University of California, Berkeley: Spring 2018 Kannan Ramchandran May 7, 2018
Last Name First Name SID
Problem points earned out of Problem 1 25
Problem 2 20
Problem 3 20
Problem 4 15
Problem 5 25
Problem 6 10
Problem 7 15
Total 100 (+30)
Problem 1: Answer these questions briefly but clearly. [25]
(a) Random Dog Walk [5]
A dog walks on the integers, possibly reversing direction at each step with probability p = 0.1. Let X 0 = 0. The first step is equally likely to be positive or negative. A typical walk might look like this: (x 0 , x 1 , x 2 , x 3 ,.. .) = (0, − 1 , − 2 , − 3 , − 4 , − 3 , − 2 , − 1 , 0 , 1 ,.. .).
True / False: The sequence of random variables (Xn)n≥ 0 is a Markov chain.
P(Xn+2 = k + 2 | Xn+1 = k + 1, Xn = k) = 0. 9 6 = P(Xn+2 = k + 2 | Xn+1 = k + 1, Xn = k + 2) = 0. 1.
(b) MCMC [5]
Let { 0 , 1 } be the state space of a Markov chain. Suppose that we try to simulate from the distribution π =
via Metropolis-Hastings using the proposal distribution:
p(x, y) =
, y = x 2 3 , y = 1 − x
, x = 0, 1.
In other words, at state x we propose state y with probability p(x, y). What should we set the acceptance probabilities A(x, y) to be in order to make the algorithm correct (i.e., the stationary distribution of the chain is π)?
In fact we can accept every proposal and the stationary distribution will correctly be π.
(c) Book Shop [5]
A small book shop has room for at most two customers. Potential customers arrive at a Poisson rate of ten customers per hour; they enter if there is room and are turned away, never to return, otherwise. The bookie serves the admitted customers in order, requiring an exponentially distributed time of mean four minutes per customer.
Suppose there are two customers in the store. Find the expected amount of time until the store is empty again.
x
y
Figure 2: The MMSE is shown in red.
Problem 2: Waiting in Line for Infinity War (no spoilers) [20]
At 6:30 PM, there are 9 people waiting in line outside of the theater to watch Avengers: Infinity War. People arrive and wait in line according to a Poisson process with rate 2 per minute.
(a) [5] Starting from 6:30 PM, the theater admits exactly one person every minute (i.e., at 6: PM, 6:32 PM, 6:33 PM, etc.). What is the expected number of people remaining in line the instant after 6:40 PM?
Let N 10 represent the number of people who have arrived between 6:30 PM and 6:40 PM. Then, we are looking at E[max{N 10 − 1 , 0 }]. With probability exp(−20), no one arrives between 6:30 PM and 6:40 PM. So, since N 10 ∼ Poisson(20),
E[max{N 10 − 1 , 0 }] =
k=
exp(−20)20k k! (k − 1) =
k=
exp(−20)20k k! k −
k=
exp(−20)20k k! = 20 − [1 − exp(−20)].
(b) [5] Suppose we observe the time Y at which the third new person arrives in line. What is the MLE estimate for the time X at which the fourth new person arrives in line? (Assume that X and Y are measured in minutes since 6:30 PM.)
Given X = x, we know that Y is the maximum of three i.i.d. Uniform[0, x] random vari- ables. Thus, for y ∈ [0, x], P(Y ≤ y | X = x) = (y/x)^3 , and so fY |X (y | x) = 3y^2 /x^3. Thus, the MLE estimate Xˆ for X given Y is arg maxx> 0 (3y^2 /x^3 ) 1 {x ≥ Y } = Y.
(c) [5] Starting from 6:40 PM, the theater stops letting in more people. The people in line become fed up: each person in line, independently, waits an Exponential(1) amount of time and then leaves the line. (People are still arriving in line according to the Poisson process of rate 2 per minute. If a new person arrives, he or she also waits an Exponential(1) amount of time be- fore leaving the line.) After a long period of time, what is the average number of people in line?
The number of people in line is an M/M/∞ queue with forward rate 2 and backwards rate 1; the stationary distribution is Poisson with mean 2.
(d) [5] Meanwhile, inside the theater, the movie has already begun. Thanos appears on the big screen according to a Poisson process of rate 1 per minute. On each of his appearances, independently with probability 1/3 he makes the audience scream. An observer outside the theater observes S, the number of times that the audience screams in the first 30 minutes. What is the LLSE estimate of T , the number of times that Thanos appeared on the big screen in the first 30 minutes, given S?
By the properties of the Poisson process, T ∼ Poisson(30) and S ∼ Poisson(10). Calculate E[ST ] = E[E(ST | T )] = E[T E(S | T )] = E[T 2 ]/3 = 930/3 = 310. Also, E[T ] = 30 and
Problem 3: Hypothesis Testing [20]
(a) [10] We want to test two hypotheses; we have prior knowledge that X ∼ Bernoulli(2/3). In both cases, our observation Y has the Laplace distribution, but with different mean and shape. In particular
fY |X (y | 0) =
e−|y|, y ∈ R
fY |X (y | 1) =
e−^
|y− 2 | (^2) , y ∈ R.
Construct a decision rule r : R → { 0 , 1 } that minimizes P(r(Y ) 6 = X) = E[I{r(Y ) 6 = X}] (use the MAP rule).
fY |X (Y | 0)P(X = 0) fY |X (Y | 1)P(X = 1)
1 3 ·^
1 2 e
−|Y | 2 3 ·^
1 4 e −|Y − 2 |/ 2 = e
|Y − 2 |/ 2 −|Y |
Therefore,
P(X = 0 | Y ) ≤ P(X = 1 | Y ) ⇐⇒ e|Y^ −^2 |/^2 −|Y^ |^ ≤ 1 ⇐⇒
⇐⇒ Y ≤ −2 or Y ≥
Thus the optimal decision rule is:
r(Y ) =
1 if Y ≤ − 2 0 if − 2 < Y < (^23) 1 if Y ≥ (^23)
Full points were only given for simplified decision rules.
(b) [10] We consider a standard hypothesis testing problem in which we have
a, w.p. (^14) b, w.p. (^14) c, w.p. 12 ,
and Y | X = 1 =
a, w.p. (^12) b, w.p. (^14) c, w.p. 14.
Design a randomized decision rule r : {a, b, c} → { 0 , 1 } in order to minimize P(r(Y ) = 0 | X = 1) subject to P(r(Y ) = 1 | X = 0) ≤ 0 .3.
The likelihood ratio is
L(a) = 2, L(b) = 1,
L(c) =
Looking at the likelihood ratio, we can see that L(a) > L(b) > L(c). We solve for the optimal decision rule using neyman pearson, finding that λ = 1. Thus, if Y = a we should always raise the alarm. If we always raise the alarm when Y = b, then we would exceed the constraint on the PFA, so we set the threshold at L(Y ) = 1. The optimal randomized decision rule, by the Neyman-Pearson Lemma, is
r(Y ) =
1 if Y = a γ if Y = b 0 if Y = c
where the randomization γ is found by P(Y = a | X = 0) + γP(Y = b | X = 0) = 0.3, or γ = 0.2. Full points were only given for properly justified answers.
Problem 5: Estimating Jointly Gaussian Random Variables [25]
Consider the Gaussian random vector [ X Y
(a) [4] Draw on the plane the random variables as vectors in the Hilbert space of random vari- ables. Make sure to note the length of the vectors, as well as the angle that they form.
π/ 3
(b) [4] Find E[X | Y ].
cov(X, Y ) var Y
(c) [5] Create a random variable Z which is a function of X and Y such that
has exactly the same information content as the vector
, in the sense that you can recover the latter vector from the former.
Show that your Z satisfies these properties.
By construction E[ZY ] = 0, and because Z, Y are jointly Gaussian this implies that Z and Y are independent.
In addition from the vector
we can restore
as follows
[ X Y
(d) [6] Let U = Y 3. Find E[X | U ].
Hint: This requires almost no computation, but make sure you justify your answer.
U and Y contain exactly the same information, since from U we can restore Y as U 1 /^3 , because the function y 7 → y^3 is invertible. Hence
E[X | U ] = E
(e) [6] Let V = Y 2. Find E[X | V ].
Hint: This requires almost no computation as well, but first understand why it is different from (c).
The difference from (a) is that now Y contains more information than V , since the function y 7 → y^2 is not invertible, so now we need to consider two cases.
E[X | V ] = E
(Note that the event {Y ≥ 0 } is independent of V .)
Problem 7: HMM Estimation [15]
Consider a HMM (Xn)n∈N with state space { 0 , 1 } and transitions P (0, 1) = P (1, 0) = p ∈ [0, 1]. The hidden state is observed through a Binary Symmetric Channel (BSC) with error probability 1 /3. Assume that the initial state is equally likely to be 0 or 1. The sequence of observations is (1, 1 , 1).
(a) [5] Suppose that it is known that p = 3/4. What is the most likely sequence of hidden states?
It is (1, 0 , 1). Let pk(x) be the largest probability of any sequence of states starting from state x at time k. We solve for these quantities backwards as in the Viterbi algorithm.
p 2 (0) =
p 2 (1) =
These probabilities are just the probabilities of the observations.
p 1 (0) = max
p 2 (0),
p 2 (1)
achieved by 0 → 1 ,
p 1 (1) = max
p 2 (0),
p 2 (1)
achieved by 1 → 0 ,
p 0 (0) = max
p 1 (0),
p 1 (1)
achieved by 0 → 1 → 0 ,
p 0 (1) = max
p 1 (0),
p 1 (1)
achieved by 1 → 0 → 1.
The most likely sequence of states is (1, 0 , 1) with probability 1/12.
(b) [5] Now, suppose that p is unknown. We will try applying the hard EM algorithm to this problem. We start by initializing ˆp(0)^ = 3/4. In the E step, we fill in the most likely values of the hidden variables (X 0 , X 1 , X 2 ) given the observations, assuming that the parameter is ˆp(0). Carry out the E step.
Using our answer from the previous part, we fill in (X 0 , X 1 , X 2 ) = (1, 0 , 1).
(c) [5] In the M step, we compute the MLE of p assuming the filled-in values for the hidden variables computed in the E step. Carry out the M step.
For the hidden states (X 0 , X 1 , X 2 ) = (1, 0 , 1), there are 2 switches of the hidden state, so the likelihood of p is p^2. Thus the MLE is ˆp(1)^ = 1.