ece 302 prof. ilya pollak exam 3 solutions, …...ece 302 prof. ilya pollak exam 3 solutions,...

14
ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. 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: 04/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

Upload: others

Post on 11-Jul-2020

12 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

ECE 302Prof. Ilya Pollak

Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129.

• 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 areallowed. 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: 04/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 youare 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 totemporarily 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

Page 2: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Some random variables and their distributions:

Random variable PMF or PDF Mean Variance

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

Discrete uniform 1n , k = k0 + 1, k0 + 2, . . . , k0 + n k0 + n+1

2n2−1

12

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

1p2 − 1

p

Binomial

n

k

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

Continuous uniform 1b−a , a ≤ x ≤ b b+a

2(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− 4p2)λ−2

Erlangλkxk−1e−λx

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

Normal (Gaussian)1√2πσ

e−(x−µ)2

2σ2 µ σ2

Lognormal1

x√

2πσe−

(ln x−µ)2

2σ2 , x > 0 eµ+σ2/2 (eσ2 − 1)e2µ+σ2

Cauchy1

πγ

[1 +

(x−x0

γ

)2] undefined undefined

Rayleigh1σ2

xe−x2

2σ2 , x ≥ 0 σ√

π2

4−π2 σ2

Pareto a ca

xa+1 , x ≥ c, aca−1 , a > 1 ac2

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

where (nk

)=

n!(n− k)!k!

.

Some counting tools:

Number of k-permutations out of n objects:n!

(n− k)!.

Number of subsets of an n-element set: 2n.Number of k-element subsets of an n-element set:

n!(n− k)!k!

.

Number of ways to divide n items into r groups so that the i-th group has ni items:n!

n1!n2! · . . . · nr!.

2

Page 3: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Question 1. Continuous random variables X and Y have the following joint probability densityfunction:

