0% found this document useful (0 votes)
359 views12 pages

Homework 6 Solution

This document contains the solution to Problem Set 6. Problem 1 involves finding various properties of random variables X and Y with a joint probability density function. The properties calculated include the variance of X and Y, the standard deviations of X and Y, the covariance of X and Y, and the correlation of X and Y. Problem 2 indicates the same calculations would be done for X and Y if they had an alternative joint probability density function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
359 views12 pages

Homework 6 Solution

This document contains the solution to Problem Set 6. Problem 1 involves finding various properties of random variables X and Y with a joint probability density function. The properties calculated include the variance of X and Y, the standard deviations of X and Y, the covariance of X and Y, and the correlation of X and Y. Problem 2 indicates the same calculations would be done for X and Y if they had an alternative joint probability density function.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Problem Set 6 Solution

HANU - Faculty of Information and Technology


MAT204: Probability & Statistics
April 10, 2015

Problem 1: [3, Exercise 3.75]


Let X and Y be random variables having joint density function

x + y 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
f (x, y) =
0 otherwise.

Find (a) Var(X), (b) Var(Y ), (c) σX , (d) σY , (e) σXY , (f) ρ.
Solution:
Z +∞ Z +∞ Z 1 Z 1
E(X) = xf (x)dx = xf (x, y)dxdy = x(x + y)dxdy
−∞ −∞ x=0 y=0

1 1 1  1 1
x 3 x2 y
Z Z Z  Z  
2
1 y
= (x + xy)dxdy = + dy = + dy
x=0 y=0 y=0 3 2
x=0 y=0 3 2
1
y y 2 1 1 7
= + = + =
3 4 y=0 3 4
12
Z +∞ Z +∞ Z 1 Z 1
2 2 2
E(X ) = x f (x)dx = x f (x, y)dxdy = x2 (x + y)dxdy
−∞ −∞ x=0 y=0
1 1 1  1 Z 1 
x4 x3 y
Z Z Z  
1 y
= (x3 + x2 y)dxdy = + dy = + dy
x=0 y=0 y=0 4 3
x=0 y=0 4 3
1
y y 2 1 1 5
= + = + =
4 6 y=0 4 6
12
Z +∞ Z +∞ Z 1 Z 1
E(Y ) = yf (y)dy = yf (x, y)dxdy = y(x + y)dxdy
−∞ −∞ x=0 y=0
1 1 1  1 1
y 3 xy 2
Z Z Z  Z  
2
1 x
= (y + xy)dxdy = + dx = + dx
x=0 y=0 x=0 3 2
y=0 x=0 3 2
1
x x2 1 1 7
= + = + =
3 4 x=0 3 4
12
Z +∞ Z +∞ Z 1 Z 1
2 2 2
E(Y ) = y f (y)dy = y f (x, y)dxdy = y 2 (x + y)dxdy
−∞ −∞ x=0 y=0

1
1 1 1  1 1
y 4 xy 3
Z Z Z  Z  
3 2
1 x
= (y + xy )dxdy = + dx = + dx
x=0 y=0 x=0 4 3
y=0 x=0 4 3
1
x x2 1 1 5
= + = + =
4 6 x=0 4 6
12
Z ∞ Z ∞ Z 1 Z 1 Z 1 Z 1
E(XY ) = xyf (x, y)dxdy = xy(x+y)dxdy = (x2 y+xy 2 )dxdy
−∞ −∞ x=0 y=0 x=0 y=0
1  1 Z 1  1
x3 y x2 y 2 y y2 y2 y3
Z  
=1+1=1

= + = + dy = +
y=0 3 2
x=0 y=0 3 2 6 6
y=0 6 6 3

a)
 2
2 5 2 7 11
V ar(X) = E(X ) − [E(X)] = − =
12 12 144

b)
 2
2 5 2 7 11
V ar(Y ) = E(Y ) − [E(Y )] = − =
12 12 144

c) r √
p 11 11
σX = V ar(X) = =
144 12

d) r √
p 11 11
σY = V ar(Y ) = =
144 12

