Solution to EE 504 Test #2 F03 1. Three random variables, X, Y and Z have the following characteristics: E ( X ) = 1 , E (Y ) = 0 , E ( Z ) = −3 σ X2 = 4 , σ Y2 = 4 , σ Z2 = 1 σ XY = 0 , σ XZ = 2 , σ YZ = 1 Find the numerical value of the correlation coefficient, ρXW , between X and W = X − 2Y + Z . σ ρXW = XW σ Xσ W σ X = σ X2 = 2 Using the formula for the variance of a linear combination, Z, of N random variables, X i , N σ = ∑a σ 2 Z 2 i i= 1 we get N 2 Xi N + ∑ ∑ ai a jσ X i X j , i= 1 j = 1 i≠ j σ W2 = (1) σ X2 + (−2) σ Y2 + (1) σ Z2 + 2(1)(−2)σ XY + 2(1)(1)σ XZ + 2(−2)(1)σ YZ σ W2 = 4 + 4 × 4 + 1 − 4 × 0 + 2 × 2 − 4 × 1 = 21 ⇒ σ W = 21 2 2 2 The variance of W could also be found using σ W2 = E (W 2 ) − [E (W )] E (W ) = E ( X − 2Y + Z ) = E ( X ) − 2 E (Y ) + E ( Z ) = 1 − 2(0) − 3 = −2 2 2 E (W ) = E ( X − 2Y + Z ) = E ( X 2 ) + 4 E (Y 2 ) + E ( Z 2 ) − 4 E ( XY ) + 2 E ( XZ ) − 4 E (YZ ) 2 ( ) E ( X 2 ) = σ X2 + [E ( X )] = 4 + 12 = 5 2 E (Y 2 ) = σ Y2 + [E (Y )] = 4 + 0 2 = 4 2 E ( Z 2 ) = σ Z2 + [E ( Z )] = 1 + (−3) = 10 2 2 E ( XY ) = σ XY + E ( X ) E (Y ) = 0 + 1(0) = 0 E ( XZ ) = σ XZ + E ( X ) E ( Z ) = 2 + 1(−3) = −1 E (W E (YZ ) = σ YZ + E (Y ) E ( Z ) = 1 + 0(−3) = 1 2 ) = 5 + 4(4) + 10 − 4(1)(0) + 2(1)(−3) − 4(0)(−3) = 5 + 16 + 10 − 6 = 25 σ W2 = 25 − (−2) = 21 ⇒ σ W = 21 Check. 2 The covariance of X with W is σ XW σ XW = E ( XW ) − E ( X ) E (W ) = E ( X ( X − 2Y + Z )) − E ( X ) E ( X − 2Y + Z ) σ XW = E ( X 2 − 2 XY + XZ ) − 1 × (1 − 0 − 3) σ XW = E ( X 2 ) − 2E ( XY ) + E ( XZ ) + 2 123 123 123 −1 0 5 σ XW = 5 − 1 + 2 = 6 6 ρXW = = 0.6547 2 × 21 2. Two independent random variables, X and Y, have pdf’s given by p X ( x ) = 0.3δ ( x − 2) + 0.7δ ( x + 1) and pY ( y ) is uniform over the range, 2 < y < 7 . (a) Sketch the pdf of Z = X − Y . 1 y − 4.5 pY ( y ) = rect 5 5 1 y + 4.5 − y − 4.5 1 p( −Y ) ( y ) = pY (− y ) = rect = rect 5 5 5 5 1 z + 4.5 p Z ( z) = p X ( z) ∗ p( −Y ) ( z) = [0.3δ ( z − 2) + 0.7δ ( z + 1)] ∗ rect 5 5 p Z ( z) = 1 z + 4.5 z + 4.5 0.3δ ( z − 2) ∗ rect + 0.7δ ( z + 1) ∗ rect 5 5 5 p Z ( z) = 1 z + 5.5 z + 2.5 0.3 rect + 0.7 rect 5 5 5 p Z (z) 0.20 0.16 0.12 0.08 0.04 -9 -8 (b) -7 -6 -5 -4 -3 -2 z -1 What is the numerical probability that Z < 4? Pr ( Z < 4 ) = Pr (−4 < Z < 4 ) = Pr ( Z < 4 ) = 4 ∫ p (z)dz Z −4 1 z + 5.5 z + 2.5 0.3 rect dz + 0.7 rect ∫ 5 5 5 −4 4 1 1 z + 5.5 z + 2.5 Pr ( Z < 4 ) = ∫ 0.3 rect dz dz + ∫ 0.7 rect 5 5 5 −4 5 −4 4 4 −3 1.2 + 0.7 0.7 0.3 0.7 0.3 Pr ( Z < 4 ) = dz + dz = (4) + (1) = = 0.38 ∫ ∫ 5 5 5 −4 5 −4 5 0 Referring to the pdf graph, this is the area under the pdf from -4 to 0, which is 0.2(1) + 0.06(3) = 0.38. Check. 3. An experiment is performed 200 times. The sample mean, x , of the experimental outcomes is 25 and the sample standard deviation, SX , is 4. A sample size of 200 is large enough to reasonably use the sample standard deviation as the population standard deviation, σ X , and to reasonably assume that the pdf of the sample mean, X , is Gaussian. A confidence interval on the sample mean is to be reported in the form, 25 ± k, for a confidence level of 80%. Find the numerical value of k. σ X2 16 = = 0.08 ⇒ σ X = 0.08 = 0.2828 . The variance of the mean is σ = N 200 2 X From the normal distribution tables, for a confidence level of 80%, the confidence interval should be approximately 25 ± 1.3σ X = 25 ± 0.3676 . Therefore k is 0.3676. 4. What characteristic of its probability density function indicates that a random variable is continuous? The pdf has no impulses in it. OR What characteristic of its probability density function indicates that a random variable is discrete? The pdf has only impulses in it. 5. A deterministic random process has sample functions of the form, X( t) = A cos(2πt + θ ) , where A and θ are random over the ensemble but constant for any single sample function. Let θ be uniformly distributed over the range, −π < θ < π and let A be Gaussian distributed with an expected value of 1 and a variance of 4. Let A and θ be independent, implying that A and cos(2πt + θ ) are also independent. Find the mean-squared value of the random process, E ( X 2 ( t)) . A2 E ( X ) = E ( A cos (2πt + θ )) = E (1 + cos( 4πt + 2θ )) 2 2 2 2 A2 A2 E ( X ) = E + E cos( 4πt + 2θ ) 2 2 2 Since A and cos(2πt + θ ) (and, by implication, cos( 4πt + 2θ ) ) are independent, A2 A2 E ( X 2 ) = E + E E (cos( 4πt + 2θ )) 2 2 ∞ 1 E (cos( 4πt + 2θ )) = ∫ cos( 4πt + 2θ ) pΘ (θ ) dθ = 2π −∞ π ∫ cos(4πt + 2θ )dθ −π π 1 sin( 4πt + 2θ ) 1 sin( 4πt + 2π ) sin( 4πt − 2π ) = E (cos( 4πt + 2θ )) = − 2π 2 2 2 −π 2π E (cos( 4πt + 2θ )) = 1 4π sin( 4πt + 2π ) − sin( 4πt − 2π ) = 0 4244 3 14 4244 3 14 = sin ( 4 πt ) = sin ( 4 πt ) (This result, E (cos( 4πt + 2θ )) = 0 , should be obvious but the preceding three lines prove it in case it is not.) Then A2 1 5 1 1 2 E ( X 2 ) = E = E ( A 2 ) = σ A2 + [E ( A)] = ( 4 + 1) = = 2.5 2 2 2 2 2 ( )