EECS 126 Probability and Random Processes UC Berkeley ..., Slides of Probability and Statistics

You have 160 minutes to complete the exam and 10 minutes exclusively for submitting your exam to Gradescope. (DSP students with X% time ...

Typology: Slides

2022/2023

Uploaded on 05/11/2023

rubytuesday
rubytuesday 🇺🇸

4.4

(38)

273 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EECS 126 Probability and Random Processes UC Berkeley, Fall 2020
Shyam Parekh December 16, 2020
Final
Last Name First Name SID
Rules.
Unless otherwise stated, all your answers need to be justified and your work must
be shown. Answers without sufficient justification will get no credit.
You have 160 minutes to complete the exam and 10 minutes exclusively for submitting your
exam to Gradescope. (DSP students with X% time accomodation should spend 160 ·X%
time on the exam and 10 minutes to submit).
Collaboration with others is strictly prohibited.
You may reference your notes, the textbook, and any material that can be found through the
course website. You may use Google to search up general knowledge. However, searching up
a question is not allowed.
You may not use online solvers or graphing tools (ex. WolframAlpha, Desmos, Python).
Simple functions (ex. combinations, multiplication) are fine.
For any clarifications you have, please create a private Piazza post. We will have a Google
Doc that shows our official clarifications.
Problem points earned out of
Problem 1 16
Problem 2 7
Problem 3 7
Problem 4 7
Problem 5 8
Problem 6 10
Problem 7 10
Problem 8 13
Problem 9 7
Problem 10 8
Problem 11 7
Total 100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download EECS 126 Probability and Random Processes UC Berkeley ... and more Slides Probability and Statistics in PDF only on Docsity!

EECS 126 Probability and Random Processes UC Berkeley, Fall 2020 Shyam Parekh December 16, 2020

Final

Last Name First Name SID

Rules.

  • Unless otherwise stated, all your answers need to be justified and your work must be shown. Answers without sufficient justification will get no credit.
  • You have 160 minutes to complete the exam and 10 minutes exclusively for submitting your exam to Gradescope. (DSP students with X% time accomodation should spend 160 · X% time on the exam and 10 minutes to submit).
  • Collaboration with others is strictly prohibited.
  • You may reference your notes, the textbook, and any material that can be found through the course website. You may use Google to search up general knowledge. However, searching up a question is not allowed.
  • You may not use online solvers or graphing tools (ex. WolframAlpha, Desmos, Python). Simple functions (ex. combinations, multiplication) are fine.
  • For any clarifications you have, please create a private Piazza post. We will have a Google Doc that shows our official clarifications.

Problem points earned out of Problem 1 16 Problem 2 7 Problem 3 7 Problem 4 7 Problem 5 8 Problem 6 10 Problem 7 10 Problem 8 13 Problem 9 7 Problem 10 8 Problem 11 7 Total 100

1 True or False (4 + 4 + 4 + 4 points)

For each of the following, say whether the assertion is true or false. If it is true, provide justification, and if it is false, give a counterexample.

(a) For any finite sample space Ω and any event A ⊆ Ω, Pr(A) = ||AΩ||.

False, any sample space with non-uniform outcomes (and corresponding event) is a valid example.

(b) If Y = X + Z is Gaussian, then X and Z are both marginally Gaussian.

False. Consider U = N (0, 1) and let X = U 1 {U ≥ 0 } and Z = U 1 {U < 0 }. Then, Y is Gaussian but neither X nor Z are marginally Gaussian.

(c) Michael and Kevin are playing a game where Michael scores Xi ∼ Geometric(1/m) points and Kevin scores Yi ∼ Geometric(1/k) points at round i, independently of other rounds. Then, as the number of rounds goes to infinity, the average total number of points they score per round converges almost surely to m + k.

True. This is SLLN on the iid variables (Xi + Yi).

(d) Suppose a random variable X is bounded in [0, 1], and furthermore suppose that E[X] ≥ . Then Pr(X ≥ /2) ≥ /2.

Suppose towards a contradiction this is not the case. Then we have

E[X] = E[X|X ≥ /2] Pr(X ≥ /2) + E[X|X < /2] Pr(X < /2) < 1 ·

which is a contradiction to our assumption that E[X] ≥ .

2 Waiting Game (7 points)

The amount of time you have to wait for UC Berkeley to announce the PNP policy is exponentially distributed with parameter λ. Solve for the optimal Chernoff upper bound (by applying Markov’s inequality to esX^ ) for the probability that you have to wait for longer than some constant a.

By memoryless property of exponentials, if X = time until the announcement, then X is expo- nentially distributed with parameter λ.

Pr(X > a) = Pr(esX^ > esa) ≤ E[e

sX (^) ] esa Using MGF of an exponential distribution, Pr(X > a) ≤ mins (^) (λ−λs)esa This is equivalent to maximizing the denominator. Taking the derivative of the denominator

We know that E[N ] is λ. We compute E[S] again using iterated expectation:

E[S] = E[E[S|N ]] = E[pN ] = pλ,

since S|N is a Binomial(N, p) distribution. Thus,

E

[

E[S]

α

β

+ E[N ]

β

]

α

β

pλ +

λ β

= λ

p α

1 − p β

Taking λ = 6, p = 14 , α = 16 , and β = 101 gives us that E[X] = 54. Alternate Solution: There are other ways to reason about this – the simplest is probably to note that by poisson splitting, the number of questions Michael can solve is N 1 = Poisson(3/2) and the number of questions he cannot solve is N 2 = Poisson(9/2). Denote X 1 as the amount of time he spends on questions he can solve, and X 2 the amount of time he spends on problems he cannot solve. Then we have that

E[X] = E[X 1 + X 2 ] = E[X 1 ] + E[X 2 ] = E[E[X 1 |N 1 ]] + E[E[X 2 |N 2 ]] = 6 ·

5 Seasonal Depression (8 points)

Kevin is a store owner in a part of town with strange weather. The weather alternates between two states: sunny and rainy. The length of each sunny period and rainy period is determined by an independent exponential with rate 1.

  • If the weather is sunny, customers arrive at a store according to a Poisson process with rate 1 and each one leaves with rate 1.
  • If the weather is rainy, customers arrive at a store according to a Poisson process with rate 1 and do not leave.

Suppose it is currently sunny and there are no customers in the store. What is the expected amount of time before there are at least 2 people in the store?

The key to this problem here is that we can set this up as a markov chain with 4 non-terminal states. There will be one state for each combination or sunny/rainy and number of customers. State Si represents sunny with i customers, and Ri represents rainy with i customers.

We set up the hitting time equations, where xT represents the expected time to reach END starting from state T.

xS 0 =

xS 1 +

xR 0

xS 1 =

xR 1 +

xS 0

xR 0 =

xR 1 +

xS 0

xR 1 =

xS 1.

We solve and get the solution

xS 0 =

6 Geometric Perspective on Variance (3 + 5 + 2 points)

In this problem, we prove the identity var(X) = E[var(X|Y )] + var(E[X|Y ]). Assume X and Y are zero mean. You may use that var(X|Y ) = E[(X − E[X|Y ])^2 |Y ].

(a) First, show that E[var(X|Y )] = var(X − E[X|Y ]).

E[var(X|Y )] = E[E[(X − E[[X|Y ])^2 |Y ]] = E[(X − E[X|Y ])^2 ] = var(X − E[X|Y ]).

The last inequality holds because X − E[X|Y ] is zero mean.

No. The chain has period 6, so we are not guaranteed to converge.

(d) Draw or describe a continuous time Markov chain with the same stationary distribution.

One example could be Q(i, i + 1) = 2 for i = 1, ..., 11, and then Q(12, 1) = Q(12, 6) = 1.

8 Hidden Markovs Among Us (3 + 3 + 3 + 2 + 2 points)

Let the number of people infected by COVID on day n be denoted by Xn. Each day, Xn increases by 1 with probability 23 or decreases by 1 with probability 13. If Xn = 0, it stays the same with probability 13 or increases with probability 23. Then, let Yn ∼ Binomial(Xn, 34 ) represent the number of people who test positive for COVID, i.e. that we report having COVID. Assume X 0 = 1.

(a) What is the MAP estimate of X 2 given that we observe Y 2 = 1?

There are three possible ways we can observe Y 2 = 1. Enumerating them and then evalu- ating using conditional probability:

(1) X 1 = 0, X 2 = 1, Y 2 = 1, which happens with probability 13 · 23 · 34 = (^16) (2) X 1 = 2, X 2 = 1, Y 2 = 1, which happens with probability 23 · 13 · 34 = (^16) (3) X 1 = 2, X 2 = 3, Y 2 = 1, which happens with probability 23 · 23 · 3 · (1 − 34 )^2 · 34 = 161

Normalizing, we get P (X 2 = 1|Y 2 = 1) =

(^16) + (^16) (^16) + 16 + 161 =^1619. Our MAP estimate is^ Xˆ 2 = 1.

(b) What is the MLE estimate of X 2 given Y 2 = 1? Multiple values are fine.

This is the same as question 1e from Midterm 1. The pmf of the binomial given Y 2 = 1 is proportional to X 2 · (^14 )X^2. Checking the first couple values of X 2 :

(1) X 2 = 1:. 25 (2) X 2 = 2:. 125 (3) X 2 = 3:. 057

So our MLE estimate is also 1.

(c) What is the LLSE estimator of X 2 given Y 2 = 1? (You may use Var(Y 2 ) ≈ 1 .056)

First we solve for the covariance to apply the LLSE formula:

Cov(X 2 , Y 2 ) = E[X 2 Y 2 ] − E[X 2 ] E[Y 2 ]

= E[X 2 E[Y 2 |X 2 ]] −

E[X 2 ]^2

= E[X 2

X 2 ] −

E[X 2 ]^2

Var(X 2 )

We calculate P (X 2 = 3) = 49 , P (X 2 = 1) = 49 , P (X 2 = 0) = 19. This gives us E[X 2 ] = (^169) and Var(X 2 ) ≈ 1 .2839. As a result our LLSE is L[X 2 |Y 2 ] ≈. 9117 Y 1 + .5627. For Y 2 , this is equal to 1.4744.

(d) What is the MMSE estimator of X 2 given Y 2 = 1?

We can reuse the probabilities from part (a). We get Xˆ 2 = 193 · 3 + 1619 · 1 = 2519 ≈ 1 .3158.

(e) Is the Markov chain {Xt}∞ t=0 positive recurrent, null recurrent, or transient?

Transient. Ignoring the self-loop, it is the birth-death chain.

9 Dungeons and Dragons (7 points)

In a game of Dungeons and Dragons, Aditya suspects Catherine is using a loaded 20-sided die. However, he doesn’t want to risk falsely accusing her, so he conducts a hypothesis test to upper- bound the probability of a false alarm. Suppose if X = 0, the die is fair and a roll Y is distributed according to Pr(Y = y|X = 0) = 0.05 for 1 ≤ y ≤ 20. If X = 1, the die is loaded, and rolls have the distribution

Pr(Y = y|X = 1) =

  1. 025 1 ≤ y ≤ 10
  2. 075 11 ≤ y ≤ 20

(or more simply, the probability of being greater than 10 is three times the probability of being less than or equal to 10). Construct a Neyman-Pearson decision rule to maximize the probability Aditya is correct if he accuses Catherine of cheating, while constraining the probability Aditya falsely accuses Catherine to be ≤ 0 .05.

Notice that the cases 1-10 and 11-20 have equivalent probabilities in either case, so it’s equivalent to consider the indicator random variable Z = 1 {Y > 10 }, i.e. Z = 1 if 11 ≤ Y ≤ 20 and Z = 0 otherwise. The likelihood ratio in terms of Z is

xˆ 2 n = a^2 xˆ 2 n− 2 + k 2 n(y 2 n − a^2 xˆ 2 n− 2 ),

where the Kalman gain k 2 n is given by

k 2 n =

a^4 σ 22 n| 2 n + (a^2 + 1)σ v^2 a^4 σ 22 n| 2 n + (a^2 + 1)σ v^2 + σ w^2

and the estimator variance obeys the recurrence

σ^22 n+2| 2 n+2 = (1 − kn)a^4 σ 22 n| 2 n.

  1. Find a recurrence relation for the MMSE of the odd states ˆx 2 n+1 = E[x 2 n+1|y 0 , y 2 ,... , y 2 n] in terms of ˆx 2 n.

x 2 ˆn+1 = a 2 n xˆ 2 n

11 Oh Yeahhhhh (2 + 5 points)

Suppose an infinitely large bucket is being filled with kool-aid continuously with rate 1 Liters/min. Two bartenders serve drinks according to independent Poisson Processes with rates 2 drinks/min (Bartender A) and 3 drinks/min (Bartender B). Whenever they serve a drink, they empty the shared bucket into the glass and serve that. Say this process started infinitely in the past.

  1. Suppose you come in at a random time, cut to the front of the line, and take the next drink that is served by either bartender. What is the expected volume of the drink you get?

This is RIP of the merged process, so the answer is 2/5.

  1. Suppose you come in at a random time, again cut to the front, but insist on taking the next drink served by Bartender A. What is the expected volume of the drink you receive?

For bartender A, who is serving drinks at rate 2 drinks/min. Then let X be the amount of kool-aid you receive. We have

E[X|you take bartender A] = Pr[Next arrival is bartender A] E[RIP of merged process]+

Pr[next arrival is bartender B] E[interval length of merged PP]

=