e)   
1 7 7 1
σXY = Cov(X, Y ) = E(XY ) − E(X)E(Y ) = − =−
3 12 12 144

f)
Cov(X, Y ) σXY 1/144 1
p(X, Y ) = Cor(X, Y ) = = = −√ √ =−
σX σY σX σY 11/12 11/12 11

Problem 2: [3, Exercise 3.76]


Work Problem 1 if the joint density function is
 −(x+y)
e x ≥ 0, y ≥ 0
f (x, y) =
0 otherwise.

Solution: Z +∞ Z +∞ Z +∞
E(X) = xf (x, y)dxdy = xe−(x+y) dxdy = 1
−∞ x=0 y=0
Z +∞ Z +∞ Z +∞
E(X 2 ) = x2 f (x, y)dxdy = x2 e−(x+y) dxdy = 2
−∞ x=0 y=0

2
Z +∞ Z +∞ Z +∞
E(Y ) = yf (x, y)dxdy = ye−(x+y) dxdy = 1
−∞ x=0 y=0
Z +∞ Z +∞ Z +∞
E(Y 2 ) = x2 f (x, y)dxdy = y 2 e−(x+y) dxdy = 2
−∞ x=0 y=0
Z +∞ Z +∞ Z +∞ Z +∞
E(XY ) = xyf (x, y)dxdy = xye−(x+y) dxdy = 1
−∞ −∞ x=0 y=0

a)
V ar(X) = E(X 2 ) − [E(X)]2 = 2 − 12 = 1

b)
V ar(Y ) = E(Y 2 ) − [E(Y )]2 = 2 − 12 = 1

c) p √
σX = V ar(X) = 1 = 1

d) p √
σY = V ar(Y ) = 1 = 1

e)
σXY = E(XY ) − E(X)E(Y ) = 1 − 1 = 0

f)
σXY 0
p(X, Y ) = = =0
σX σY 1∗1

Problem 3: [3, Exercise 3.79]


Find (a) the covariance, (b) The correlation coefficient of two random variables X and
Y if E(X) = 2, E(Y ) = 3, E(XY ) = 10, E(X 2 ) = 9, E(Y 2 ) = 16.
Solution:
a)
Cov(X, Y ) = σXY = E(XY ) − E(X)E(Y ) = 10 − 2 ∗ 3 = 4
b) √
V ar(X) = E(X 2 ) − [E(X)]2 = 9 − 22 = 5 ⇒ σX = 5

V ar(Y ) = E(Y 2 ) − [E(Y )]2 = 16 − 32 = 7 ⇒ σY = 7
σXY 4 4
Cor(X, Y ) = p(X, Y ) = =√ √ =√
σX σY 5 7 35

Problem 4: [3, Exercise 3.80]


1
The correlation coefficient of two random variables X and Y is − while their variances
4

3
are 3 and 5. Find the covariance.
Solution:
1
p(X, Y ) = −
4
2

V ar(X) = σX = 3 ⇒ σX = 3

V ar(Y ) = σY2 = 5 ⇒ σY = 5

σXY σXY 1 15
p(X, Y ) = = √ √ = − ⇒ σXY = −
σX σY 3 5 4 4

Problem 5: [3, Exercise 3.81]


Let X and Y have joint density function

x + y 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
f (x, y) =
0, elsewhere.

Find the conditional expectation of (a) Y given X, (b) X given Y .


Solution:
a) 1
Z +∞ Z 1
y 2 1
f1 (x) = f (x, y)dy = (x + y)dy = xy + =x+
−∞ y=0 2 y=0 2
f (x, y) x+y 2(x + y)
f (y|x) = = =
f1 (x) x + 1/2 2x + 1
Z +∞ Z 1
2y(x + y)
E(Y |X) = yf (y|x)dy = dy
−∞ y=0 2x + 1
1
xy 2 2/3y 3 x + 2/3 3x + 2
= + = =
2x + 1 2x + 1 y=0 2x + 1
6x + 3

