Sie sind auf Seite 1von 61

5.5.

SOLVED PROBLEMS

81

Example 5.5.10. Let X be uniformly distributed in [0, 2] and Y = sin(X). Calculate the p.d.f. fY of Y . Since Y = g(X), we know that fY (y) = 1 fX (xn ) |g (xn )|

where the sum is over all the xn such that g(xn ) = y. For each y (1, 1), there are two values of xn in [0, 2] such that g(xn ) = sin(xn ) = y. For those values, we nd that

|g (xn )| = | cos(xn )| = and

1 sin2 (xn ) =

1 y2,

fX (xn ) = Hence,

1 . 2

fY (y) = 2

1 1 y2

1 = 2

1 1 y2

Example 5.5.11. Let {X, Y } be independent random variables with X exponentially distributed with mean 1 and Y uniformly distributed in [0, 1]. Calculate E(max{X, Y }). Let Z = max{X, Y }. Then P (Z z) = P (X z, Y z) = P (X z)P (Y z) z(1 ez ), for z [0, 1] = 1 ez , for z 1. Hence, 1 ez + zez , for z [0, 1] fZ (z) = ez , for z 1.

82

CHAPTER 5. RANDOM VARIABLES

Accordingly,
1

E(Z) =
0

zfZ (z)dz =

z(1 ez + zez )dz +


1

zez dz

To do the calculation we note that


1 0 1 0

zdz = [z 2 /2]1 = 1/2, 0


1 0 1 1 0

zez dz = = e

zdez = [zez ]1 + 0 [ez ]1 0 = 1 2e


1

ez dz

1 0

z 2 ez dz = = e
1

1 0 1

z 2 dez = [z 2 ez ]1 + 0 + 2(1 2e
1 0 1

1 0 1

2zez dz

) = 2 5e

zez dz = 1

zez dz = 2e1 .

Collecting the pieces, we nd that E(Z) = 1 (1 2e1 ) + (2 5e1 ) + 2e1 = 3 5e1 1.16. 2

Example 5.5.12. Let {Xn , n 1} be i.i.d. with E(Xn ) = and var(Xn ) = 2 . Use Chebyshevs inequality to get a bound on := P (| X1 + + Xn | ). n

Chebyshevs inequality (4.8.1) states that 1


2

var(

X1 + + Xn 1 nvar(X1 ) 2 )= 2 = 2. 2 n n n

This calculation shows that the sample mean gets closer and closer to the mean: the variance of the error decreases like 1/n.

5.5. SOLVED PROBLEMS

83

Example 5.5.13. Let X =D P (). You pick X white balls. You color the balls independently, each red with probability p and blue with probability 1 p. Let Y be the number of red balls and Z the number of blue balls. Show that Y and Z are independent and that Y =D P (p) and Z =D P ((1 p)). We nd P (Y = m, Z = n) = P (X = m + n) m+n m p (1 p)n m m+n m+n m m+n (m + n)! m = p (1 p)n = p (1 p)n (m + n)! m (m + n)! m!n! (p)m p ((1 p))n (1p) = [ e ][ e ], m! n!

which proves the result.

6.7. SOLVED PROBLEMS

95

6.7

Solved Problems

Example 6.7.1. Let (X, Y ) be a point picked uniformly in the quarter circle {(x, y) | x 0, y 0, x2 + y 2 1}. Find E[X | Y ]. Given Y = y, X is uniformly distributed in [0, E[X | Y ] = 1 2 1 y 2 ]. Hence

1 Y 2.

Example 6.7.2. A customer entering a store is served by clerk i with probability pi , i = 1, 2, . . . , n. The time taken by clerk i to service a customer is an exponentially distributed random variable with parameter i . a. Find the pdf of T , the time taken to service a customer. b. Find E[T ]. c. Find V ar[T ]. Designate by X the clerk who serves the customer. a. fT (t) =
n i=1 pi fT |X [t|i]

n i t i=1 pi i e n 1 i=1 pi i .
i

b. E[T ] = E(E[T | X]) = E( 1 ) = X

1 c. We rst nd E[T 2 ] = E(E[T 2 | X]) = E( 2 ) =

n 2 i=1 pi 2 . i

Hence, var(T ) =

E(T 2 ) (E(T ))2 =

n 2 i=1 pi 2 i

n 1 2 i=1 pi i ) .

Example 6.7.3. The random variables Xi are i.i.d. and such that E[Xi ] = and var(Xi ) = 2 . Let N be a random variable independent of all the Xi s taking on nonnegative integer values. Let S = X1 + X2 + . . . + XN . a. Find E(S). b. Find var(S). a. E(S)] = E(E[S | N ]) = E(N ) = E(N ).

96

CHAPTER 6. CONDITIONAL EXPECTATION

b. First we calculate E(S 2 ). We nd E(S 2 ) = E(E[S 2 | N ]) = E(E[(X1 + X2 + . . . + XN )2 | N ])


2 2 = E(E[X1 + + XN + i=j

Xi Xj | N ])

2 E(N E(X1 )

+ N (N 1)E(X1 X2 )) = E(N (2 + 2 ) + N (N 1)2 )

= E(N ) 2 + E(N 2 )2 . Then, var(S) = E(S 2 ) (E(S))2 = E(N ) 2 + E(N 2 )2 2 (E(N ))2 = E(N ) 2 + var(N )2 . Example 6.7.4. Let X, Y be independent and uniform in [0, 1]. Calculate E[X 2 | X + Y ]. Given X + Y = z, the point (X, Y ) is uniformly distributed on the line {(x, y) | x 0, y 0, x + y = z}. Draw a picture to see that if z > 1, then X is uniform on [z 1, 1] and if z < 1, then X is uniform on [0, z]. Thus, if z > 1 one has
1 z1

E[X 2 | X + Y = z] = Similarly, if z < 1, then

x2

1 1 x3 1 1 (z 1)3 dx = [ ]z1 = . 2z 2z 3 3(2 z)

E[X 2 | X + Y = z] =
0

1 1 x3 z2 x2 dx = [ ]z = . 0 z z 3 3

Example 6.7.5. Let (X, Y ) be the coordinates of a point chosen uniformly in [0, 1]2 . Calculate E[X | XY ]. This is an example where we use the straightforward approach, based on the denition. The problem is interesting because is illustrates that approach in a tractable but nontrivial example. Let Z = XY .
1

E[X | Z = z] =
0

xf[X|Z] [x | z]dx.

6.7. SOLVED PROBLEMS

97

Now, f[X|Z] [x | z] = Also, fX,Z (x, z) . fZ (z)

fX,Z (x, z)dxdz = P (X (x, x + dx), Z (z, z + dz)) = P (X (x, x + dx))P [Z (z, z + dz) | X = x] = dxP (xY (z, z + dz)) z z dz dz = dxP (Y ( , + )) = dx 1{z x}. x x x x Hence, fX,Z (x, z) = Consequently,
1 1

1 x,

if x [0, 1] and z [0, x]

0, otherwise.

fZ (z) = Finally,

fX,Z (x, z)dx =

1 dx = ln(z), 0 z 1. x

f[X|Z] [x | z] = and

1 , for x [0, 1] and z [0, x], xln(z)

E[X | Z = z] =
z

x(

1 z1 )dx = , xln(z) ln(z) XY 1 . ln(XY )

so that E[X | XY ] = Examples of values: E[X | XY = 1] = 1, E[X | XY = 0.1] = 0.39, E[X | XY 0] 0. Example 6.7.6. Let X, Y be independent and exponentially distributed with mean 1. Find E[cos(X + Y ) | X].

98

CHAPTER 6. CONDITIONAL EXPECTATION

We have

E[cos(X + Y ) | X = x] =
0

cos(x + y)ey dy = Re{


0

ei(x+y)y dy}

= Re{

eix cos(x) sin(x) }= . 1i 2

Example 6.7.7. Let X1 , X2 , . . . , Xn be i.i.d. U [0, 1] and Y = max{X1 , . . . , Xn }. Calculate E[X1 | Y ]. Intuition suggests, and it is not too hard to justify, that if Y = y, then X1 = y with probability 1/n, and with probability (n 1)/n the random variable X1 is uniformly distributed in [0, y]. Hence, E[X1 | Y ] = n1Y n+1 1 Y + = Y. n n 2 2n

Example 6.7.8. Let X, Y, Z be independent and uniform in [0, 1]. Calculate E[(X + 2Y + Z)2 | X]. One has, E[(X + 2Y + Z)2 | X] = E[X 2 + 4Y 2 + Z 2 + 4XY + 4Y Z + 2XZ | X]. Now,

E[X 2 + 4Y 2 + Z 2 + 4XY + 4Y Z + 2XZ | X] = X 2 + 4E(Y 2 ) + E(Z 2 ) + 4XE(Y ) + 4E(Y )E(Z) + 2XE(Z) = X 2 + 4/3 + 1/3 + 2X + 1 + X = X 2 + 3X + 8/3. Example 6.7.9. Let X, Y, Z be three random variables dened on the same probability space. Prove formally that E(|X E[X | Y ]|2 ) E(|X E[X | Y, Z]|2 ). Let X1 = E[X | Y ] and X2 = E[X | Y, Z]. Note that E((X X2 )(X2 X1 )) = E(E[(X X2 )(X2 X1 ) | Y, Z])

6.7. SOLVED PROBLEMS

99

and E[(X X2 )(X2 X1 ) | Y, Z] = (X2 X1 )E[X X2 | Y, Z] = X2 X2 = 0. Hence, E((X X1 )2 ) = E((X X2 +X2 X1 )2 ) = E((X X2 )2 )+E((X2 X1 )2 ) E((X X2 )2 ). Example 6.7.10. Pick the point (X, Y ) uniformly in the triangle {(x, y) | 0 x 1 and 0 y x}. a. Calculate E[X | Y ]. b. Calculate E[Y | X]. c. Calculate E[(X Y )2 | X]. a. Given {Y = y}, X is U [y, 1], so that E[X | Y = y] = (1 + y)/2. Hence, E[X | Y ] = 1+Y . 2