fX,Y (x, y) ={

1/4, for all points (x, y) such that −c ≤ x ≤ c and −c ≤ y ≤ c0, everywhere else

Here, c is a positive number. Find c.

1. 0

2. 1/4

3. 1/2

4. 3/4

5. 1

6. 3/2

7. 2

8. 3

9. c cannot be determined based on the given information

10. none of the above

Solution. It is given that X and Y are jointly uniform over a 2c× 2c square. The probability of theentire square is (2c)2/4 = c2 and must be equal to one. Since it is given that c is positive, it followsthat c = 1.Answer key: 5.

3

Page 4: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Questions 2–8. Continuous random variables X and Y have the following joint probability densityfunction:

fX,Y (x, y) ={

1/4, for all points (x, y) such that 1 ≤ x ≤ 2 and 1 ≤ y ≤ 50, everywhere else

Let fX , fY , fX|Y , and fY |X be, respectively, the marginal PDF of X, the marginal PDF of Y , theconditional PDF of X given Y , and the conditional PDF of Y given X.

Question 2. Find fX(1.5).Question 3. Find fY (2).Question 4. Find fX|Y (1.5|2).Question 5. Find fY |X(2|1.5).Question 6. Find E[XY ]/9.Question 7. Find the correlation coefficient of X and Y .Question 8. Let A be the event that Y ≤ X. Find 0.3E[X|A].

For each of the Questions 2–8, choose the answer from among the following options (the seven answersare not necessarily all different!):

1. 0

2. 1/4

3. 1/2

4. 3/4

5. 1

6. 5/4

7. 3/2

8. 7/4

9. impossible to determine based on the given information

10. none of the above

Solution.Question 2. X is uniform between 1 and 2, and therefore fX(1.5) = 1.Answer key: 5.

Question 3. Y is uniform between 1 and 5, and therefore fY (2) = 1/4.Answer key: 2.

Question 4. Note that X and Y are independent, since their joint density is the product of themarginals. Therefore, the conditional density of X given Y , wherever it exists, is equal to the marginal

4

Page 5: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

of X. Therefore, fX|Y (1.5|2) = 1.Answer key: 5.

Question 5. Since X and Y are independent, the conditional density of Y given X, wherever itexists, is equal to the marginal of Y . Therefore, fY |X(2|1.5) = 1/4.Answer key: 2.

Question 6. Using the fact that X is uniform between 1 and 2 and that Y is uniform between 1and 5, we have: E[X] = 1.5 and E[Y ] = 3. Since X and Y are independent, the expectation of theirproduct is equal to the product of expectations: E[XY ] = E[X]E[Y ] = 1.5 · 3 = 4.5. Therefore,E[XY ]/9 = 1/2.Answer key: 3.

Question 7. Since X and Y are independent, they are uncorrelated. Therefore, their correlationcoefficient is zero.Answer key: 1.

Question 8. Event A is a triangle given by 1 ≤ y ≤ x ≤ 2. The PDF of X and Y conditioned onthis event is therefore uniform over this triangle. Since the area of the triangle is 1/2, the conditionalPDF is:

fX,Y |A(x, y) ={

2, 1 ≤ y ≤ x ≤ 20, otherwise

We therefore have:

E[X|A] =∫ ∞

−∞

∫ ∞

−∞xfX,Y |A(x, y)dxdy

=∫ 2

1

∫ x

12xdydx =

∫ 2

12x(x− 1)dx =

∫ 2

1(2x2 − 2x)dx

=2x3

3

∣∣∣∣21

− x2∣∣21

=16− 2

3− (4− 1)

= 5/3.

Therefore, 0.3E[X|A] = 1/2.Answer key: 3.

5

Page 6: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Questions 9–11. X is a random variable with the following CDF:

FX(x) =

0 for x ≤ 0,x2 for 0 < x < 1,1 x ≥ 1.

Question 9. Find P(X = 0.5).Question 10. Find P(0.2 ≤ X ≤ 0.8).Question 11. Find fX(0.1).

For each of the Questions 9–11, choose the answer from among the following options (the three answersare not necessarily all different!):

1. 0.1

2. 0.2

3. 0.3

4. 0.4

5. 0.5

6. 0.6

7. 0

8. 1

9. impossible to determine based on the given information

10. none of the above

Solution.Question 9. Since FX is continuous, X is a continuous random variable, and therefore P(X = 0.5) =0.Answer key: 7.

Question 10. P(0.2 ≤ X ≤ 0.8) = FX(0.8)− FX(0.2) = 0.64− 0.04 = 0.6.Answer key: 6.

Question 11. fX(x) =(x2

)′ = 2x, for any x between 0 and 1. Therefore, fX(0.1) = 2 · 0.1 = 0.2.Answer key: 2.

6

Page 7: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Questions 12–17. X is a continuous random variable with the following PDF:

fX(x) ={|x| for − 1 ≤ x ≤ 10 for |x| > 1.

Question 12. Find E[X].Question 13. Find E[X2].Question 14. Find E[X3].Question 15. Find var(X).Question 16. Find E[X| − 0.5 ≤ X ≤ 0.5].Question 17. Find FX(0) where FX is the CDF of X.

For each of the Questions 12–17, choose the answer from among the following options (the six answersare not necessarily all different!):

1. −1/2

2. −1/4

3. 0

4. 1/4

5. 1/3

6. 1/2

7. 3/4

8. 1

9. impossible to determine based on the given information

10. none of the above

Solution.Question 12. Since fX is an even function and x is an odd function, the product xfX is an oddfunction, and therefore its integral is zero: E[X] = 0.Answer key: 3.

Question 13. E[X2] = 2∫ 10 x3dx = 2(1/4)x4

∣∣10

= 1/2.Answer key: 6.

Question 14. Since fX is an even function and x3 is an odd function, the product x3fX is an oddfunction, and therefore its integral is zero: E[X3] = 0.Answer key: 3.

7

Page 8: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Question 15. Since the mean of X is zero, its variance is the same as the second moment: var(X) =E[X2] = 1/2.Answer key: 6.

Question 16. The conditional PDF of X given −0.5 ≤ X ≤ 0.5 is nonzero only on the interval[−0.5, 0.5]. On this interval, it is proportional to fX . Therefore, it is even. Therefore, xfX|−0.5≤X≤0.5

is odd, and its integral is zero : E[X| − 0.5 ≤ X ≤ 0.5] = 0.Answer key: 3.

Question 17. Since fX is even, its integral from −∞ to zero is the same as the integral from zero to∞. Therefore, P(X ≤ 0) = P(X ≥ 0) = 1/2. Therefore, FX(0) = P(X ≤ 0) = 1/2.Answer key: 6.

8

Page 9: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Question 18. X is the same continuous random variable as in Questions 12–17, i.e., its PDF is

fX(x) ={|x| for − 1 ≤ x ≤ 10 for |x| > 1.

Find the conditional PDF fX|−0.5≤X≤0.5(x).

1.

fX|−0.5≤X≤0.5(x) ={|x| for − 1 ≤ x ≤ 10 for |x| > 1.

2.

fX|−0.5≤X≤0.5(x) ={|x| for − 0.5 ≤ x ≤ 0.50 for |x| > 0.5.

3.

fX|−0.5≤X≤0.5(x) ={|x| for − 0.5 ≤ x ≤ 0.5undefined for |x| > 0.5.

4.

fX|−0.5≤X≤0.5(x) ={

4|x| for − 0.5 ≤ x ≤ 0.50 for |x| > 0.5.

5.

fX|−0.5≤X≤0.5(x) ={

4|x| for − 0.5 ≤ x ≤ 0.5undefined for |x| > 0.5.

6.

fX|−0.5≤X≤0.5(x) ={

1 for − 0.5 ≤ x ≤ 0.50 for |x| > 0.5.

7.

fX|−0.5≤X≤0.5(x) ={

1 for − 0.5 ≤ x ≤ 0.5undefined for |x| > 0.5.

8.

fX|−0.5≤X≤0.5(x) ={

1/2 for − 1 ≤ x ≤ 10 for |x| > 1.

9. fX|−0.5≤X≤0.5 is impossible to determine based on the given information.

10. None of the above.

Solution. The conditional PDF of X given −0.5 ≤ X ≤ 0.5 is nonzero only on the interval [−0.5, 0.5]and zero outside of this interval. On this interval, it is proportional to fX , i.e., is equal to c|X| wherethe constant c needs to be such that the conditional density integrates to 1. Therefore, c = 4.Answer key: 4.

9

Page 10: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Question 19. X and Y are both exponential random variables with parameter λ > 0. X and Y areindependent. Random variable V is defined as V = X − Y . Find fV (v), the PDF of V .

1.

fV (v) ={

λe−λv for v ≥ 00 for v < 0

2.

fV (v) ={

λeλv for v ≤ 00 for v > 0

3.

fV (v) ={

2λe−2λv for v ≥ 00 for v < 0

4.

fV (v) ={

2λe2λv for v ≤ 00 for v > 0

5. fV (v) = λe−λ|v| for all real v.

6. fV (v) = 0.5λe−λ|v| for all real v.

7. fV (v) = 2λe−λ|v| for all real v.

8. fV (v) = 2λe−2λ|v| for all real v.

9. It is impossible to determine fV from the given information.

10. None of the above.

Solution. Setting Z = −Y , we have: V = X + Z. Since X and Y are independent, so are X and Z.Therefore, the PDF of V is the convolution of the PDFs of X and Z,

fV (v) =∫ ∞

−∞fX(t)fZ(v − t) dt.

We are going to solve this problem for the case when X and Y are exponential random variables withpossibly different parameters λ1 and λ2, respectively. The PDF of X,

fX(t) ={

λ1e−λ1t for t ≥ 0,

0 for t < 0,

is shown in Fig. 1(a). The PDF of Y has the same form. Therefore, the PDF of Z is

fZ(t) ={

λ2eλ2t for t ≤ 0,

0 for t > 0,

10

Page 11: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

(a) (b)

(c) (d)

Figure 1: Illustrations to Question 19: (a) PDF of X; (b) PDF of Z = −Y ; (c,d) flipped and shiftedversions of the PDF of Z, for two different shifts.

It is shown in Fig. 1(b). Its flipped and shifted version, fZ(v − t), is shown as a function of t inFig. 1(c) for v < 0 and in Fig. 1(d) for v > 0. We therefore have, for v ≤ 0,

fV (v) =∫ ∞

−∞fX(t)fZ(v − t) dt =

∫ ∞

0λ1e

−λ1tλ2eλ2(v−t) dt

= λ1λ2eλ2v

∫ ∞

0e−(λ1+λ2)t dt = −λ1λ2e

λ2v

λ1 + λ2e−(λ1+λ2)t

∣∣∣∣∞0

=λ1λ2e

λ2v

λ1 + λ2

=λ1

λ1 + λ2fZ(v).

For v ≥ 0, we have:

fV (v) =∫ ∞

−∞fX(t)fZ(v − t) dt =

∫ ∞

vλ1e

−λ1tλ2eλ2(v−t) dt

= λ1λ2eλ2v

∫ ∞

ve−(λ1+λ2)t dt = −λ1λ2e

λ2v

λ1 + λ2e−(λ1+λ2)t

∣∣∣∣∞v

=λ1λ2e

λ2v

λ1 + λ2e−(λ1+λ2)v

11

Page 12: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

=λ1λ2e

−λ1v

λ1 + λ2

=λ2

λ1 + λ2fX(v).

Therefore,

fV (v) =

λ1λ2e

λ2v

λ1 + λ2for v ≤ 0,

λ1λ2e−λ1v

λ1 + λ2for v ≥ 0.

When λ1 = λ2 = λ as in the statement of the question,

fV (v) =λ

2e−λ|v|.

Answer key: 6.

12

Page 13: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

Figure 2: Constructing curve A in Question 20, in four steps.

Question 20. Let A be the set of all points (x, y) in the plane such that |x−y|+ |x+y| = 6. Note thatA is a closed curve. Let R be a random point on A, uniformly distributed over this curve. This meansthat, for any segment S ⊂ A of length L, the probability that R is on this segment is L/LA where LA

is the length of A. Let XR and YR be the x- and y-coordinates of R. Find P(|XR|+ |YR| ≤ 4).

1. 1/5

2. 1/4

3. 1/3

4. 1/2

5. 2/3

6. 3/4

7. 4/5

8. 0

9. 1

10. none of the above

13

Page 14: ECE 302 Prof. Ilya Pollak Exam 3 Solutions, …...ECE 302 Prof. Ilya Pollak Exam 3 Solutions, 4/4/2012, 8-10pm in EE 129. • Your ID will be checked during the exam. • Please bring

(a) (b)

(c)

Figure 3: (a) Curve A in Question 20. (b) The set |x|+ |y| ≤ 4. (c) Curve A and the set |x|+ |y| ≤ 4.The parts of A that satisfy |x|+ |y| ≤ 4 are the four thick segments.

Solution. Curve A is the square with vertices (3, 3), (3,−3), (−3,−3), and (−3, 3). The processof constructing this curve is shown in Fig. 2. The curve itself is shown in Fig. 3(a). By a similarreasoning, it can be shown that the set of all points (x, y) satisfying |x| + |y| ≤ 4 is the gray squarein Fig. 3(b). Therefore, P(|XR|+ |YR| ≤ 4) is the proportion of the curve A that lies inside the graysquare depicted in Fig. 3(b). Both A and the gray square are shown together in Fig. 3(c). The partsof A that lie inside the gray square are shown as thick segments. The total length of these lines is 8.The length of A is 24. Therefore, P(|XR|+ |YR| ≤ 4) = 8/24 = 1/3.Answer key: 3.

14