b) 1
+∞ 1
x2
Z Z
1
f2 (y) = f (x, y)dx = (x + y)dx = + xy = y +
−∞ x=0 2 x=0 2
f (x, y) x+y 2(x + y)
f (x|y) = = =
f2 (y) y + 1/2 2y + 1
Z +∞ Z 1
2x(x + y)
E(X|Y ) = xf (x|y)dx = dx
−∞ x=0 2y + 1
1
x2 y 2/3x3 y + 2/3 3y + 2
= + = =
2y + 1 2y + 1 x=0 2y + 1
6y + 3

Problem 6: [3, Exercise 3.82]


Work Problem 5 if
2e−(x+2y) x ≥ 0, y ≥ 0

f (x, y) =
0, elsewhere.

4
Solution:
a) Z +∞ Z 1
f1 (x) = f (x, y)dy = 2e−(x+2y) dy = e−x
−∞ y=0

f (x, y) 2e−(x+2y)
f (y|x) = = −x
= 2e−2y
f1 (x) e
Z +∞ Z ∞
1
E(Y |X) = yf (y|x)dy = 2ye−2y dy =
−∞ y=0 2

b) Z +∞ Z +∞
f2 (y) = f (x, y)dx = 2e−(x+2y) dx = 2e−2y
−∞ x=0

f (x, y) 2e−(x+2y)
f (x|y) = = = e−x
f2 (y) 2e−2y
Z +∞ Z +∞
E(X|Y ) = xf (x|y)dx = xe−x dx = 1
−∞ x=0

Problem 7: [3, Exercise 3.83]


Let X and Y have the joint probability function given in below table. Find the condi-
tional expectation of (a) Y given X, (b) X given Y .

Solution:
a)
P (X = 0, Y )
P (Y |X = 0) =
P (X = 0)
X 1 1 1 1
P (X = 0) = P (X = 0, Y ) = + + =
y
18 9 6 3

P (X = 0, Y = 0) 1/18 1
P (Y = 0|X = 0) = = =
P (X = 0) 1/3 6

5
P (X = 0, Y = 1) 1/9 1
P (Y = 1|X = 0) = = =
P (X = 0) 1/3 3
P (X = 0, Y = 2) 1/6 1
P (Y = 2|X = 0) = = =
P (X = 0) 1/3 2
X 1 1 1 4
E(Y |X = 0) = y ∗ P (Y |X = 0) = 0 ∗ +1∗ +2∗ =
y
6 3 2 3

Similarly:
X 2 1 2
E(Y |X = 1) = y ∗ P (Y |X = 1) = 0 ∗ +1∗ +2∗ =1
y
5 5 5

X 3 3 1 5
E(Y |X = 2) = y ∗ P (Y |X = 2) = 0 ∗ +1∗ +2∗ =
y
7 7 7 7

X 0 1 2
E(Y |X) 4/3 1 5/7

b)
P (X, Y = 0)
P (X|Y = 0) =
P (Y = 0)
X 1 1 1 1
P (Y = 0) = P (X, Y = 0) = + + =
x
18 9 6 3
P (X = 0, Y = 0) 1/18 1
P (X = 0|Y = 0) = = =
P (Y = 0) 1/3 6
P (X = 1, Y = 0) 1/9 1
P (X = 1|Y = 0) = = =
P (Y = 0) 1/3 3
P (X = 2, Y = 0) 1/6 1
P (X = 2|Y = 0) = = =
P (Y = 0) 1/3 2
X 1 1 1 4
E(X|Y = 0) = x ∗ P (X|Y = 0) = 0 ∗ +1∗ +2∗ =
x
6 3 2 3

Similarly:
X 1 1 1 7
E(X|Y = 1) = x ∗ P (X|Y = 1) = 0 ∗ +1∗ +2∗ =
x
3 6 2 6

X 1 1 1 2
E(X|Y = 2) = x ∗ P (X|Y = 2) = 0 ∗ +1∗ +2∗ =
x
2 3 6 3

Y 0 1 2
E(X|Y ) 4/3 7/6 2/3