b. Given {X = x}, Y is U [0, x], so that E[Y | X = x] = x/2. Hence, E[Y | X] = c. Since given {X = x}, Y is U [0, x], we nd E[(X Y )2 | X = x] =
0 x

X . 2

1 1 (x y)2 dy = x x X2 . 3

x 0

y 2 dy =

x2 . Hence, 3

E[(X Y )2 | X] =

Example 6.7.11. Assume that the two random variables X and Y are such that E[X | Y ] = Y and E[Y | X] = X. Show that P (X = Y ) = 1. We show that E((X Y )2 ) = 0. This will prove that X Y = 0 with probability one. Note that E((X Y )2 ) = E(X 2 ) E(XY ) + E(Y 2 ) E(XY ).

100

CHAPTER 6. CONDITIONAL EXPECTATION

Now, E(XY ) = E(E[XY | X]) = E(XE[Y | X]) = E(X 2 ). Similarly, one nds that E(XY ) = E(Y 2 ). Putting together the pieces, we get E((X Y )2 ) = 0. Example 6.7.12. Let X, Y be independent random variables uniformly distributed in [0, 1]. Calculate E[X|X < Y ]. Drawing a unit square, we see that given {X < Y }, the pair (X, Y ) is uniformly distributed in the triangle left of the diagonal from the upper left corner to the bottom right corner of that square. Accordingly, the p.d.f. f (x) of X is given by f (x) = 2(1 x). Hence,
1

E[X|X < Y ] =
0

1 x 2(1 x)dx = . 3

108

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

7.4

Summary

We dened the Gaussian random variables N (0, 1), N (, 2 ), and N ( , ) both in terms of their density and their characteristic function. Jointly Gaussian random variables that are uncorrelated are independent. If X, Y are jointly Gaussian, then E[X | Y ] = E(X) + cov(X, Y )var(Y )1 (Y E(Y )). In the vector case,
1 X X Y Y E[X | Y ] = E(X ) + X,Y Y (Y E(Y ),

when Y is invertible. We also discussed the non-invertible case.

7.5

Solved Problems

Example 7.5.1. The noise voltage X in an electric circuit can be modelled as a Gaussian random variable with mean zero and variance equal to 108 . a. What is the probability that it exceeds 104 ? What is the probability that it exceeds 2 104 ? What is the probability that its value is between 2 104 and 104 ? b. Given that the noise value is positive, what is the probability that it exceeds 104 ? c. What is the expected value of |X|? Let Z = 104 X, then Z =D N (0, 1) and we can reformulate the questions in terms of Z. a. Using (7.1) we nd P (Z > 1) = 0.159 and P (Z > 2) = 0.023. Indeed, P (Z > d) = P (|Z| > d)/2, by symmetry of the density. Moreover, P (2 < Z < 1) = P (Z < 1)P (Z 2) = 1P (Z > 1)P (Z > 2) = 10.1590.023 = 0.818. b. We have P [Z > 1 | Z > 0] = P (Z > 1) = 2P (Z > 1) = 0.318. P (Z > 0)

7.5. SOLVED PROBLEMS

109

c. Since Z = 104 X, one has E(|Z|) = 104 E(|X|). Now,


E(|Z|) =

|z|fZ (z)dz = 2
0

zfZ (z)dz = 2 2 .

1 1 z exp{ z 2 }dz 2 2

= Hence,

1 d[exp{ z 2 }] = 2

E(|X|) = 104

2 .

Example 7.5.2. Let U = {Un , n 1} be a sequence of independent standard Gaussian random variables. A low-pass lter takes the sequence U and produces the output sequence Xn = Un + Un+1 . A high-pass lter produces the output sequence Yn = Un Un+1 . a. Find the joint pdf of Xn and Xn1 and nd the joint pdf of Xn and Xn+m for m > 1. b. Find the joint pdf of Yn and Yn1 and nd the joint pdf of Yn and Yn+m for m > 1. c. Find the joint pdf of Xn and Ym . We start with some preliminary observations. First, since the Ui are independent, they are jointly Gaussian. Second, Xn and Yn are linear combinations of the Ui and thus are also jointly Gaussian. Third, the jpdf of jointly gaussian random variables Z is z fZ (z ) = 1 (2)n det(C) 1 z z exp[ (z m )C 1 (z m )] 2

where n is the dimension of Z , m is the vector of expectations of Z , and C is the covariance Z matrix E[(Z m )(Z m )T ]. Finally, we need some basic facts from algebra. If C = Z a b d b , then det(C) = ad bc and C 1 = 1 . We are now ready to det(C) c d c a answer the questions. U a. Express in the form X = AU . Xn Xn1 0
1 2 1 2 1 2 1 2

Un 0 Un+1

Un1

112

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

Then det(C) =

1 4

1 14

3 16

and C 1 = 16 3 1 4
1 2

1 4 1 2

fXn Yn (xn , yn ) =

2 3

2 exp[ 4 (x2 xn yn + yn )] 3 n

ii. Consider m=n+1.

Xn Yn+1

1 2 1 2 1 2

1 2 Un Un+1 1 0 0 1 2 0 0 2
1 2 1 2

U Then E[[Xn Yn+1 ]T ] = AE[U ] = 0 . U C = AE[U U T ]AT = Then det(C) =


1 4 1 2 1 2 1 2

1 2

1 2

1 2

0
1 2

1 2

and

C 1 = fXn Yn+1 (xn , yn+1 ) =


1 2 exp[ 1 (x2 + yn+1 )] 4 n

iii. For all other m. Xn Ym


1 2 1 2

= 0

0 1 2

0 Un+1 1 Um1 2 Um

Un

U Then E[[Xn Ym ]T ] = AE[U ] = 0 . U C = AE[U U T ]AT =


1 2 1 2

0
1 2

0 1 2

0 1 0 0 0 0 0 1 0 0 1 2 1 0 0 0 1 0 2 2 0 0 2

1 0 0 0

1 2 1 2

1 2 = 0 0
1 2

Then det(C) =

1 4

and

C 1 = fXn Ym (xn , ym ) =
1 2 exp[ 1 (x2 + ym )] 4 n

7.5. SOLVED PROBLEMS

113

Example 7.5.3. Let X, Y, Z, V be i.i.d. N (0, 1). Calculate E[X + 2Y |3X + Z, 4Y + 2V ]. We have E[X + 2Y |3X + Z, 4Y + 2V ] = a 1 where a = [E((X + 2Y )(3X + Z)), E((X + 2Y )(4Y + 2V ))] = [3, 8] and = Hence, E[X+2Y |3X+Z, 4Y +2V ] = [3, 8] 101 0 0 201 3X + Z = 3 (3X+Z)+ 4 (4Y +2V ). 10 10 4Y + 2V var(3X + Z) E((3X + Z)(4Y + 2V )) E((3X + Z)(4Y + 2V )) var(4Y + 2V ) 10 0 0 20 . = 3X + Z 4Y + 2V

Example 7.5.4. Assume that {X, Yn , n 1} are mutually independent random variables with X = N (0, 1) and Yn = N (0, 2 ). Let Xn = E[X | X + Y1 , . . . , X + Yn ]. Find the smallest value of n such that P (|X Xn | > 0.1) 5%. We know that Xn = an (nX + Y1 + + Yn ). The value of an is such that E((X Xn )(X + Yj )) = 0, i.e., E((X an (nX + Yj ))(X + Yj )) = 0, which implies that an = Then var(X Xn ) = var((1 nan )X an (Y1 + + Yn )) = (1 nan )2 + n(an )2 2 = 2 . n + 2 1 . n + 2

114

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

Thus we know that X Xn = N (0, n+2 ). Accordingly,

P (|X Xn | > 0.1) = P (|N (0, where n =


2 . n+ 2

2 0.1 )| > 0.1) = P (|N (0, 1)| > ) 2 n+ n

For this probability to be at most 5% we need 0.1 = 2, i.e., n = n 2 0.1 = , 2 n+ 2

so that n = 19 2 . The result is intuitively pleasing: If the observations are more noisy ( 2 large), we need more of them to estimate X. Example 7.5.5. Assume that X, Y are i.i.d. N (0, 1). Calculate E[(X + Y )4 | X Y ]. Note that X + Y and X Y are independent because they are jointly Gaussian and uncorrelated. Hence, E[(X +Y )4 | X Y ] = E((X +Y )4 ) = E(X 4 +4X 3 Y +6X 2 Y 2 +4XY 3 +Y 4 ) = 3+6+3 = 12. Example 7.5.6. Let X, Y be independent N (0, 1) random variables. Show that W := X 2 + Y 2 =D Exd(1/2). That is, the sum of the squares of two i.i.d. zero-mean Gaussian random variables is exponentially distributed! We calculate the characteristic function of W . We nd

E(eiuW ) = =
0

eiu(x eiur
2

2 +y 2 )

1 (x2 +y2 )/2 e dxdy 2

1 r2 /2 e rdrd 2 rdr

=
0

eiur er

2 /2

=
0

1 1 2 2 d[eiur r /2 ] = . 2iu 1 1 2iu

7.5. SOLVED PROBLEMS

115

On the other hand, if W =D Exd(), then E(eiuW ) =


0

eiux ex dx

= .

1 = . iu 1 1 iu

Comparing these expressions shows that X 2 + Y 2 =D Exd(1/2) as claimed. Example 7.5.7. Let {Xn , n 0} be Gaussian N (0, 1) random variables. Assume that Yn+1 = aYn + Xn for n 0 where Y0 is a Gaussian random variable with mean zero and variance 2 independent of the Xn s and |a| < 1. a. Calculate var(Yn ) for n 0. Show that var(Yn ) 2 as n for some value 2 . b. Find the values of 2 so that the variance of Yn does not depend on n 1. a. We see that var(Yn+1 ) = var(aYn + Xn ) = a2 var(Yn ) + var(Xn ) = a2 var(Yn ) + 1. Thus, we n := var(Yn ), one has n+1 = a2 n + 1 and 0 = 2 . Solving these equations we nd var(Yn ) = n = a2n 2 + Since |a| < 1, it follows that var(Yn ) 2 := b. The obvious answer is 2 = 2 . 1 as n . 1 a2 1 a2n , for n 0. 1 a2

116

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

Example 7.5.8. Let the Xn s be as in Example 7.5.7. a.Calculate E[X1 + X2 + X3 | X1 + X2 , X2 + X3 , X3 + X4 ]. b. Calculate E[X1 + X2 + X3 | X1 + X2 + X3 + X4 + X5 ]. a. We know that the solution is of the form Y = a(X1 + X2 ) + b(X2 + X3 ) + c(X3 + X4 ) where the coecients a, b, c must be such that the estimation error is orthogonal to the conditioning variables. That is, E((X1 + X2 + X3 ) Y )(X1 + X2 )) = E((X1 + X2 + X3 ) Y )(X2 + X3 )) = E((X1 + X2 + X3 ) Y )(X3 + X4 )) = 0. These equalities read 2 a (a + b) = 2 (a + b) (b + c) = 1 (b + c) c = 0, and solving these equalities gives a = 3/4, b = 1/2, and c = 1/4. b. Here we use symmetry. For k = 1, . . . , 5, let Yk = E[Xk | X1 + X2 + X3 + X4 + X5 ]. Note that Y1 = Y2 = = Y5 , by symmetry. Moreover,

