Docsity

Probability - Probability - Solved Exam, Exams of Probability and Statistics

Toggle sidebar
bg1
ECE 302
Prof. Ilya Pollak
Final Exam Solutions, 5/4/2012, 3:20-5:20pm in LILY 1105.
•Your ID will be checked during the exam.
•Please bring a No. 2 pencil to fill out the answer sheet.
•This is a closed-book exam. No calculators are allowed. No electronic devices of any kind are
allowed. A formula sheet is provided on the back of this page.
•Please read the instructions on this page very carefully.
•Please fill out the following information on your answer sheet:
–Instructor: Ilya Pollak
–Course: ECE 302
–Date: 05/04/2012
–sign the answer sheet
–fill in your last name and the first six letters of your first name
–fill in your student ID
–fill in your section number: 0001 if you are in the 3:30-4:20 section and 0002 if you
are in the 12:30-1:20 section
•You have 2 hours to complete 20 multiple-choice questions.
•Each correct answer is worth one point, for a total of 20 points.
•After the first student turns in his/her answer sheet and leaves, no one will be allowed to
temporarily leave the exam room and come back, unless it is an emergency.
•Please only turn in the answer sheets.
•There will be no partial credit.
•This document is double-sided.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Probability - Probability - Solved Exam and more Exams Probability and Statistics in PDF only on Docsity!

ECE 302

Prof. Ilya Pollak

Final Exam Solutions, 5/4/2012, 3:20-5:20pm in LILY 1105.

  • Your ID will be checked during the exam.
  • Please bring a No. 2 pencil to fill out the answer sheet.
  • This is a closed-book exam. No calculators are allowed. No electronic devices of any kind are allowed. A formula sheet is provided on the back of this page.
  • Please read the instructions on this page very carefully.
  • Please fill out the following information on your answer sheet:
    • Instructor: Ilya Pollak
    • Course: ECE 302
    • Date: 05/04/
    • sign the answer sheet
    • fill in your last name and the first six letters of your first name
    • fill in your student ID
    • fill in your section number: 0001 if you are in the 3:30-4:20 section and 0002 if you are in the 12:30-1:20 section
  • You have 2 hours to complete 20 multiple-choice questions.
  • Each correct answer is worth one point, for a total of 20 points.
  • After the first student turns in his/her answer sheet and leaves, no one will be allowed to temporarily leave the exam room and come back, unless it is an emergency.
  • Please only turn in the answer sheets.
  • There will be no partial credit.

• This document is double-sided.

Random variable PMF or PDF Mean Variance

Bernoulli p for k = 1; 1 − p for k = 0. p p(1 − p)

Discrete uniform (^) n^1 , k = k 0 + 1, k 0 + 2,... , k 0 + n k 0 + n+1 2 n

(^2) − 1 12 Geometric (1 − p)k−^1 p, k = 1, 2 , 3 ,... (^1) p p^12 − (^1) p

Binomial

n

k

 (1^ −^ p)n−kpk,^ k^ = 0,^1 ,... , n^ pn^ np(1^ −^ p)

Continuous uniform (^) b−^1 a , a ≤ x ≤ b b+ 2 a^ (b−a)

2 12 Shifted exponential λe−λ(x−α), x ≥ α λ−^1 + α λ−^2

Two-sided exponential

pλe−λx, x ≥ 0

(1 − p)λeλx, x < 0

(2p − 1)λ−^1 (1 + 4p − 4 p^2 )λ−^2

Erlang

λkxk−^1 e−λx (k − 1)! , x ≥ 0 kλ−^1 kλ−^2

Normal (Gaussian)

2 πσ

e−^

(x−μ)^2 2 σ^2 μ σ^2

Lognormal

x

2 πσ

e−^

(ln x−μ)^2 2 σ^2 , x > 0 eμ+σ^2 /^2 (eσ^2 − 1)e^2 μ+σ^2

Cauchy

πγ