6
Problem 8: [3, Exercise 3.84]
Find the conditional variance of (a) Y given X, (b) X given Y for the distribution of
Problem 5.
Solution:
3y + 2
E(X|Y ) =
6y + 3
3x + 2
E(Y |X) =
6x + 3
2(x + y)
f (x|y) =
2y + 1
2(x + y)
f (y|x) =
2x + 1

a)
V ar(Y |X) = E(Y 2 |X) − [E(Y |X)]2
Z +∞ Z 1
2 (3x + 2)2 2 2(x + y) 9x2 + 12x + 4
= y f (y|x)dy − = y dy −
−∞ (6x + 3)2 y=0 2x + 1 (6x + 3)2
1
2/4y 4 + 2/3xy 3 9x2 + 12x + 4 1/2 + 2/3x 9x2 + 12x + 4
= − = −
2x + 1
y=0 (6x + 3)2 2x + 1 9(2x + 1)2
6x2 + 6x + 1
=
18(2x + 1)2

b)
V ar(X|Y ) = E(X 2 |Y ) − [E(X|Y )]2
Z +∞ Z 1
2 (3y + 2)2 2 2(x + y) 9y 2 + 12y + 4
= x f (x|y)dx − = x dy −
−∞ (6y + 3)2 x=0 2y + 1 (6y + 3)2
1
2/4x4 + 2/3yx3 9y 2 + 12y + 4 1/2 + 2/3y 9y 2 + 12y + 4
= − = −
2y + 1
x=0 (6y + 3)2 2y + 1 9(2y + 1)2
6y 2 + 6y + 1
=
18(2y + 1)2

Problem 9: [3, Exercise 3.85]


Work Problem 8 for the distribution of Problem 6.
Solution:
E(X|Y ) = 1
1
E(Y |X) =
2
f (x|y) = e−x
f (y|x) = 2e−2y

7
a)
V ar(Y |X) = E(Y 2 |X) − [E(Y |X)]2
Z +∞  2 Z +∞
1 1
= 2
y f (y|x)dy − = y 2 2e−2y dy −
−∞ 2 y=0 4
1 1 1
= − =
2 4 4

b)
V ar(X|Y ) = E(X 2 |Y ) − [E(X|Y )]2
Z +∞ Z +∞
= 2 2
x f (x|y)dx − 1 = x2 e−x dx − 1
−∞ x=0
=2−1=1

Problem 10: [3, Exercise 3.86]


Work Problem 8 for the distribution of the below table.

Solution:
a)
X 0 1 2
V ar(Y |X) 5/9 4/5 24/49

b)
Y 0 1 2
V ar(X|Y ) 5/9 29/36 5/9

Problem 11: [3, Exercise 3.105]


Let X be a random variable that can take on the values 2, 1, and 3 with respective
probabilities 1/3, 1/6, and 1/2. Find (a) the mean, (b) the variance, (c) the moment
generating function, (d) the characteristic function, (e) the third moment about the
mean.
Solution:

8
x 2 1 3
f (x) 1/3 1/6 1/2

a)
X 1 1 1 7
E(X) = xf (x) = 2 ∗ +1∗ +3∗ =
x
3 6 2 3

b)
X 1 1 1
E(X 2 ) = + 1 2 ∗ + 32 ∗ = 6
x2 f (x) = 22 ∗
x
3 6 2
 2
2 2 7 5
V ar(X) = E(X ) − [E(X)] = 6 − =
3 9

c)
X 1 1 1 et + 2e2t + 3e3t
Mx (t) = E(etx ) = etx f (x) = e2t + et + e3t =
x
3 6 2 6

d)
eiω + 2e2iω + 3e3iω
ϕx (t) = E(eitx ) =
6

e)
µ3 = E[(X − µ)]3 = E(X 3 − 3X 2 µ + 3Xµ2 − µ3 )
= µ03 − 3µ02 µ + 3µ3 − µ3 = µ03 − 3µ02 µ + 2µ3
1 1 1 49
µ03 = E(X 3 ) = 23 ∗ + 13 ∗ + 33 ∗ =
3 6 2 3
 3