Y1 +Y2 +Y3 +Y4 +Y5 = E[X1 +X2 +X3 +X4 +X5 | X1 +X2 +X3 +X4 +X5 ] = X1 +X2 +X3 +X4 +X5 . It follows that Yk = (X1 + X2 + X3 + X4 + X5 )/5 for k = 1, . . . , 5. Hence, 3 E[X1 + X2 + X3 | X1 + X2 + X3 + X4 + X5 ] = Y1 + Y2 + Y3 = (X1 + X2 + X3 + X4 + X5 ). 5 Example 7.5.9. Let the Xn s be as in Example 7.5.7. Find the jpdf of (X1 + 2X2 + 3X3 , 2X1 + 3X2 + X3 , 3X1 + X2 + 2X3 ).

7.5. SOLVED PROBLEMS

117

These random variables are jointly Gaussian, zero mean, and with covariance matrix given by 14 11 11

= 11 14 11 . 11 11 14 Indeed, is the matrix of covariances. For instance, its entry (2, 3) is given by E((2X1 + 3X2 + X3 )(3X1 + X2 + 2X3 )) = 2 3 + 3 1 + 1 2 = 11. We conclude that the jpdf is x fX (x ) = 1 (2)3/2 ||1/2 1 exp{ x T 1x }. 2

We let you calculate || and 1 . Example 7.5.10. Let X1 , X2 , X3 be independent N (0, 1) random variables. Calculate Y E[X1 + 3X2 |Y ] where

X1 1 2 3 Y = X2 3 2 1 X3 By now, this should be familiar. The solution is Y := a(X1 + 2X2 + 3X3 ) + b(3X1 + 2X2 + X3 ) where a and b are such that 0 = E((X1 +3X2 Y )(X1 +2X2 +3X3 )) = 7(a+3b)(4a+4b)(9a+3b) = 714a10b and 0 = E((X1 +3X2 Y )(3X1 +2X2 +X3 )) = 9(3a+9b)(4a+4b)(3a+b) = 910a14b. Solving these equations gives a = 1/12 and b = 7/12. Example 7.5.11. Find the jpdf of (2X1 + X2 , X1 + 3X2 ) where X1 and X2 are independent N (0, 1) random variables.

118

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

These random variables are jointly Gaussian, zero-mean, with covariance given by 5 5 . = 5 10 Hence, x fX (x ) = = where 1 = 1 1 exp{ x T 1x } 1/2 2 2|| 1 1 T 1 exp{ x x } 10 2 1 25 5 10 5 5 .

Example 7.5.12. The random variable X is N (, 1). Find an approximate value of so that P (0.5 X 0.1) P (1 X 2). We write X = + Y where Y is N (0, 1). We must nd so that g() := P (0.5 Y 0.1 ) P (1 Y 2 ) 0. We do a little search using a table of the N (0, 1) distribution or using a calculator. I nd that 0.065. Example 7.5.13. Let X be a N (0, 1) random variable. Calculate the mean and the variance of cos(X) and sin(X). a. Mean Values. We know that E(eiuX ) = eu Therefore, E(cos(uX) + i sin(uX)) = eu
2 /2 2 /2

and ei = cos() + i sin().

7.5. SOLVED PROBLEMS

119

so that E(cos(uX)) = eu
2 /2

and E(sin(uX)) = 0.

In particular, E(cos(X)) = e1/2 and E(sin(X)) = 0. b. Variances. We rst calculate E(cos2 (X)). We nd 1 1 1 E(cos2 (X)) = E( (1 + cos(2X))) = + E(cos(2X)). 2 2 2 Using the previous derivation, we nd that E(cos(2X)) = e2
2 /2

= e2 ,

so that E(cos2 (X)) = (1/2) + (1/2)e2 . We conclude that var(cos(X)) = E(cos2 (X)) (E(cos(uX)))2 = Similarly, we nd E(sin2 (X)) = E(1 cos2 (X)) = 1 1 2 e = var(sin(X)). 2 2 1 1 1 1 2 + e (e1/2 )2 = + e2 e1 . 2 2 2 2

Example 7.5.14. Let X be a N (0, 1) random variable. Dene X, if |X| 1 Y = X, if |X| > 1. Find the pdf of Y . By symmetry, X is N (0, 1). Example 7.5.15. Let {X, Y, Z} be independent N (0, 1) random variables. a. Calculate E[3X + 5Y | 2X Y, X + Z]. b. How does the expression change if X, Y, Z are i.i.d. N (1, 1)?

120

CHAPTER 7. GAUSSIAN RANDOM VARIABLES

a. Let V1 = 2X Y, V2 = X + Z and V = [V1 , V2 ]T . Then E[3X + 5Y | V ] = a 1V V where V a = E((3X + 5Y )V T ) = [1, 3] and V = Hence, E[3X + 5Y | V ] = [1, 3] 5 2 2 2 1 1 2 2 V = [1, 3] V 6 2 5 5 2 2 2 .

2 13 1 V = [4, 13]V = (2X Y ) + (X + Z). 6 3 6 b. Now, 1 V V E[3X + 5Y | V ] = E(3X + 5Y ) + a 1 (V E(V )) = 8 + [4, 13](V [1, 2]T ) V V 6 13 26 2 (2X Y ) + (X + Z). = 6 3 6 Example 7.5.16. Let (X, Y ) be jointly Gaussian. Show that X E[X | Y ] is Gaussian and calculate its mean and variance. We know that E[X | Y ] = E(X) + Consequently, X E[X | Y ] = X E(X) cov(X, Y ) (Y E(Y )) var(Y ) cov(X, Y ) (Y E(Y )). var(Y )

and is certainly Gaussian. This dierence is zero-mean. Its variance is var(X) + [ cov(X, Y ) [cov(X, Y )]2 cov(X, Y ) 2 ] var(Y ) 2 cov(X, Y ) = var(X) . var(Y ) var(Y ) var(Y )

2.7. SOLVED PROBLEMS

19

and P : F [0, 1] is a -additive set function such that P () = 1. The idea is to specify the likelihood of various outcomes (elements of ). If one can specify the probability of individual outcomes (e.g., when is countable), then one can choose F = 2 , so that all sets of outcomes are events. However, this is generally not possible as the example of the uniform distribution on [0, 1] shows. (See Appendix C.)

2.6.1

Stars and Bars Method

In many problems, we use a method for counting the number of ordered groupings of identical objects. This method is called the stars and bars method. Suppose we are given identical objects we call stars. Any ordered grouping of these stars can be obtained by separating them by bars. For example, || | separates four stars into four groups of sizes 0, 0, 3, and 1. Suppose we wish to separate N stars into M ordered groups. We need M 1 bars to form M groups. The number of orderings is the number of ways of placing the N identical stars and M 1 identical bars into N + M 1 spaces,
N +M 1 M

Creating compound objects of stars and bars is useful when there are bounds on the sizes of the groups.

2.7

Solved Problems

Example 2.7.1. Describe the probability space {, F, P } that corresponds to the random experiment picking ve cards without replacement from a perfectly shued 52-card deck. 1. One can choose to be all the permutations of A := {1, 2, . . . , 52}. The interpretation of is then the shued deck. Each permutation is equally likely, so that p = 1/(52!) for . When we pick the ve cards, these cards are (1 , 2 , . . . , 5 ), the top 5 cards of the deck.

20

CHAPTER 2. PROBABILITY SPACE

2. One can also choose to be all the subsets of A with ve elements. In this case, each subset is equally likely and, since there are N := for . 3. One can choose = { = (1 , 2 , 3 , 4 , 5 ) | n A and m = n , m = n, m, n {1, 2, . . . , 5}}. In this case, the outcome species the order in which we pick the cards. Since there are M := 52!/(47!) such ordered lists of ve cards without replacement, we dene p = 1/M for . As this example shows, there are multiple ways of describing a random experiment. What matters is that is large enough to specify completely the outcome of the experiment. Example 2.7.2. Pick three balls without replacement from an urn with fteen balls that are identical except that ten are red and ve are blue. Specify the probability space. One possibility is to specify the color of the three balls in the order they are picked. Then = {R, B}3 , F = 2 , P ({RRR}) = 10 9 8 5 4 3 , . . . , P ({BBB}) = . 15 14 13 15 14 13
52 5

such subsets, one denes p = 1/N

