ECE 2 Solution to Assignment 5 March 7, 27 1 ECE 2 Solution to Homework Assignment 5 Note: To obtain credit for an answer, you must provide adequate justification. Also, if it is possible to obtain a numeric answer, you should not only find an expression for the answer, but also solve for the numeric answer. 1. Consider a signal whose value is given by the random variable V. Suppose that V is uniform on the interval [ 5, 1]. Suppose further that V is passed through a circuit whose output is zero if its input is less than, whose output saturates at 1 when its input exceeds 5, and for inputs between and 5 has a gain of two. Let W be the random variable representing the output of this circuit. Assume that the units of both V and W are volts. (a) Find the CDF of W. To obtain the CDF of W, we will need the CDF of V. We are given that V has a uniform distribution on [ 5, 1] so we have f V (v) { 1/15 v [ 5, 1] otherwise, (1) F V (v) { v f Y (y)dy v [ 5, 1] otherwise, (2) v 5 f Y (y)dy (v ( 5))/15, () { (v + 5)/15 v [ 5, 1] F V (v) (4) otherwise. Next, we consider F W (w). F W (w) for any w < (because the minimum value that the random variable W takes is ). The maximum value that the random variable W takes is 1, so P [W 1] F W (1) 1. Now for values of V between and 5, W 2V. Thus for values of V [, 5], F W (w) P (W w) P [2V w] P [V w/2] F V (w/2) (w + 1)/. Finally, F W () P [W ] P [W ] P [V ] ( + 5)/15 1/. Thus, putting all of the pieces together we have w < F W (w) (w + 1)/ w 1 1 w 1. Note that lim F t 1 W (w) 2/ whereas F W (1) 1 so the CDF has a jump at w 1. Thus, there must be an impulse function in the PDF so W is a mixed random variable. (5)
ECE 2 Solution to Assignment 5 March 7, 27 2 (b) Find the PDF of W. The PDF is obtained by taking the derivative of the CDF with respect to w, paying attention to any jumps. Thus f W (w) (c) Find the expected value of W. w < 1/ w 1/ < w < 1 1/ w 1 w > 1. (6) E[W ] 1 wf W (w)dw ( 1 w δ(w) + 1 + 1 ) δ(w 1) dw ( 1 2 2 ) 1 + 1 1 2 5/ + 1/ 5. (d) Find the variance of W. Var[W ] (w 5) 2 f W (w)dw 1 ( w 2 1w + 25 ) ( 1 δ(w) + 1 + 1 ) δ(w 1) dw ( ( ) ) 1 1 2 ( + 25)(1/) + 1 + 25(1) (1/) 2 + ( 1 2 1 2 + 25 ) (1/) 25/ + 25/9 + 25/ 175/9.
ECE 2 Solution to Assignment 5 March 7, 27 2. Consider the signal V from above and feed it through a threshold detector which has output 5 volts if V > 5 and volts otherwise. Let X be the random variable representing the output of this threshold detection circuit. Assume that the units of both V and X are volts. (a) Find the CDF of X. For V 5, W and for V > 5, W 5. Thus, integrating f V (v) over the appropriate ranges we obtain P [{X }] 2/ and P [{X 5}] 1/ so x < F X (x) 2/ x < 5 (7) 1 5 x (b) Find the PDF of X. f X (x) (2/)δ(x) + (1/)δ(x 5) (8) (c) Find the expected value of X. E[X] xf X (x)dx (2/) + (1/)5 5/ (9) (d) Find the expected value of V. E[V ] 1 vf V (v)dv (1/15) vdv (1 2 ( 5) 2 )/ 75/ 5/2 5 Note that this is exactly what we would expect for a uniform random variable on the range [ 5, 1].
ECE 2 Solution to Assignment 5 March 7, 27 4. Consider signal-to-noise ratio γ in an optical fiber. Suppose that the probability of a bit-error is given by Q( γ/2). (See Definition.11, page 122 for the definition of the function Q). (a) Find the lowest signal-to-noise ratio (SNR) that still yields a bit-error rate (BER) no larger than 1 4. Consulting the table on p.12, we see that this table does not give us the value of z for Φ(z) 1 1 4.9999 so we will need to use the table on p.124 instead. This indicates that Q(z) < 1 4 if z.72. Accordingly, an SNR of at least γ 2(.72 2 ) > 27.67 will suffice. (z γ/2 if z 2 γ/2.) (b) Find the lowest signal-to-noise ratio that still yields a bit-error rate (BER) no larger than 1 5. Consulting the table on p.124, we see that an SNR of γ 2(4.27 2 ) > 6.47 will suffice. (c) Find the lowest signal-to-noise ratio that still yields a bit-error rate (BER) no larger than 1 6. Consulting the table on p.124, we see that an SNR of γ 2(4.76 2 ) > 45.1 will suffice. (d) If the SNR is 5 1 5, what is the corresponding BER? If γ 5 1 5, then z γ/2 2.5 1 5.5 Consulting the table on p.12, we see that Φ(.5).52 so Q(z) 1 Φ(z).498. In other words, at 5 1 5, the SNR is so low that the probability of an error is almost 5%. We are barely better off than if we just flipped a coin and guessed what value had been sent.
ECE 2 Solution to Assignment 5 March 7, 27 5 4. Consider the time between calls at a rural telephone switch. Model the length of this time interval as an exponential random variable T with expected value 2 seconds. (a) What is the expected value of T given that T > seconds? Define the event B {T > }. Then note that the expected value of an exponential random variable is 1/λ so here λ 1/2. Then using the definition of conditional expected value of a continuous random variable (D.16, p. 19), we have E[T B] tf T B (t)dt, (1) where the definition of the conditional PDF (D.15, p. 17) is f T B (t) { ft (t) P [B] t B otherwise. (11) Now P [B] f T (t) 1 2 e t/2 dt e t/2 ( e /2 ) e /2 (12) so ( t E[T B] e /2 tf T (t)dt e /2 e 2) t/2 dt ( e /2 te t/2 ) e t/2 dt e /2 (e /2 + 2e /2 ) 5. (b) What is the variance of T given that T > seconds? Using the definition of the expression for the conditional variance (p. 14), we find Var[T B] E[T 2 B] (E[T B]) 2 E[T 2 B] 25. Thus, applying integration by parts twice, we obtain Var[T B] 4. I checked my answers as follows using maple. > int((exp(-t/2))/2,t..infinity);
ECE 2 Solution to Assignment 5 March 7, 27 6 e ( 2 ) > int((exp(-t/2))/2,t..infinity)/exp(-/2); > int((t-5)^2(exp(-t/2))/2,t..infinity)/exp(-/2); (c) What is f T T >s (t)? 5 4 From part (a) f T B (t) { ft (t) P [B] t B otherwise { 1 2 e/2 e t/2 t B otherwise (d) What is the CDF of T given that T > seconds. F T B (t) { 1 2 e/2 t e s/2 ds t B otherwise e /2 ( e s/2 ) t t B otherwise { ( e /2 e t/2 e /2) t B otherwise
ECE 2 Solution to Assignment 5 March 7, 27 7 5. Suppose that you wish to call friends to ask them to meet you at the student center one half hour from now. Suppose further that over the past year you have timed all such conversations with these particular friends and found that the length of the call, if answered, can be modelled as a random variable having an exponential distribution. Your friends, being somewhat absent-minded, leave their phone at home charging 1% of the time, and it is dead because they forgot to charge it another 2% of the time. Define T to be the random variable indicating the duration of the telephone call (whether or not it is answered). Use the model from Examples.12 and.1 of the textbook to describe the calls that are answered. (a) What is the expected value of T? Let A {call is answered}. We are given that f T A { 1 e t/ t otherwise so E[T A] (because the duration of an answered call is distributed according to an exponential distribution with parameter λ 1/). By the law of total probability we know that the expected value of T will be E[T ] 1 E[T Ac ] + 7 1 E[T A] 1 () + 7 21 () 1 1 2.1s. (b) What is F T (t)? By simple integration of the PDF, we obtain F T (t) { t < /1 + 7/1(1 e t/ ) t. (c) What is f T (t)? Differentiating, we obtain f T (t) { t < (/1)δ(t) + (7/)e t/ t.
ECE 2 Solution to Assignment 5 March 7, 27 8 (d) What is the variance of T? By definition Var[T ] (t 21/1) 2 f T (t)dt ( t 2 21t/5 + (21/1) 2) f T (t)dt ( t 2 21t/5 + (21/1) 2) ( (/1)δ(t) + (7/)e t/) dt (441/1)(/1) + (12/1) + (6867/1) 12.6 ( t 2 21t/5 + (21/1) 2) (7/)e t/ dt and σ 12.6.5. (By comparison, the variance of f T A 1/λ 2 9.) I used the Maple command (7/)*int(((t-21/1)^2)*exp(-t/),t..infinity); to calculate the integral.