[

x−x 0 γ

) 2 ]^ undefined^ undefined

Rayleigh

σ^2 xe−^

x^2 2 σ^2 , x ≥ 0 σ

√ (^) π 2

4 −π 2 σ

2

Pareto a c a xa+1^ ,^ x^ ≥^ c,^

ac a− 1 ,^ a >^1

ac^2 (a−1)^2 (a−2) ,^ a >^2

where (^) ( n k

n! (n − k)!k!

Therefore, the answer key for Question 1 is 8.

If the process goes directly from 0 to 1, it will never enter state 4. The probability of this is p 01 = 1/2. If the first transition is from zero to three, then it will never get to 4 under one of the following two scenarios: (i) if it stays at 3 forever—the probability of this is zero; (ii) if it will eventually go to 2. Since p 32 = p 34 , the conditional probability that the process will eventually go to 2 is equal to its conditional probability to go to 4—i.e., both probabilities are 1/2. Therefore, the probability to go from 0 to 3 and the eventually to 2 is (1/2)(1/2) = 1/4. The total probability that the process never enters state 4 is then 1/4 + p 01 = 3/4. Therefore, the answer key for Question 2 is 3.

Note that the process can only go from 0 to 1 or to 3. If it goes to 1, it will never get to 2. If it goes to 3, it will either eventually get to 2 or to 4, with equal conditional probabilities of 1/2 each. If from 3 the process eventually gets to 4, it will eventually get back to 0, with probability 1. Therefore, {never getting from 0 to 2} is equivalent to {{ 0 → 1 } or { 0 → 3, followed by eventually getting back to 0, followed by never getting from 0 to 2}}. Denoting by P the conditional probability to never get from 0 to 2 given that the process is at 0, we therefore have: P = 1/2 + (1/2) · (1/2) · P , or P = 2/3. The answer key for Question 3 is 4. Question 1 answer key: 8. Question 2 answer key: 3. Question 3 answer key: 4.

Questions 4–5. Consider a three-state Markov chain, with states 0, 1, and 2. The following one-step transition probabilities are given: p 10 = 1 − p, p 11 = 0, p 21 = 1, and p 01 = 1, where p is a real number such that 0 < p < 1.

Question 4. Given that the process is in state 2 immediately before the first transition, what is the probability that it is in state 0 after 2012 transitions?

Question 5. Let r 20 (n) be the n-step transition probability from state 2 to state 0. What is

nlim→∞ r^20 (n)?

For each of these two questions, choose the answer from among the following options (the two answers are not necessarily different!):

  1. 1
  2. p
  3. 1 − p
  4. p(1 − p)^2011
  5. p^2011 (1 − p)
  6. 1 + p + p^2 + ... + p^2011
  7. 1/ 2
  8. 0
  9. 1/ 4
  10. none of the above

(^1) p

1−p 0

2

1

1

Figure 2: Markov chain for Questions 4–5.

Solution. The Markov chain described in the statement of the problem is depicted in Fig. 2. It has a single recurrent class, and is periodic with period 2. From state 1, the process must go to the set of

Questions 6–7. Consider a two-state Markov chain, with states 1 and 2. The following one-step transition probabilities are given: p 12 = p 22 = 1/3.

Question 6. Given that the process is in state 1 immediately before the first transition, what is the probability that it is in state 1 after 5 transitions?

Question 7. Let r 22 (n) be the n-step transition probability from state 2 to state 2. What is lim n→∞ r 22 (n)?

For each of these two questions, choose the answer from among the following options (the two answers are not necessarily different!):

  1. 0
  2. 1/
  3. 1/
  4. 1/
  5. 1/
  6. 2/
  7. (1/3)^5
  8. (2/3)^5
  9. the answer cannot be determined based on the given information
  10. none of the above

Solution. Note that the Chapman-Kolmogorov equations,

r 11 (n) = r 11 (n − 1)p 11 + r 12 (n − 1)p 21 , r 12 (n) = r 11 (n − 1)p 12 + r 12 (n − 1)p 22 , r 22 (n) = r 22 (n − 1)p 22 + r 21 (n − 1)p 12 , r 21 (n) = r 22 (n − 1)p 21 + r 21 (n − 1)p 11 ,

are all satisfied by r 11 (n) = r 21 (n) = 2/3 and r 12 (n) = r 22 (n) = 1/3 for all positive integer n. Therefore, the process in steady state after the first step, and r 11 (5) = 2/3, and the steady-state probability for state 2 is 1/3.

Question 6 answer key: 6. Question 7 answer key: 4.

Question 8. In a communication channel, each transmitted symbol is a random variable which

can assume four values, a 1 , a 2 , a 3 , and a 4 , with the following probabilities: P (a 1 ) = P (a 4 ) =

and

P (a 2 ) = P (a 3 ) =

. Consider the following five codes for this random variable.

a 1 a 2 a 3 a 4 001 010 011 100

  • Code (A)

a 1 a 2 a 3 a 4 01 10 11 10

  • Code (B)

a 1 a 2 a 3 a 4 00 010 011 1

  • Code (C)

a 1 a 2 a 3 a 4 0 100 101 11

  • Code (D)

a 1 a 2 a 3 a 4 11 100 10 0

  • Code (E)

Which of these codes are optimal (in the sense of minimizing the expected codeword length) uniquely decodable codes?

  1. Only (A).
  2. Only (B)
  3. Only (E).
  4. Only (A) and (B).
  5. Only (B) and (C).
  6. Only (C) and (D).
  7. Only (D) and (E).
  8. Only (C), (D), and (E).
  9. None of these five codes are optimal uniquely decodable codes.
  10. None of the above.

Solution. Codes (C) and (D) are both Huffman codes and hence are optimal and uniquely decodable. Their expected codeword length is (3/8) · (1 + 2) + 2 · (1/8) · 3 = 15/8. Codes (A) and (B) are fixed- length codes with expected codeword lengths 3 and 2, respectively. They are not optimal since both 3 and 2 are larger than 15/8. Code (E) has a smaller expected codeword length than (C) and (D) but is not uniquely decodable, since “100” could mean either a 2 or a 3 a 4. Answer key: 6.

Question 11. X is a binomial random variable with parameters 0.5 and 4, and C is an optimal uniquely decodable code for X. (Optimal here means that C minimizes the expected codeword length among all the uniquely decodable codes for X.) Find the expected codeword length for C.

  1. 21/ 8 − (3/8) log 2 3
  2. 29/ 8 − (3/8) log 2 3
  3. 5/
  4. 9/
  5. 17/
  6. None of the above

Solution. The possible values for X are 0, 1, 2, 3, and 4, with respective probabilities 1/16, 4/16, 6/16, 4/16, and 1/16. Recursively combining two least likely symbols yields the following Huffman tree (internal nodes are marked with x’s, and corresponding probabilities are in brackets):

[2/16] [6/16] [10/16]

0 -------- x -------- x-------- x -------- x / / / / / / / / 4 1 3 2

The resulting Huffman code is: 0000 for 0, 001 for 1, 1 for 2, 01 for 3, and 0001 for 4. Its expected codeword length is 4(1/16) + 3(4/16) + 6/16 + 2(4/16) + 4(1/16) = 34/16 = 17/8. Note that there are other Huffman trees resulting in other Huffman codes, for example, { 000 , 01 , 10 , 11 , 001 }, but they all have the same expected codeword length. Answer key: 9.

Question 12. Let X 1 , X 2 ,... be a sequence of discrete independent, identically distributed random variables with mean E [Xi] = 0 and variance var(Xi) = 1 for all positive integer i. Further, let

Yn =

n

∑^ n

i=

Xi for all positive integer n. Consider the following inequality:

P (|Yn| ≥ 1) > 0. 01.

Only one of the following statements is correct. Select the correct statement.

  1. The inequality is satisfied for n = 100.
  2. The inequality is satisfied for all integer n such that n ≥ 200.
  3. The inequality is satisfied for all integer n such that n ≥ 100.
  4. The inequality is satisfied for all positive integer n such that n < 200.
  5. The inequality is satisfied for all integer n such that 1 ≤ n ≤ 100.
  6. The inequality is satisfied for all integer n such that 10 ≤ n ≤ 100.
  7. The inequality is satisfied for all integer n such that 90 ≤ n ≤ 100.
  8. The inequality is satisfied for all positive integer n such that n ≤ 1000.
  9. The inequality cannot be satisfied for any positive integer n.
  10. None of the above.

Solution. Note that E[Yn] = 0, and var(Yn) = 1/n. Using Chebyshev’s inequality for random variable

Yn and choosing c = 1 we get P (|Yn − 0 | ≥ 1) ≤

n

. Therefore, the inequality

P (|Yn| ≥ 1) > 0. 01

is violated for any n ≥ 100. Options 1-8 all include cases n ≥ 100 and therefore are false. Option 9 is also false. To show this, we need one example of X 1 , X 2 ,... , Xn and n such that the given inequality is satisfied. Let X 1 be a discrete random variable such that pX 1 (1) = pX 1 (−1) = 1/2. Then E[X 1 ] = 0 and var(X 1 ) = E[X 12 ] = 1^2 · (1/2) + (−1)^2 · (1/2) = 1. For n = 1, we have Yn = X 1 , and P(|Yn| ≥ 1) = P(|X 1 | ≥ 1) = 1 > 0 .01. So options 1-9 are all false, and therefore option 10 is true. Answer key: 10.

Question 14. For any integer n ≥ 2, Xn is a Bernoulli random variable with parameter p = 1/n. Random variables X 2 , X 3 ,... are independent. For any integer n ≥ 2, random variable Yn is defined as Yn = nXn. Consider the following four statements.

A. There exists a real number a such that lim n→∞ E[(Yn − a)^2 ] = 0.

B. There exists a real number b such that lim n→∞ E[Yn] = b.

C. There exists a real number c such that the sequence Y 2 , Y 3 ,... converges to c in probability.

D. There exists a real number d such that the sequence Y 2 , Y 3 ,... converges to d with probability 1.

Select one of the following.

  1. A, B, C, and D are all false.
  2. A is true; B, C, and D are false.
  3. B is true; A, C, and D are false.
  4. C is true; A, B, and D are false.
  5. D is true; A, B, and C are false.
  6. A and B are true; C and D are false.
  7. A and C are true; B and D are false.
  8. B and C are true; A and D are false.
  9. B and D are true; A and C are false.
  10. A, B, C, and D are all true.

Solution. Since E[Xn] = E[X n^2 ] = 1/n, we have that E[Yn] = 1 and E[Y (^) n^2 ] = n^2 E[X n^2 ] = n. Therefore, B is correct, with b = 1. For A, we have that

E[(Yn − a)^2 ] = E[Y (^) n^2 ] − 2 aE[Yn] + a^2 = n − 2 a + a^2.

This diverges for any a, and therefore A is false.

To show convergence in probability, note that, for any ε > 0, we have P(|Yn| ≥ ε) ≤ 1 /n → 0. Therefore, the sequence converges to zero in probability, and C is true with c = 0.

Since the n-th term of the sequence is either 0 or n, the only value that the sequence could potentially converge to with probability 1 is zero. In order for this convergence to take place, the following event would have to have probability 1: that, starting with some index k, all the terms in the sequence are zero. It was shown in class that this is not the case. Therefore, the sequence does not converge with probability 1, and D is false.

So, A and D are false, and B and C are true. Answer key: 8.

Question 15. The probability density function of random variable Xi, for any positive integer i, is

fXi (x) =

x if 1^ ≤^ x^ ≤^ e 0 otherwise

Random variables X 1 , X 2 ,... are independent. Let Yn = (X 1 · X 2 ·... · Xn)^1 /n, for any positive integer n. Does the sequence Y 1 , Y 2 ,... converge with probability 1? If so, select one of the answer keys 1–8; otherwise, select answer key 9. If there is not enough information provided to either decide whether the sequence converges with probability 1 or to determine the limit, select answer key 10.

  1. Yn → 1 with probability 1.
  2. Yn → e^0.^5 with probability 1.
  3. Yn → e^2 with probability 1.
  4. Yn → e−^1 with probability 1.
  5. Yn → e with probability 1.
  6. Yn → 0 with probability 1.
  7. Yn → − ln(2) with probability 1.
  8. The limit exists, but it is not listed in the answer keys 1–7.
  9. The limit does not exist.
  10. The given information is not enough to determine the solution.

Solution. In order to use any of the limit theorems we considered in the course, we would need to tie Yn’s to sums of independent random variables rather than products. We can convert a product into a sum by using logarithms:

ln Yn =

n

∑^ n

i=

ln Xi.

Therefore, ln Yn is the sample mean of ln X 1 ,... , ln Xn. Since X 1 ,... , Xn are independent and identi- cally distributed, so are ln X 1 ,... , ln Xn. In order to be able to use the strong law of large numbers, we would have to find the expectation of ln Xi and show that the variance of ln Xi is finite. First, let’s calculate the expectation, using the change of variable u = ln x:

E [ln Xi] =

∫ (^) e

1

ln x

x

dx =

0

udu = u^2 2

1

0

Using the same change of variable, we have:

E

[

(ln Xi)^2

]

∫ (^) e

1

(ln x)^2

x

dx =

0

u^2 du = u^3 3

1

0

Question 16. This question deals with the same random variables as the previous question, but a different concept of convergence. The probability density function of random variable Xi, for any positive integer i, is

fXi (x) =

1 x if 1^ ≤^ x^ ≤^ e 0 otherwise

Random variables X 1 , X 2 ,... are independent. Let Yn = (X 1 · X 2 ·... · Xn)^1 /n, for any positive integer n. Does the sequence Y 1 , Y 2 ,... converge in probability? If so, select one of the answer keys 1–8; otherwise, select answer key 9. If there is not enough information provided to either decide whether the sequence converges in probability or to determine the limit, select answer key 10.

  1. Yn → 1 in probability.
  2. Yn → e^0.^5 in probability.
  3. Yn → e^2 in probability.
  4. Yn → e−^1 in probability.
  5. Yn → e in probability.
  6. Yn → 0 in probability.
  7. Yn → − ln(2) in probability.
  8. The limit exists, but it is not listed in the answer keys 1–7.
  9. The limit does not exist.
  10. The given information is not enough to determine the solution.

Solution. It was shown in the previous question that this sequence converges to e^0.^5 with probability

  1. This implies that it also converges to e^0.^5 in probability. Answer key: 2.

Question 17. Continuous random variables X and Y have the following joint PDF:

fX,Y (x, y) =

1 / 4 if |x| + |y| ≤

0 otherwise.

A two-bit vector quantizer is used to jointly quantize X and Y , to obtain discrete random variables Xˆ and Yˆ. The quantizer is specified by four quantization sets in the plane, A 1 , A 2 , A 3 , and A 4 , and four quantization points (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), and (x 4 , y 4 ), such that the output of the quantizer is ( X,ˆ Yˆ ) = (xi, yi) if (X, Y ) ∈ Ai, for i = 1, 2 , 3 , 4.

Among the following ten numbers, choose the smallest realizable mean-square error for such a two-bit quantizer. (For example, if two-bit quantizers can be constructed to achieve mean-square errors in keys 6-10 and cannot be constructed to achieve mean-square errors in keys 1-5, then your answer should be key 6. In other words, you must find the lowest possible mean-square error among the ten answer keys given to you. This is not necessarily the same as finding the lowest mean-square error among all possible quantizers.) The mean-square error is defined as E[(X − Xˆ)^2 + (Y − Yˆ )^2 ].

Solution. Let S′^ be a square centered at the origin with side length 2, and whose sides are parallel to the coordinate axes. Let random variables X′^ and Y ′^ be jointly uniform over this square. Suppose that both X′^ and Y ′^ are quantized using scalar one-bit uniform quantizers. Then the quantization bins are [− 1 , 0] and [0, 1] and the corresponding quantization levels are − 0 .5 and 0.5, for each of these two random variables. The overall mean-square error for this joint quantization strategy is

E[(X′^ − Xˆ′)^2 + (Y ′^ − Yˆ ′)^2 ] = 2 E[(X′^ − Xˆ′)^2 ]

= 2

− 1

(x′^ + 0.5)^2 fX′ (x′) dx′^ +

0

(x′^ − 0 .5)^2 fX′ (x′) dx′

0

(x′^ − 0 .5)^2 dx′

Question 18. Find the mean-square error of the one-bit Lloyd-Max quantizer for a two-sided exponen- tial random variable with parameters p = 1/2 and λ = 1/3. (One-bit quantizer has two quantization levels.) You can use the fact that the solution to the Lloyd-Max quantizer equations is unique for this problem.

  1. None of the above

Solution. Denote the random variable by X. Because of symmetry, we guess x = 0 to be the threshold for the Lloyd-Max quantizer. Then, in order to satisfy the Lloyd-Max quantizer equations derived in class, the two quantization levels must be the conditional means E[X|X ≥ 0] and E[X|X ≤ 0]. The conditional density of X given X ≥ 0 is exponential with parameter λ, and hence the conditional mean is E[X|X ≥ 0] = λ−^1. The conditional density of −X given X ≤ 0 is exponential with parameter λ, and hence the conditional mean is E[X|X ≥ 0] = −λ−^1. Note that all the Lloyd-Max quantizer equations are satisfied, because the quantization threshold x = 0 is the average of the two quantization levels.

Because of symmetry, the MSE over the entire real line is equal to twice the MSE over one of the two quantization intervals:

MSE = 2

0

(x − λ−^1 )^2 fX (x) dx.

This is the variance of an exponential random variable with parameter λ, and is therefore equal to λ−^2. For λ = 1/3, this is 9. Answer key: 9.

If we weren’t told that the solution is unique, we would need to verify this—i.e., that x = 0 is the only possible solution for the Lloyd-Max quantizer. Suppose that this is not the case, and suppose that x > 0. (The case x ≤ 0 is handled similarly.) Then, based on what we know about shifted exponential random variables, E[X|X ≥ x] = x + λ−^1. Recall that, according to the quantizer equations derived in class,

1 2 (E[X|X ≥ x] + E[X|X ≤ x]) = x,

and therefore we must have E[X|X ≤ x] = x − λ−^1. Denote

P(X ≥ x) = 0. 5 e−λx^ = q(x).

Note that E[X] = 0, but, on the other hand, using the total expectation theorem,

0 = E[X] = P(X ≤ x)E[X|X ≤ x] + P(X ≥ x)E[X|X ≥ x] = (1 − q(x))(x − λ−^1 ) + q(x)(x + λ−^1 ) = x − 1 −^2 λq(x)

= x − 1 −^ e

−λx λ.

But this equation does not have any positive roots. To see this, note that the lines y 1 (x) = x and y 2 (x) = λ−^1 (1 − e−λx) touch at zero (since y 1 (0) = y 2 (0) = 0 and y 1 ′(0) = y 2 ′(0) = 1), and that y′ 2 (x) < 1 for x > 0 which means that these two lines never intersect for x > 0.

Therefore, the unique Lloyd-Max quantizer is the one described above—i.e., with threshold 0, quantization levels ±3, and MSE 9.