Example 2.7.3. You ip a fair coin until you get three consecutive heads. Specify the probability space. One possible choice is = {H, T } , the set of nite sequences of H and T . That is, {H, T } = {H, T }n . n=1 This set is countable, so we can choose F = 2 . Here, P ({}) = 2n where n := length of . This is another example of a probability space that is bigger than necessary, but easier to specify than the smallest probability space we need.

2.7. SOLVED PROBLEMS

21

Example 2.7.4. Let = {0, 1, 2, . . .}. Let F be the collection of subsets of that are either nite or whose complement is nite. Is F a -eld? No, F is not closed under countable set operations. For instance, {2n} F for each n 0 because {2n} is nite. However, A := {2n} n=0 is not in F because both A and Ac are innite. Example 2.7.5. In a class with 24 students, what is the probability that no two students have the same birthday? Let N = 365 and n = 24. The probability is := N N 1 N 2 N n+1 . N N N N

To estimate this quantity we proceed as follows. Note that


n

ln() =
k=1

ln(
1

N n+k ) N

ln(
1

N n+x )dx N

= N
a

ln(y)dy = N [yln(y) y]1 a N n+1 ) (n 1). N

= (N n + 1)ln(

(In this derivation we dened a = (N n + 1)/N .) With n = 24 and N = 365 we nd that 0.48. Example 2.7.6. Let A, B, C be three events. Assume that P (A) = 0.6, P (B) = 0.6, P (C) = 0.7, P (A B) = 0.3, P (A C) = 0.4, P (B C) = 0.4, and P (A B C) = 1. Find P (A B C). We know that (draw a picture) P (A B C) = P (A) + P (B) + P (C) P (A B) P (A C) P (B C) + P (A B C).

22

CHAPTER 2. PROBABILITY SPACE

Substituting the known values, we nd 1 = 0.6 + 0.6 + 0.7 0.3 0.4 0.4 + P (A B C), so that P (A B C) = 0.2. Example 2.7.7. Let = {1, 2, 3, 4} and let F = 2 be the collection of all the subsets of . Give an example of a collection A of subsets of and probability measures P1 and P2 such that (i). P1 (A) = P2 (A), A A. (ii). The -eld generated by A is F. (This means that F is the smallest -eld of that contains A.) (iii). P1 and P2 are not the same. Let A= {{1, 2}, {2, 4}}. Assign probabilities P1 ({1}) = 1 , P1 ({2}) = 1 , P1 ({3}) = 3 , P1 ({4}) = 3 ; and P2 ({1}) = 8 8 8 8
1 12 , P2 ({2})

2 12 , P2 ({3})

5 12 , P2 ({4})

4 12 .

Note that P1 and P2 are not the same, thus satisfying (iii). P1 ({1, 2}) = P1 ({1}) + P1 ({2}) = P2 ({1, 2}) = P2 ({1}) + P2 ({2}) = Hence P1 ({1, 2}) = P2 ({1, 2}). P1 ({2, 4}) = P1 ({2}) + P1 ({4}) = P2 ({2, 4}) = P2 ({2}) + P2 ({4}) = Hence P1 ({2, 4}) = P2 ({2, 4}). Thus P1 (A) = P2 (A)A A, thus satisfying (i). To check (ii), we only need to check that k , {k} can be formed by set operations on sets in A . Then any other set in F can be formed by set operations on {k}. {1} = {1, 2} {2, 4}C
1 8 1 12 1 8

+
2 12

1 8

=
1 4

1 4

3 8

=
4 12

1 2 1 2

2 12

2.7. SOLVED PROBLEMS

23

{2} = {1, 2} {2, 4} {3} = {1, 2}C {2, 4}C {4} = {1, 2}C {2, 4}. Example 2.7.8. Choose a number randomly between 1 and 999999 inclusive, all choices being equally likely. What is the probability that the digits sum up to 23? For example, the number 7646 is between 1 and 999999 and its digits sum up to 23 (7+6+4+6=23). Numbers between 1 and 999999 inclusive have 6 digits for which each digit has a value in {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. We are interested in nding the numbers x1 +x2 +x3 +x4 +x5 +x6 = 23 where xi represents the ith digit. First consider all nonnegative xi where each digit can range from 0 to 23, the number of ways to distribute 23 amongst the xi s is
28 5

But we need to restrict the digits xi < 10. So we need to subtract the number of ways to distribute 23 amongst the xi s when xk 10 for some k. Specically, when xk 10 we can express it as xk = 10 + yk . For all other j = k write yj = xj . The number of ways to arrange 23 amongst xi when some xk 10 is the same as the number of ways to arrange yi so that
6 i=1 yi 18 5

= 23 10 is

18 5

. There are 6 possible ways for some xk 10 so there

are a total of 6

ways for some digit to be greater than or equal to 10, as we can see by

using the stars and bars method (see 2.6.1). However, the above counts events multiple times. For instance, x1 = x2 = 10 is counted both when x1 10 and when x2 10. We need to account for these events that are counted multiple times. We can consider when two digits are greater than or equal to 10: xj 10 and xk 10 when j = k. Let xj = 10 + yj and xk = 10 + yk and xi = yi i = j, k. Then the number of ways to distribute 23 amongst xi when there are 2 greater than or equal to 10 is equivalent to the number of ways to distribute yi when are
8 5 6 i=1 yi

= 23 10 10 = 3. There

ways to distribute these yi and there are

6 2

ways to choose the possible two digits

that are greater than or equal to 10.

24

CHAPTER 2. PROBABILITY SPACE

We are interested in when the sum of xi s is equal to 23. So we can have at most 2 xi s greater than or equal to 10. So we are done. Thus there are
28 5

18 5

6 2

8 5

numbers between 1 through 999999 whose digits

sum up to 23. The probability that a number randomly chosen has digits that sum up to 23 is (28)6(18)+(6)(8) 5 5 2 5
999999

.
i P (Ai )

Example 2.7.9. Let A1 , A2 , . . . , An , n 2 be events. Prove that P (n Ai ) = i=1


i<j

P (Ai Aj ) +

i<j<k

P (Ai Aj Ak ) + (1)n+1 P (A1 A2 . . . An ).

We prove the result by induction on n. First consider the base case when n = 2. P (A1 A2 ) = P (A1 ) + P (A2 ) P (A1 A2 ). Assume the result holds true for n, prove the result for n + 1. P (n+1 Ai ) = P (n Ai ) + P (An+1 ) P ((n Ai ) An+1 ) i=1 i=1 i=1 = P (n Ai ) + P (An+1 ) P (n (Ai An+1 )) i=1 i=1 =
i

P (Ai )
i<j

P (Ai Aj ) +
i<j<k n+1

P (Ai Aj Ak ) . . . P (Ai An+1 )


i

+ (1)
i<j

P (A1 A2 . . . An ) + P (An+1 ) (

P (Ai Aj An+1 ) +
i<j<k

P (Ai Aj Ak An+1 ) . . .

+ (1)n+1 P (A1 A2 . . . An An+1 )) =


i

P (Ai )
i<j

P (Ai Aj ) +
i<j<k n+2

P (Ai Aj Ak ) . . .

+ (1)

P (A1 A2 . . . An+1 )

Example 2.7.10. Let {An , n 1} be a collection of events in some probability space {, F, P }. Assume that
n=1 P (An )

< . Show that the probability that innitely many

of those events occur is zero. This result is known as the Borel-Cantelli Lemma. To prove this result we must write the event innitely many of the events An occur

1.4

Functions of a random variable

Recall that a random variable X on a probability space (, F, P ) is a function mapping to the real line R , satisfying the condition { : X() a} F for all a R. Suppose g is a function mapping R to R that is not too bizarre. Specically, suppose for any constant c that {x : g(x) c} is a Borel subset of R. Let Y () = g(X()). Then Y maps to R and Y is a random variable. See Figure 1.6. We write Y = g(X).
X g

X() g(X())

Figure 1.6: A function of a random variable as a composition of mappings. Often wed like to compute the distribution of Y from knowledge of g and the distribution of X. In case X is a continuous random variable with known distribution, the following three step procedure works well: (1) Examine the ranges of possible values of X and Y . Sketch the function g. (2) Find the CDF of Y , using FY (c) = P {Y c} = P {g(X) c}. The idea is to express the event {g(X) c} as {X A} for some set A depending on c. (3) If FY has a piecewise continuous derivative, and if the pmf fY is desired, dierentiate FY . If instead X is a discrete random variable then step 1 should be followed. After that the pmf of Y can be found from the pmf of X using pY (y) = P {g(X) = y} =
x:g(x)=y

pX (x)

Example 1.4 Suppose X is a N ( = 2, 2 = 3) random variable (see Section 1.6 for the denition) and Y = X 2 . Let us describe the density of Y . Note that Y = g(X) where g(x) = x2 . The support of the distribution of X is the whole real line, and the range of g over this support is R+ . Next we nd the CDF, FY . Since P {Y 0} = 1, FY (c) = 0 for c < 0. For c 0, FY (c) = P {X 2 c} = P { c X c} c2 X 2 c2 = P{ } 3 3 3 c2 c2 = ( ) ( ) 3 3 Dierentiate with respect to c, using the chain rule and the fact, (s) = fY (c) =
c2 1 {exp([ ]2 ) 24c 6 1 2

exp( s2 ) to obtain (1.7)

+ exp([ c2 ]2 )} 6

0 9

if y 0 if y < 0

Example 1.5 Suppose a vehicle is traveling in a straight line at speed a, and that a random direction is selected, subtending an angle from the direction of travel which is uniformly distributed over the interval [0, ]. See Figure 1.7. Then the eective speed of the vehicle in the

B a
Figure 1.7: Direction of travel and a random direction. random direction is B = a cos(). Let us nd the pdf of B. The range of a cos() as ranges over [0, ] is the interval [a, a]. Therefore, FB (c) = 0 for c a and FB (c) = 1 for c a. Let now a < c < a. Then, because cos is monotone nonincreasing on the interval [0, ], FB (c) = P {a cos() c} = P {cos() c } a c = P { cos1 ( )} a c cos1 ( a ) = 1
1

Therefore, because cos1 (y) has derivative, (1 y 2 ) 2 , fB (c) = A sketch of the density is given in Figure 1.8.
1 a2 c2

| c |< a | c |> a

fB

Figure 1.8: The pdf of the eective speed in a uniformly distributed direction.

10

Figure 1.9: A horizontal line, a xed point at unit distance, and a line through the point with random direction. Example 1.6 Suppose Y = tan(), as illustrated in Figure 1.9, where is uniformly distributed over the interval ( , ) . Let us nd the pdf of Y . The function tan() increases from to 2 2 as ranges over the interval ( , ). For any real c, 2 2 FY (c) = P {Y c} = P {tan() c} = P { tan1 (c)} = tan1 (c) +
2

Dierentiating the CDF with respect to c yields that Y has the Cauchy pdf: fY (c) = 1 (1 + c2 ) <c<

Example 1.7 Given an angle expressed in radians, let ( mod 2) denote the equivalent angle in the interval [0, 2]. Thus, ( mod 2) is equal to + 2n, where the integer n is such that 0 + 2n < 2. Let be uniformly distributed over [0, 2], let h be a constant, and let = ( + h mod 2) Let us nd the distribution of . Clearly takes values in the interval [0, 2], so x c with 0 c < 2 and seek to nd c}. Let A denote the interval [h, h + 2]. Thus, + h is uniformly distributed over A. Let P { B = n [2n, 2n + c]. Thus c if and only if + h B. Therefore, P { c} =
A T B

1 d 2

By sketching the set B, it is easy to see that A B is either a single interval of length c, or the c union of two intervals with lengths adding to c. Therefore, P { c} = 2 , so that is itself uniformly distributed over [0, 2] Example 1.8 Let X be an exponentially distributed random variable with parameter . Let Y = X , which is the integer part of X, and let R = X X , which is the remainder. We shall describe the distributions of Y and R. 11

Proposition 1.10.1 Under the above assumptions, Y is a continuous type random vector and for y in the range of g: fY (y) = Example 1.10 fX (x) |
y x (x)

= fX (x)

x (y) y

Let U , V have the joint pdf: fU V (u, v) = u + v 0 u, v 1 0 else

and let X = U 2 and Y = U (1 + V ). Lets nd the pdf fXY . The vector (U, V ) in the u v plane is transformed into the vector (X, Y ) in the x y plane under a mapping g that maps u, v to x = u2 and y = u(1 + v). The image in the x y plane of the square [0, 1]2 in the u v plane is the set A given by A = {(x, y) : 0 x 1, and x y 2 x}

See Figure 1.12 The mapping from the square is one to one, for if (x, y) A then (u, v) can be
y 2

v 1 1

u 1

Figure 1.12: Transformation from the u v plane to the x y plane. recovered by u = x and v =
y x

1. The Jacobian determinant is


x v y v

x u y u

2u 0 1+v u

= 2u2

Therefore, using the transformation formula and expressing u and V in terms of x and y yields

y x+( x 1)

fXY (x, y) =

2x

if (x, y) A else

Example 1.11 Let U and V be independent continuous type random variables. Let X = U + V and Y = V . Let us nd the joint density of X, Y and the marginal density of X. The mapping g: u v x y 24 = u+v v

is invertible, with inverse given by u = x y and v = y. The absolute value of the Jacobian determinant is given by
x u y u x v y u

1 1 0 1

=1

Therefore fXY (x, y) = fU V (u, v) = fU (x y)fV (y) The marginal density of X is given by

fX (x) =

fXY (x, y)dy =

fU (x y)fV (y)dy

That is fX = fU fV .

Example 1.12 Let X1 and X2 be independent N (0, 2 ) random variables, and let X = (X1 , X2 )T denote the two-dimensional random vector with coordinates X1 and X2 . Any point of x R2 can 1 be represented in polar coordinates by the vector (r, )T such that r = x = (x2 + x2 ) 2 and 1 2 x1 = tan1 ( x2 ) with values r 0 and 0 < 2. The inverse of this mapping is given by x1 = r cos() x2 = r sin() We endeavor to nd the pdf of the random vector (R, )T , the polar coordinates of X. The pdf of X is given by fX (x) = fX1 (x1 )fX2 (x2 ) = 1 r22 e 2 2 2

The range of the mapping is the set r > 0 and 0 < 2. On the range, x r ( ) =
x1 r x2 r x1 x2

cos() r sin() sin() r cos()

=r

Therefore for (r, )T in the range of the mapping, fR, (r, ) = fX (x) x r r22 = e 2 r ( ) 2 2

Of course fR, (r, ) = 0 o the range of the mapping. The joint density factors into a function of r and a function of , so R and are independent. Moreover, R has the Rayleigh density with parameter 2 , and is uniformly distributed on [0, 2].

25

i i

j U i

2 A2 4 4 i j " i i h U 2 2 e  HTS e  "WHTS i h 2 i j e  e d"WHd TS i 9h U d e  dg  dS VfdS e  e ' 5dS

6 B

  6 #6 B

4 2 5@1 "   #5 &" c  4 2 A@1 I QP  TS    a I X U  U 5b`Y7WHVTS   I X U  U 5 &`Y7WHVTS RQP H " I  

! 0 ") "

4 2 A@1 4 2 531 EC 6 GFDB! 8 6 9)7" (' &%$#"     !  !   


,

1. Show that if then

In the same way

4 2 A@1 %! % !

  ! # A' %

Then

7 6  B' 4 2 5V1 4 2 5V1 c EC 8 6 4 9)7v 2 4 FD 2@ 5716 d! F 0 C 5V1 c C D Fiq w g x vs 8 t BDBpg6i vf vs 8 t q F i rqi qi Fpgx u t r 0 Fwg u f t r c qi Fpg x uvu s t qi Fpg f u u t t i rqi 7 #`I FFpg vf et s 7c qig x QI Fw&Pe E qFpg x uvs i qi u Fwg f v i rqig qi x Fpgye t E FFphPetf s c d) " ! 0
in terms of



2. Express the density .

Answer:

Answer: (a)

of the RV

ELEG636 Homework #1, Spring 2003

4 "! I

! 

d!

6 7 d t

and

if (a)

; (b)

2 2  t w % {t w q g { QI )t w t t t 2 QIPV ! %  ` ! V` 

)t w } q