49 7 7 7
⇒ µ3 = −3∗6∗ +2 =−
3 3 3 27

Problem 12: [3, Exercise 3.106]


Work Problem 11 if X has density function

c(1 − x) 0 < x < 1
f (x) =
0 otherwise
where c is an appropriate constant.
Solution: Z +∞ 1
1
cx2
Z
F (x) = f (x)dx = c(1 − x)dx = cx −
−∞ x=0 2 x=0
c c
=c− = =1⇒c=2
2 2

2(1 − x) 0 < x < 1
f (x) =
0 otherwise

a) 1
+∞ 1
2x3
Z Z
22 1
E(X) = xf (x)dx = 2x(1 − x)dx = x − =1− =
−∞ x=0 3 x=0
3 3

9
b)
+∞ 1
1
2x3 x4
Z Z
2 2 2 1 12
E(X ) = x f (x)dx = 2x (1 − x)dx = − = − =
−∞ x=0 3 2 x=0 3 2
6
 2
1 2 2 1 1
V ar(X) = E(X ) − [E(X)] = − =
6 3 18

c)
+∞ 1
2(et − 1 − t)
Z Z
tx tx
Mx (t) = E(e ) = e f (x)dx = etX 2(1 − x)dx =
−∞ x=0 t2

d)
−2(eiω − 1 − iω)
ϕx (t) = E(eitx ) =
ω2

e)
µ3 = E(X − µ)3 = µ03 − 3µ02 µ + 2µ3
Z 1 1
0 3 3 x4 2x5 1
µ3 = E(X ) = 2x (1 − x)dx = − =
x=0 2 5 x=0 10

 3
1 1 1 1 1
⇒ µ3 = −3∗ ∗ +2 =
10 6 3 3 135

Problem 13: [3, Exercise 3.109]


Let X and Y have joint density function

cxy 0 < x < 1, 0 < y < 1
f (x, y) =
0 otherwise

Find (a) E(X 2 + Y 2 ), (b) E( X 2 + Y 2 ).
Solution: Z +∞ Z +∞ Z 1 Z 1
F (x, y) = f (x, y)dxdy = cxydxdy
−∞ −∞ x=0 y=0
Z 1
1 Z 1
1
c 2 c c 2 c
= xy dy = ydy = y = =1⇒c=4
y=0 2 x=0 y=0 2 4 Y =0 4

a)
Z 1 Z 1 Z 1 Z 1
2 2 2 2
E(X + Y ] = (x + y )f (x, y)dxdy = 4(x2 + y 2 )xydxdy
x=0 y=0 x=0 y=0

Z 1 Z 1 Z 1
1
3 3 4
2 3
= (4x y + 4xy )dxdy = x y + 2x y dy
x=0 y=0 y=0 x=0
1
1
y 2 1 4
Z
1 1
3
= (y + 2y )dy = + y = + =1
y=0 2 2 y=0 2 2

10
b)
p Z 1 Z 1 p Z 1 Z 1 p
2 2
E( (X + Y ) = 2 2
(x + y )f (x, y)dxdy = 4 (x2 + y 2 )xydxdy
x=0 y=0 x=0 y=0

Z 1
1 Z 1
2 2

2 3/2 4 h 3/2 3/2 i
=2 y(x + y ) dy = y 1 + y2 − y2 dy
y=0 3 x=0 y=0 3
1 √
2 2 2 5/2 4 5 4 √ 8 8(2 2 − 1)
= ∗ (1 + y ) − y = ∗4 2− =
3 5 15 y=0 15 15 15

11
References
[1] Walpole, R. E., Myers, R. H., Myers, S. L. and Ye, K., Probability &
Statistics for Engineers & Scientists, 9th ed., MA, USA: Prentice-Hall, 2012.

[2] DeGroot, M. H. and Schervish, M. J., Probability and Statistics, 4th ed., MA,
USA: Pearson Education, Inc., 2012.

[3] Murray, R. S., John, J. S. and R, A. Srinivasan, Probability and Statistics,


3rd ed., USA: McGraw-Hill, 2009.

12

You might also like