MATH 3160, SPRING 2013
HOMEWORK #11—SOLUTIONS
JOHANNA FRANKLIN
This assignment will be due on Wednesday, May 1 at the beginning of class. Remember to
show your reasoning and name the classmates you worked with. Answers without work shown will
receive almost minimal credit.
When calculating probabilities for normal random variables, use the table on p. 201 of your
textbook.
(1) Suppose the joint distribution for X and Y is given by the joint probability mass function
shown below:
Y \X 0 1
0 0 .3
1 .5 .2
(a) Calculate the covariance of X and Y .
Solution. First, we calculate the marginal distributions:
Y \X 0 1
0 0 .3 .3
1 .5 .2 .7
.5 .5
Now we calculate E[XY ], E[X], and E[Y ]:
E[XY ] = (0 · 0) · 0 + (0 · 1) · .5 + (1 · 0) · .3 + (1 · 1) · .2 = .2
E[X] = 0 · .5 + 1 · .5 = .5
E[Y ] = 0 · .3 + 1 · .7 = .7
Therefore, Cov(X, Y ) = E[XY ] − E[X]E[Y ] = .2 − (.5)(.7) = −.15.
(b) Calculate V ar(X) and V ar(Y ).
Solution. We have E[X] and E[Y ] already, so we just need E[X 2 ] and E[Y 2 ]:
E[X 2 ] = 02 · .5 + 12 · .5 = .5
E[Y 2 ] = 02 · .3 + 12 · .7 = .7
Therefore,
V ar(X) = E[X 2 ] − E[X]2 = .5 − (.5)2 = .25
V ar(Y ) = E[Y 2 ] − E[Y ]2 = .7 = (.7)2 = .21
(c) Calculate ρ(X, Y ).
1
2 FRANKLIN
Solution.
Cov(X, Y ) −.15
ρ(X, Y ) = p =p ≈ −.6547
V ar(X)V ar(Y ) (.25)(.21)
(2) Let X and Y be random variables whose joint probability density function is given by
(
x + y 0 < x, y < 1
f (x, y) = .
0 else
(a) Calculate the covariance of X and Y .
Solution. We’ll need E[XY ], E[X], and E[Y ]:
Z 1Z 1 Z 1 2
x x 1
E[XY ] = xy(x + y) dy dx = + dx =
0 0 0 2 3 3
Z 1Z 1 Z 1
x 7
E[X] = x(x + y) dy dx = x2 + dx =
0 0 0 2 12
7
E[Y ] = by symmetry with the E[X] case
12
Therefore, Cov(X, Y ) = E[XY ] − E[X]E[Y ] = 13 − ( 12
7 2 1
) = − 144 .
(b) Calculate V ar(X) and V ar(Y ).
Solution. We need E[X 2 ] and E[Y 2 ]. We get
Z 1Z 1 Z 1
x2
2 2 3 5
E[X ] = x (x + y) dy dx = x + dx =
0 0 0 2 12
5 5
so we know that E[Y 2 ] = 12 by symmetry. Therefore, V ar(X) = V ar(Y ) = 12 −
7 2 11
( 12 ) = 144 .
(c) Calculate ρ(X, Y ).
Solution.
Cov(X, Y ) − 1 1
ρ(X, Y ) = p = q 144 = −
V ar(X)V ar(Y ) 11 11 11
144 144
(3) Suppose that you have a fair 4-sided die,1 and let X be the random variable representing
the value of the number rolled.
(a) Write down the moment generating function for X.
Solution.
1 1 1 1
MX (t) = E[etX ] = e1·t + e2·t + e3·t + e4·t
4 4 4 4
1 1·t
e + e2·t + e3·t + e4·t
=
4
(b) Use this moment generating function to compute the first and second moments of X.
1They do exist; I own one.
MATH 3160, SPRING 2013 HOMEWORK #11—SOLUTIONS 3
Solution. We have
0 1 1·t
e + 2e2·t + 3e3·t + 4e4·t
MX (t) =
4
and
00 1 1·t
e + 4e2·t + 9e3·t + 16e4·t ,
MX (t) =
4
so
0 1 0 5
E[X] = MX (0) = e + 2e0 + 3e0 + 4e0 =
4 2
and
00 1 0 15
E[X 2 ] = MX (0) =e + 4e0 + 9e0 + 16e0 = .
4 2
(4) Let X be a random variable whose probability density function is given by
( −x
e−2x + e 2 x>0
f (x) = .
0 else
(a) Write down the moment generating function for X.
Solution.
∞
e−x
Z
tX tx −2x
MX (t) = E[e ]= e e + dx
0 2
1 1
= + for t < 1
2 − t 2(1 − t)
(b) Use this moment generating function to compute the first and second moments of X.
Solution. We have
0 1 1
MX (t) = +
(2 − t)2 2(1 − t)2
and
00 2 1
MX (t) = 3
+ ,
(2 − t) (1 − t)3
0 (0) =
so E[X] = MX 3
and E[X 2 ] = MX00 (0) = 5 .
4 4
(5) Write a haiku based on something you learned in this class. Let me know if I can share
your answer (anonymously) on the course website. (Remember that a haiku is a three-line
poem with five syllables in the first line, seven syllables in the second line, and five in the
third line. They often contain a seasonal reference, but that isn’t necessary.)
Solution. Answers will, of course, vary. Here’s mine:
Expected value,
Variances, and the skew—
Wait just a moment!
Suggested problems: Chapter 7 Problems: 30-33, 35-38, 45, 55, 58, 75