" 1

)g ' X  (9
Answer: (1) Let

 
;

| '(X w 6 { ! a 6 y Q! t x)dzbB  vt x)7 '  ! %


and

i i

j d U d

i q t! jd Fq g vugt g f e ! i i h Ud r lq t g u t k mfq g vurt! f vs &r ! i h 4 d!

i i i i

d! 4
(b)

2 5@1 4 2 j s" " i nh U 2 j s" F j  TS i nh U i je t TS q i h U i

er t TS  q @fTS e  e ' "ATS

i i i i i

2 j d" po"  X i nh Ud r r 2 g q hf u r g! j q t ! f u r ! ! i h U r i l mq t g f vt q g f u &r u! ! k i h ! j U

Since

3. The RVs

Find the densities of the following RVs:

and

are independent, we have

are independent with exponential densities

ELEG636 Homework #1, Spring 2003

and

`G

1 QI t ) t I QP    1

2 C7 8' CB 8 C 8' XdC 8 2 C '  8 ~ C 8 i 2 C7 8' B 8 C 2 C 7' 8

C T 8  2 ~ g

 r'

~ ~ `o   a ~   2 ` P( X w w dI 4 % I 2 31 t t ~ dS

X Yw 2 I QP q { y g t { z ! t { QI t `I vt w 6 y ! ! t  6 I 6 `I ! BQPB  ! I !   ' e  QP%H' VTS ' e  S GTx#%e

Answer: Let , and . Since and by nding the mean and variance of .

'

'

 

  H

'

`G

4
(2)

4. The RVs

and

are

i

So,

r

Thus,

ELEG636 Homework #1, Spring 2003

and independent. Show that, if

~ C 8

are Gaussian, so

is also Gaussian. We can nd , then

ELEG636 Homework #1, Spring 2003

5. Use the moment generating function, show that the linear transformation of a Gaussian random vector is also Gaussian. Proof: Let be a

real random Gaussian vector, then the density function is

The moment generating function of

is

Using the moment generating function of , we have

(a) Determine and plot the pdf of (b) Determine and plot the pdf of (c) Determine and plot the pdf of (d) Compare the pdf of with that of the Gaussian density.

which has the same form of . So, is also Gaussian. 6. Let be four IID random variables with exponential distribution with

" q ) g q ) g q ) g

e 0 e

C q q ) g 8 C q  8 C } 8

T q !

Then

% s 1 a b 6 E E

H'

'

% !

"

s E E 6 '

Let

be a linear transform of

" 3 s  q d  1  `I q t`q g q t%q g t q C q  8

1 

Let be a

real vector, then the moment generating function of

 q q `q g Q "q %q g @t s   1 Gy t t

~ $BC 8
is = 1.

 ##

1 

~ C 8 

is already obtained, which is

ELEG636 Homework #1, Spring 2003

Since

are i.i.d.,

So,

whose inverse Fourier transform yields the pdf of

This expression holds for any positive integer , including 7. The mean and covariance of a Gaussian random vector are given by, respectively,

Plot the 1 , 2 , and 3 concentration ellipses representing the contours of the density function in the plane. : The radius of an ellipse with major axis a (along ) and minor axis (along ) is given by

where . Compute the 1 ellipse specied by translate each point using the transformation Answer:

and

and then rotate and

U

q X  q wmg  q s & X

s 1

7t s

and

a a dzdT0

1 W2 q g b 0 " #" !  s ! t 7t E E 2 31 q g 1 )rf z! E s q q g g  BC q g ! b 8 )rf ! E

Evaluating both sides by the characteristic functions, we have

q g   rG&&3 # z! 

@1 2 1

)rf

The characteristic function of

is

6 B t )7 6 q q 8 C pg 6 pgs 6 9) g  6 7  D

Answer: Let

E &&&b s 6 6a a

e e

B6 1 6 6 Qa i

a s B 6 6

X s 0  0
( ) is thus

1 zQ7 X 7  # a s 6 6

X s 2 s Q

G`

 q 
So,

l q g q g q s g q s kg t t 7t t 7t t s   q f q 1 t %q g f  &f %q g t t

Let

2 2 1 2 s 2 W2 s 1 6 X $Q 6 6 6 9) a s 6 6

The linear transform

6 s 6

or

0  Q

2 2 1 W2 s 2 W2 s 1 6 X Q 6 6 6

So,

is a rotation of

When the function the ellipses are the same.

The concentration ellipse of

So, the radius of the ellipse is

of the original axes.

ELEG636 Homework #1, Spring 2003

is chosen differently, the gure will be different. But the orientation of

ELEG636 Homework #1, Spring 2003

x2

3 2 1

x1

ELEG636 Test #1, March 25, 1999

NAME:

1. (35 pts) Let y = minfjx1 j; x2 g where x1 and x2 are i.i.d. inputs with cdf and pdf Fx  and fx , respectively. For simplicity, assume fx  is symmetric about 0, i.e., fx x = fx ,x. Determine the cdf and pdf of y in terms of the distribution of the inputs. Plot the pdf of y for fx  uniform on ,1; 1 . Note that Fx x , Fx ,x for x  0 Fjxj x = 0 otherwise

Also Thus,

Fminfx1 ;x2 g x

= 1 , P fx1  xgP fx2  xg = 1 , 1 , Fx x1 , Fx x


1 2

= =

2 2Fx y , Fx ,y , Fx y + Fx yFx ,y for y  0 otherwise Fx y  If fx  is symmetric about 0, then fx x = fx ,x and Fx x = 1 , Fx ,x, giving
Fy y  =

= 1 , 1 , Fjx j y1 , Fx y 1 , 1 , Fx y + Fx ,y1 , Fx y for y  0 1 , 1 , Fx y otherwise


Fy y 
1 2 2

2 2Fx y , 1 , Fx y , Fx y + Fx y1 , Fx y Fx y 

=
Taking the derivative,
fy y 

for y  0 otherwise

2 4Fx y , 2Fx y , 1 Fx y 

for y  0 otherwise for y  0 otherwise

4fx y , 4fx yFx y fx y 

4fxy1 , Fx y fx y 

for y  0 otherwise

ELEG636 Test #1, March 25, 1999

NAME:

2. (35 pts) Consider the observed samples


yi

= + xi

for i = 1; 2; : : : ; N . We wish to estimate the location parameter using a maximum likelihood estimator operating on the observations y1 ; y2 ; : : : ; yN . Consider two cases:

 N 0; 2 , for i = 1; 2; : : : ; N . 2 (10 pts) The xi terms are independent with distribution xi  N 0; i , for i = 1; 2; : : : ; N .
(10 pts) The xi terms are i.i.d. with distribution xi (15 pts) Are the estimates unbiased? What is the variance of the estimates? Are they consistent?
fyj y 
N Y 1 p
1 , yi2,2  = 2 2 2
2

j =

i=1

2

N=2 P ,
e

N yi 2 i=1 2 2

Thus,
M L

= arg max ,
2

N X yi , 2 i=1

and taking the derivative,

N X yi , M L i=1

N 1X = 0  M L = N yi i=1

For the case of changing variances,


N X yi , M L i=1 i

PN y PN i=1 i = 0  M L = PN 1 M L = P=1 wi yi N w
i i
2 2

i=1

i=1

which is a normalized lter, where wi = 12 for i = 1; 2; : : : ; N . For each estimate E f M L g = , and they are thus unbiased.

Since wi 0, we have var M L  N + 1 var M L  N . This, combined with the fact that the estimator is unbiased means the estimate is consistent.

! 9 8 !9 , wi 2= = E PN wi xi 2 = i=1 var M L  N = E f M L , 2 g = E PN w ; : PN wi ; : i i=1 i=1 P PN w x x w g PN w2 2 PN w Ef N i=1 i i i = PNj=1w i2 i j j = P=1 w i2 = PN=1w i2 = PN1 w N  8 PN
i=1 wi yi i=1 i i=1 i i=1 i i=1 i

ELEG636 Test #1, April 14, 2003


1. (30 pts) Probability questions:

NAME:

(15 pts) Let x be a random variables with density fx x given below. Let y the shown function. Determine fy y  and Fy y .

= g x

be

(15 pts) Let x and y be independent, zero mean, unit variance Gaussian random variables. Dene w = x2 + y 2 and z = x2 : Determine fw;z w; z . Are w and z independent? Answer: Note that
fx x =

1 x 4

1 2

x 0 0

, 0:5 , 0:5
y
0

otherwise

x
x

Thus
Fx x =

8
1 2 x 8

p Since x = y for 0  y  1,
Fy y  =

1 ux 2

x 2 2x

0 1

: 8

Fx  y  0
0
1 y 8

y 1 1y
0

: 8

1 u 2

py , 0:5 , 0:25
3 8

y 1 1y
y
0

0
1 y 8

1 uy 2

y 1 1y
0

Taking the derivitive yields




fy y  =

1 8

1 2

y

, 0:25 +
0

y

, 1

otherwise

y1

ELEG636 Test #1, April 14, 2003


Tha Jabobian of the transformation is
J x; y  =

NAME:

dx2 +y2  dx2 +y2  dx dy dx2  dx2  dx dy


=

2x 2x

2y 0

= 4 xy

j j
2

The reverse transformation is easily seen to be x w  z . Thus,


fw;z w; z  = fx;y x; y 
4 xy

p pz and y =  w , x
fx;y x; y 
4 xy

pw , z ,

j j

p x= z p y = w,z
x= y=

j j

x= y=

fx;y x; y 
4 xy

j j

,pz pw , z

fx;y x; y 
4 xy

j j

pz ,pw , z p x=, z p y =, w,z


(1)

Since x and y are independent,


fx;y x; y  =
1 2

,x2 +y2 
2

Thus

1 pz pw , z e,w= uwuzuw , z 2 where the last three terms indicate w; z  0 and w  z .

fw;z w; z  =

ELEG636 Midterm, April 7, 2009

NAME:

1. [30 pts] Probability: (a) [15 pts] Prove the Bienayme inequality, which is a generalization of the Tchebyche inequality, E{|X a|n } P r{|X a| } n for arbitrary a and distribution of X. (b) [15 pts] Consider the uniform distribution over [1, 1]. i. [10 pts] Determine the moment generating function for this distribution. ii. [5 pts] Use the moment generating function to generate a simple expression for the k th moment, mk . Answer: (a)

E{|x a|n } =

|x a|n fx (x)dx
xa|

|x a|n fx (x)dx E{|X


n xa| a|n }

fx (x)dx

= n P r{|x a| } P r{|X a| } (b) (s) = E{xk } = 1 2


1

esx dx =

1 s 2s (e

1 dk (s)

es ) s = 0 s=0

dk s s=0 d(s) 1 s 1 E{x} = = (e + es ) 2 (es es ) ds s=0 2s 2s 1 1 =0 = (es es ) (es es ) 2 4 s=0

s=0

Repeat the dierentiation, limit (lHpitals rule) process. The analytical solution is simpler: E{xk } = 1 2
1

xk dx =
1

1 (1)k+1 = 2(k + 1)

0
1 k+1

k = 1, 3, 5, . . . k = 0, 2, 4, . . .

ELEG636 Midterm, April 7, 2009

NAME:

2 3. [35 pts] Let Z = X +N , where X and N are independent with distributions N N (0, N ) 1 1 and fX (x) = 2 (x 2) + 2 (x + 2).

(a) [15 pts] Determine the MAP, MS, MAE, and ML estimates for X in terms of Z. (b) [10 pts] Determine the bias of each estimate, i.e., determine whether or not each estimate is biased. (c) [10 pts] Determine the variances of the estimates. Answer:
2 2 (a) Since X and N are independent, fZ (z) = fX (z) fN (z) = 1 N (2, N ) + 1 N (2, N ). 2 2 Also 2 fZ|X (z|x) =N (x, N )

xM L = arg max fZ|X (z|x) = z


x 2 fZ|X (z|x)fX (x) N (x, N )((x 2) + (x + 2)) = fX|Z (x|z) = fZ (z) 2fZ (z) 2 z>0 xM AP = arg max fX|Z (x|z) = x 2 z < 0 1 xM S = xfX|Z (x|z)dx = xf (z|x)fX (x)dx fZ (z) Z|X

2 2 2N (2, N )|x=z 2N (2, N )|x=z 2fZ (z) 2 )| 2 N (2, N x=z N (2, N )|x=z =2 2 2 N (2, N )|x=z + N (2, N )|x=z xM AE

1 = 2
xM AE

fX|Z (x|z)dx =

1 fZ (z)

xM AE

fZ|X (z|x)fX (x)dx

xM AE

fZ|X (z|x)fX (x)dx =

1 2 2 N (2, N )|x=z + N (2, N )|x=z 4 1 2 2 N (2, N )|x=z + N (2, N )|x=z 2

2 N (x, N )((x 2)+(x + 2))dx =

Note the LHS is not continuous xM AE not well dened. (b) Note fZ (z) is symmetric about 0 E{M L } = E{z} = 0 xM L is unbiased x (E{x} = 0). Similarly, E{M AP } = 2P r{z > 0} 2P r{z < 0} = 0 xM AP is x unbiased. Also, xM S is an odd function (about 0) of z E{M S } = 0 xM S is x unbiased.
2 2 2 2 2 2 (c) M L = Z = X + N = 4 + N . Also, M AP = 4 (since xM AP = 2). Determining 2 M S is not trivial, and will not be considered.

ELEG636 Homework #1, Spring 2009

1. A token is placed at the origin on a piece of graph paper. A coin biased to heads is given, P (H) = 2/3. If the result of a toss is heads, the token is moved one unit to the right, and if it is a tail the token is moved one unit to the left. Repeating this 1200 times, what is a probability that the token is on a unit N , where 350 N 450? Simulate the system and plot the histogram using 10,000 realizations. Solution: Let x = # of heads. Then 350 x (1200 x) 450 775 x 825 and
825

P r(775x 825) =
i=775

1200 i

2 3

1 3

1200i

which can be approximated using the DeMoivreLaplace approximation


i2 i=i1

n i

(p)i (1 p)ni

i2 np np(1 p)

i1 np np(1 p)

where (x) =

x 1 x2 /2 dx 2 e

2. Random variable X is characterized by cdf FX (x) = (1 ex )U (x) and event C is dened by C = {0.5 < X 1}. Determine and plot FX (x|C) and fX (x|C). Solution: Evaluating P r(X x, 0.5 < X 1) for the allowable three cases x < 0.5 0.5 x 1 x>1 P r(X x, 0.5 < X 1) = 0 P r(X x, 0.5 < X 1) = FX (x) FX (0.5) = e0.5 ex P r(X x, 0.5 < X 1) = FX (1) FX (0.5) = e0.5 e1 = 0.2386

Also, P r(C) = FX (1) FX (0.5) = e0.5 e1 = 0.2386. Thus 0 x < 0.5 P r(X x, 0.5 < X 1) 0.5 x )/0.2386 0.5 x 1 (e e fX (x|C) = = P r(0.5 < X 1) 1 x>1 3. Prove that the characteristic function for the univariate Gaussian distribution, N (, 2 ), is () = exp j 22 2

Next determine the moment generating function and determine the rst four moments.

ELEG636 Homework #1, Spring 2009

Solution: () = 1 (x )2 ejx dx exp 2 2 2 1 (x2 2x + 2 2jx 2 ) = exp dx 2 2 2 1 ( 2 + ( 2 + j 2 )2 (x (x + j 2 )2 exp = exp 2 2 2 2 2 ( 2 + ( 2 + j 2 )2 1 (x (x + j 2 )2 = exp exp 2 2 2 2 2 ( 2 + ( 2 + j 2 )2 = exp 2 2
2 2 2

dx dx

which reduces to () = exp j

. The moment generating function is simple s2 2 2

(s) = exp s + and mk =


dk (s) | , dk s s=0

which yields m2 = 2 + 2 m4 = 3 4 + 6 2 2 + 4

m1 = m3 = 3 2 + 3 4. Let Y = X 2 . Determine fY (y) for: (a) fX (x) = 0.5 exp{|x|}

(b) fX (x) = exp{|x|}U (X) Solution: Y = X 2 X = y and dY /dX = 2X. Thus fY (y) = Substituting and simplifying fX (x) = 0.5 exp{|x|} fX (x) = exp{|x|}U (x) 5. Given the joint pdf fXY (x, y) fXY (x, y) = 8xy, 0 < y < 1, 0 < x < y 0, otherwise
1 fY (y) = e y U (y) 2 y 1 fY (y) = e y U (y) 2 y

fX (x) |2x|

x= y

fX (x) |2x|

x= y

Determine (a) fx (x), (b) fY (y), (c) fY (y|x), and (d) E[Y |x]. Solution: 2

ELEG636 Homework #1, Spring 2009 4x 4x3 0 < x < 1 0 otherwise 4y 3 0 < y < 1 0 otherwise

(a) fX (x) = (b) fY (y) =

fXY (x, y)dy fXY (x, y)dx fXY (x,y) fX (x)

= =

1 x 8xydy y o

8xydx = x<y<1 otherwise

(c) fY (y|x) = (d) E[Y |x] =

2y 1x2

0 =

yfY (y|x)dy

1 2y 2 x 1x2 dy

2 3

1x3 1x2

2 3

1+x+x2 1+x

6. Let W and Z be RVs dened by W = X2 + Y 2 and Z = X2

where X and Y are independent; X, Y N (0, 1). (a) Determine the joint pdf fW Z (w, z). (b) Are W and Z independent? Solution: Given the system of equations J w z x y = 2x 2y 2x 0 = 4|xy|

Note we must have w, z 0 and w z. Thus the inverse system (roots) are y = w z. x = z, Thus fW Z (w, z) = fXY (x, y) x = z 4|xy| y = wz ()

Note also that, since X, Y N (0, 1), fXY (x, y) = 1 x2 +y2 2 e 2 ()

Substituting () into () [which has four terms] and simplifying yields fW Z (w, z) = ew/2 2 z(w z) U (w z)U (z) ( )

Note W and Z are not independent. Counter example proof: Suppose W and Z are independent. Then fW (w)fZ (z) > 0 for all w, z > 0. But this violates ( ), as fW Z (w, z) > 0 only for w z.

ELEG636 Homework #2, Spring 2009

1. Let R= 2 2 2 5

Express R as R = QQH , where is diagonal. Solution: 2 2 2 5 = 2 7 + 6 = 0


1 [1, 2]T 5

1 = 6, 2 = 1
1 [2, 1]T . 5

Than solving Rqi = i qi gives q1 = where Q = [q1 , q2 ]

and q2 = =

Thus R = QQH

and

6 0 0 1

2. The two-dimensional covariance matrix can be expressed as: C=


2 1 1 2

1 2 2 2

(a) Find the simplest expression for the eigenvalues of C.


2 2 (b) Specialize the results to the case 2 = 2 = 2 .

(c) What are the eigenvectors in the special case (b) when is real? Solution: (a)
2 1 1 2 2 1 2 2 2 2 2 2 = 2 (1 + 2 ) + (1 |p|2 )1 2 = 0 4 4 2 2 2 2 1 + 2 21 2 + 4|p|2 1 2 2

=
2 2 (b) For 2 = 2 = 2

2 2 (1 + 2 )

= 3. Let

2 2 2

4|p|2 4

= (1 |p|) 2

x[n] = Aej0 n where the complex amplitude A is a RV with random magnitude and phase A = |A|ej . Show that a sufcient condition for the random process to be stationary is that the amplitude and phase are independent and that the phase is uniformly distributed over [, ]. Solution: First note E{x[n]} = E{A}ej0 n and E{A} = E{|A|}E{ej } = 0 1

ELEG636 Homework #2, Spring 2009

by independence and uniform distribution of . Thus it has a xed mean. Next note E{x[n]x [n k]} = E{|A|2 }ej0 k which is strictly a function of k WSS. 4. Let Xi be i.i.d. RVs uniformly distributed on [0, 1] and dene
20

Y =
i=1

Xi .

Utilize Tchebycheffs inequality to determine a bound for P r{8 < Y < 12}. Solution: Note x = inequality
1 2 2 and x = 1 12 . 2 Thus y = 10 and y = 20 12

= 5 . Utilize Tchebycheffs 3 5 7 = 12 12

P r{|Y y | 2}

y 2

5 12

P r{8 < Y < 12} 1

5. Let X N (0, 2 2 ) and Y N (1, 2 ) be independent RVs. Also, dene Z = XY . Find the Bays estimate of X from observation Z: (a) Using the squared error criteria. (b) Using the absolute error criteria. 6. Let X and Y be independent RVs characterized by fX (x) = aeax U (x) and fY (y) = aeay U (y). Also, dene Z = XY . Find the Bays estimate of X from observation Z using the uniform cost function. Solution: Fz|x (z|x) = P r(xy z|x) = P r(y z/x) = Fy (z/x) fz|x (z|x) = 1 fy (z/x) x

1 x = arg max fz|x (z|x)fx (x) = arg max fy (z/x)fx (x) x 1 az/x ax 1 = arg max ae ae U (x)U (z) = arg max a2 x1 ea(zx +x) U (x)U (z) x 1 1 0 = a2 x2 ea(zx +x) + (a2 x1 ea(zx +x) )(a(1 zx2 )) 0 = x1 a(1 zx2 ) ax2 + x z = 0 1 1 + 4az x= 2a 7. Random processes x[n] and y[n] are dened by x[n] = v1 [n] + 3v2 [n 1] y[n] = v2 [n + 1] + 3v2 [n 1] where v1 [n] and v2 [n] are independent white noise processes, each with variance 0.5. 2

ELEG636 Homework #1, Spring 2008

1. Let fx (t) be symmetric about 0. Prove that is the expected value of a sample distributed according to fx (t). Solution. Since fx (t) is symmetric about 0, fx (t) is even.
+

E[(x )] =
+

tfx (t)dt tfx (t )dt

Let u = t ,
+

E[(x )] =
+

u + fx (u)du
+

ufx (u) du +
odd +

fx (u)du

= 0+

fx (u)du

2. The complimentary cumulative distribution function is dened as Qx (x) = 1 Fx (x), or more explicitly in the zero mean, unit variance Gaussian distribution case as 1 1 exp t2 dt. Qx (x) = 2 2 x Show that Qx (x) 1 1 exp x2 . 2 2x

1 Hint: use integration by parts on Qx (x) = x 2t t exp 1 t2 dt. Also 2 explain why the approximation improves x as increases.

Solution. b Recall integration by parts: a f (t)g (t)dt = f (t)g(t)|b a 1 2 1 Let g (t) = t exp 2 t and f (t) = 2t

b a f

(t)g(t)dt.

Qx (x) =
x

1 1 t exp t2 dt 2 2t 1

ELEG636 Homework #1, Spring 2008 1 1 exp t2 2 2t


x x

1 1 exp t2 dt 2 2 2t 0 as x

1 1 exp x2 2 2x

1 Since x 2t2 exp 1 t2 dt goes to zero as x goes to innity, the ap2 proximation improves x as increase.

3. The probability density function for a two dimensional random vector is dened by fx (x) = Ax2 x2 x1 , x2 0 and x1 + x2 1 1 0 otherwise

(a) Determine Fx (x) and the value of A. (b) Determine the marginal density fx2 (x). (c) Are fx1 (x) and fx2 (x) independent? Show why or why not. Solution. (a)
1 1x1 0 1

Fx1 ,x2 (, ) = = = = = =

Ax2 x2 dx2 dx1 1

x 2 x2 2 2 0 0 1 (1 x1 )2 Ax2 dx1 1 2 0 A 1 4 (x 2x3 + x2 )dx1 1 1 2 0 1 A 60 1 Ax2 1

(1)

Therefore, A = 60. Dening Fx1 ,x2 (u, v) = P r(x1 u, x2 v), we have x1 < 0 or x2 < 0, then F (x1 , x2 ) = 0.

ELEG636 Homework #1, Spring 2008

x1 , x2 0 and x1 + x2 1, then
x1 x2 0

F (x1 , x2 ) =
0

60u2 vdvdu

= 10x3 x2 1 2 0 x1 , x2 1 and x1 + x2 1, then


1x2 1u

F (x1 , x2 ) = 1
0

60u2 vdvdu

1 0

1u

60u2 vdvdu

= 10x2 2

x2 3 20x2 +

15x4 4x5 + 2 2

x1 10x3 1

15x4 + 6x5 1 1 1

0 x1 1 and x2 1, then
1 1u 0

F (x1 , x2 ) = 1
x1

60u2 vdvdu

= 10x3 15x4 + 6x5 1 1 1 0 x2 1 and x1 1, then


1x2 1u

F (x1 , x2 ) = 1
0

60u2 vdvdu

= 10x2 2 x1 , x2 1, then F (x1 , x2 ) = 1. So

x2 3 20x2 +

15x4 4x5 2 2

x1 < 0 or x2 < 0 0 10x3 x2 x1 , x2 0, x1 + x2 1 1 2 10x2 20x3 + 15x4 4x5 + 10x3 15x4 + 6x5 1 0 x , x 1, x + x 1 1 2 1 2 2 2 2 2 1 1 1 F (x1 , x2 ) = 10x3 15x4 + 6x5 0 x1 1, x2 1 1 1 1 10x2 20x3 + 15x4 4x5 0 x2 1, x1 1 2 2 2 2

x1 , x2 1

(b)
1x2

fx2 (x2 ) =

60x2 x2 dx1 1

= 20x2 (1 x2 )3 3

ELEG636 Homework #1, Spring 2008

(c) Since
1x1

fx1 (x1 ) =

60x2 x2 dx2 1

= 30x2 (1 x1 )2 1 , fx1 ,x2 (x1 , x2 ) = fx1 (x1 )fx2 (x2 ). Therefore, fx1 (x1 ) and fx2 (x2 ) are NOT independent. 4. Consider the two independent marginal distributions fx1 (x) = 1 0 x1 1 0 otherwise 2x 0 x2 1 0 otherwise

fx2 (x) = Let A be the event x1 x2 . (a) Find and sketch fx (x). (b) Determine P r{A}.

(c) Determine fx|A (x|A). Are the components independent, i.e., are fx1 |A (x|A) and fx2 |A (x|A) independent? Solution. (a) Since two marginal distributions are independent, fX (X) = fx1 (x1 )fx2 (x2 ) = (b)
1 1x2

2x2 0 x1 , x2 1 0 otherwise

P r(A) =
0 1 0

2x2 dx1 dx2 2x2 dx2 2


1 0

=
0

= =

2x3 2 3 2 3 4

(2)

ELEG636 Homework #1, Spring 2008

(c) fX|A (X|A) = = fX (X) P r(A) 3x2 0 x1 < x2 1 0 otherwise


1

fx1 |A (x1 |A) = = =

3x2 dx2 x1 3x2 1 2 2 x1 3(1 x1 )2 2


x2

0 x1 1

fx2 |A (x2 |A) =

2x2 dx1
0

= 2x2 , 2

0 x2 1

fX|A (X|A) = fx1 |A (x1 |A)fx2 |A (x2 |A). Therefore, fx1 |A (x1 |A) and fx2 |A (x2 |A) are NOT independent. 5. The entropy H for a random vector is dened as E{ln fx (x)}. Show that for the complex Gaussian case H = N (1 + ln ) + ln |Cx |. Determine the corresponding expression when the vector is real. Solution. The complex Gaussian p.d.f. is fx (x) = Then, H = E{ln fx (x)} = E[(x mx )H C1 (x mx )] + N ln + ln |Cx | x 1 N |Cx | exp[(x mx )H C1 (x mx )] x

ELEG636 Homework #1, Spring 2008

Note E[(x mx )H C1 (x mx )] = E[trace((x mx )H C1 (x mx ))] x x = trace(C1 E[(x mx )(x mx )H ]) x = trace(C1 Cx ) x = trace(I) = N Therefore H = N + N ln + ln |Cx | = N (1 + ln ) + ln |Cx | Similarly, when the vector is real H = 6. Let x = 3u 4v y = 2u + v where u and v are unit mean, unit variance, uncorrelated Gaussian random variables. (a) Determine the means and variances of x and y. (b) Determine the joint density of x and y. (c) Determine the conditional density of y given x. Solution. (a) E(x) = E(3u 4v) = 3E(u) 4E(v) = 34 = 1 E(y) = E(2u + v) = 2E(u) + E(v) = 2+1 = 3 6 1 1 N (1 + ln(2)) + ln |Cx | 2 2

ELEG636 Homework #1, Spring 2008

2 x = E(x2 ) E 2 (x)

= E[(3u 4v)2 ] 1 = 25
2 y = E(y 2 ) E 2 (y)

= E[(2u + v)2 ] 9 = 5 (b) Note x y Thus A1 = and fx,y (x, y) = = = fu,v (A1 [x, y]T ) abs |A| 1 fu,v ((x + 4y)/11, (2x + 3y)/11) 11 1 1 x + 4y 2x + 3y exp( [( 1)2 + ( 1)2 ]) 22 2 11 11 1 11 1 4 2 3 = 3 4 2 1
A

u v

(c) Note x is Gaussian fx (x) = Thus fy|x (y|x) = = = fx,y (x, y) fx (x) 2 5 1 x + 4y 2x + 3y 1 exp [( 1)2 + ( 1)2 ] + (x + 1)2 22 2 11 11 2 25 5 2 1 x + 4y 2x + 3y 1 exp [( 1)2 + ( 1)2 (x + 1)2 ] 22 2 11 11 25 1 1 exp (x + 1)2 2 25 2 5

ELEG636 Homework #1, Spring 2008

7. Consider the orthogonal transformation of the correlated zero mean random variables x1 and x2 y1 y2 = cos sin sin cos x1 x2

2 2 Note E{x2 } = 1 , E{x2 } = 2 , and E{x1 x2 } = 1 2 . Determine the 1 2 angle such that y1 and y2 are uncorrelated.

Solution.

y1 = x1 cos + x2 sin y2 = x1 sin + x2 cos E(y1 y2 ) = E[(x1 cos + x2 sin )(x1 sin + x2 cos )] = sin cos E[x2 ] + (cos2 sin2 )E[x1 x2 ] sin cos E[x2 ] 2 1
2 2 = sin cos (2 1 ) + (cos2 sin2 )1 2 2 ( 2 1 ) = sin 2 2 + cos 2 1 2 2

If y1 and y2 are uncorrelated, E(y1 y2 ) = 0. For /2 < /2, = 21 2 1 arctan 2 2 2 2 1

8. The covariance matrix and mean vector for a real Gaussian density are Cx = and mx = 1 0 1 0.5 0.5 1

(a) Determine the eigenvalues and eigenvectors. (b) Generate a mesh plot of the distribution using MATLAB. (c) Change the off-diagonal values to 0.5 and repeat (a) and (b).

ELEG636 Homework #1, Spring 2008

Solution. (a) Solve |Cx I| = 0. (1 )2 0.25 = ( 0.5)( 1.5) = 0 Hence, eigenvalues are 0.5 and 1.5. For = 0.5, the corresponding eigenvector is [1, 1]T . For = 1.5, the corresponding eigenvector is [1, 1]T . (c) Eigenvalues are 0.5 and 1.5. For = 0.5, the corresponding eigenvector is [1, 1]T . For = 1.5, the corresponding eigenvector is [1, 1]T . 9. Let {xk (n)}K be i.i.d. zero mean, unit variance uniformly distributed rank=1 dom variables and set
K

yK (n) =
k=1

xk (n).

(a) Determine and plot the pdf of yK (n) for K = 2, 3, 4. (b) Compare the pdfs to the Gaussian density. (c) Perform the comparison experimentally using MATLAB. That is, generate K sequences of n = 1, 2, . . . , N uniformly distributed samples. Add the sequences and plot the resulting distribution (histogram). Fit the results to a Gaussian distribution for various K and N . Solution. (a) {xk (n)}K are i.i.d. zero mean, unit variance uniformly distributed rank=1 dom variables. 1/2a xk [a, a] fxk (xk ) = 0 otherwise Since E[x2 ] = 1, k E[x2 ] = k 1 2a x3 = 6a a2 = 3 = 1 9
a a a a

x2 dx

ELEG636 Homework #1, Spring 2008

a= That is fxk (xk ) =


1 2 3

xk [ 3, 3] otherwise

For K=2, y2 (n) = x1 (n) + x2 (n). fy2 (x) = fx1 (x) fx2 (x) =
x 1 12 + 23
x 12 + 0 1 2 3

2 3 x < 0 0<x2 3 otherwise

For K=3, y3 (n) = x1 (n) + x2 (n) + x3 (n) = y2 (n) + x3 (n). fy3 (x) = fy2 (x) fx3 (x)
2 (x+3 3) 48 3x2 3

(x3 3)2 48 3

8 3

3 3 x < 3 3x< 3 3x3 3 otherwise

10