HW7 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39
At a glance
Powered by AI
The document outlines the reading assignment and written problems for Math 501 Assignment 7 which is due on December 2nd.

The reading assignment includes class notes, sections from the Weiss textbook, and exercises from the Schaum's book by Hwei Hsu.

The written assignment has one exercise with 4 parts related to random vectors.

Math 501 Assignment 7: due Monday 12/2 at 11:59 p.m.

submitted
via Canvas in pdf format

Scoring: This assignment is worth 170 points (20 + 25 + 45 + 10 + 45 + 25


= 170).

1 Academic integrity and collaboration policy


for this assignment
You may work together on the reading assignment, which includes dozens of
solved problems, examples, proofs, detailed discussions, theorems, etc., and you
are encouraged to do so, but you must complete the written assignment entirely
on your own. Learn the material well with the reading assignment; prove you
have learned the material well with the written assignment.
You may consult our TAs or me regarding questions about written exercises
if you have worked hard on them and are very stuck, but you may not consult
anyone else until after all parties have submitted the assignment.
You are to …gure the exercises out entirely on your own.
If you …nd solutions to one or more of the written exercises in Weiss’s book,
in Hsu’s book, or in documents I myself have previously posted to Canvas for
our course this semester, you may make use of them, but the write-up should
be your own, and you must cite the source.
If you …nd solutions to one or more of the written exercises in any source
other than Weiss’s book, Hsu’s book, or documents I myself have previously
posted to Canvas for our course this semester, you may not make use of them
at all, and doing so would be an academic integrity violation.

2 Reading assignment
Class notes: Read the class notes up to and including Chapter 37 on
random vectors (Chapters 1 through 36 were previously assigned.).
Weiss textbook: Sections 6.5, 6.6 (up to and including Proposition 6.20
only), 7.4, 8.6, 8.7, 9.5, 9.6, 10.3, 11.3, 11.4
Schaum’s book (Hwei Hsu): Skip the “notes” (use our notes and Weiss’s
textbook). However, carefully work through exercises 3.2, 3.8, 3.9, 3.12 –
3.23 (all), 3.43, 3.44, 4.1, 4.3 –4.12 (all), 4.17, 4.18, 4.20, 4.21, 4.22, 4.24,
4.29, 4.30. Do not turn these in, but make sure you understand the details
of the calculations and how to solve these exercises. You would need to
show reasoning as given in our class notes, but his examples are excellent
for the calculations.

1
3 Written Assignment (to be turned in)
3.1 Exercise 1 (random vectors) (20 points –5 points per
part)
3.1.1 Exercise part a.
!
Suppose X = (X; Y ) is a random vector on a probability space ( ; F; P ) and
that F!X
is its joint cdf. For which set B (draw a picture of B; or describe it
clearly in words and/or mathematical notation) is it true that
n! o
F!
X
(2; 5) = P X 2 B ?

3.1.2 Exercise part b.


!
Suppose X = (X; Y ) ; where X Exp (5) and Y Exp (8) ; and suppose that
!
X and Y are independent. Find the joint cdf of X :
Hint: A pdf for Exp ( ) random variables is given in our random variables
formula sheet. Substitute = 5 and then = 8 to get pdfs fX and fY of X
and Y; respectively. Then …nd cdfs FX and FY : Recall also that there is a tail
probability formula for exponential random variables which you might …nd very
helpful here. Don’t forget that exponential random variables have pdfs which
are 2-part functions.

3.1.3 Exercise part c.


!
Suppose X = (X; Y ) is a random vector having joint cdf
8
>
> 0; if x < 0 or y < 0
>
>
< 1=4; if 0 x < 1 and 0 y<1
F! (x; y) = 1=2; if 0 x < 1 and y 1 :
X >
>
>
> 1=2; if 0 y < 1 and x 1
:
1; if x 1 and y 1

Use the joint cdf to …nd the marginal cdf of X:


Hint: By de…nition,

F!
X
(x; y) = P (fX xg \ fY yg) :

Letting x ! 1 gives P (fY yg) ; which is just FY (y) ; and letting y ! 1


gives P (fX xg) ; which is just FX (x) :
How do we let x ! 1 (or y ! 1) in a multi-part function? Let’s consider
x ! 1 …rst. We need to consider parts of the function which allow x to become
as large as we wish. The 1st, 4th, and 5th parts of the function de…nition of
F!X
allow this; the other parts are valid only for x 2 [0; 1); and thus become

2
irrelevant as we take the limit as x goes to in…nity. Consider these parts one at
a time.
1st part: suppose y < 0: Then F! X
(x; y) = 0 for all x; and so

FY (y) = lim F!
X
(x; y) = 0:
x!1

4th part: suppose 0 y < 1: Then F!


X
(x; y) = 1=2 for all x 1; and so

FY (y) = lim F!
X
(x; y) = 1=2:
x!1

5th part: suppose y 1: Then F!


X
(x; y) = 1 for all x 1; and so

FY (y) = lim F!
X
(x; y) = 1:
x!1

Thus, 8
< 0; if y < 0
FY (y) = 1=2; if 0 y < 1 :
:
1; if y 1
From this, we can see that P (fY 2 Ag) = 1 for the set A = f0; 1g and that
P (fY = 0g) = 1=2 and P (fY = 1g) = 1=2: Thus, Y is a simple random variable
that takes the values 0 and 1 each with probability 1/2.
In general, the limits above are not simply limits of constants, but the pro-
cedure given above will work anyway.

3.1.4 Exercise part d.


!
Let X = (X; Y ) be as in part c. above. Show that X is discrete, and …nd its
pmf.

3.1.5 Solutions
Solution to a):

F!
X
(2; 5) = P (f(X; Y ) (2; 5)g)
= P (fX 2g \ fY 5g)
= P (fX 2 Bg) ;

where
B = (x; y) 2 R2 : x 2 and y 5 :
Geometrically, B is the southwest region corresponding to the point (2; 5) ;
the set of all points on or to the left of the vertical line x = 2 and simultaneously
on or below the horizontal line y = 5:
Here is another way to describe B: Consider the point (2; 5) 2 R2 : Imagine
the vertical and horizontal lines passing through and meeting at (2; 5) : These
lines partition R2 into four quadrants. The set B is the bottom-left quadrant,
including its boundary edges.

3
Solution to b): Suppose W Exp ( ) for some > 0: For each c 0; we
have Z c
FW (c) = P (fW cg) = 0 dw = 0:
1
c
For each c > 0; the tail probability formula gives P (fW > cg) = e ; and thus
c
FW (c) = P (fW cg) = 1 P (fW > cg) = 1 e :

Now suppose X Exp (5) and Y Exp (8) : Then

0; if a 0
FX (a) = 5a
1 e ; if a > 0
0; if b 0
FY (b) = 8b
1 e ; if b > 0

Since X and Y are independent, the joint cdf is the product of the marginal
cdfs, so
F!X
(a; b) = FX (a) FY (b) for all a; b 2 R:
Therefore,
5a 8b
1 e 1 e ; if a > 0 and b > 0
F! (a; b) = :
X 0; otherwise

Solution to c): Let’s consider y ! 1: We need to consider parts of the


function which allow y to become as large as we wish. The 1st, 3rd, and 5th
parts of the function de…nition of F!
X
allow this; the other parts restrict y 2 [0; 1)
and so are irrelevant as y ! 1: Consider these parts one at a time.
1st part: suppose x < 0: Then F! X
(x; y) = 0 for all y; and so

FX (x) = lim F!
X
(x; y) = 0:
y!1

3rd part: suppose 0 x < 1: Then F!


X
(x; y) = 1=2 for all y 1; and so

FX (x) = lim F!
X
(x; y) = 1=2:
y!1

5th part: suppose x 1: Then F!


X
(x; y) = 1 for all y 1; and so

FX (x) = lim F!
X
(x; y) = 1:
y!1

Thus, 8
< 0; if x < 0
FX (x) = 1=2; if 0 x < 1 :
:
1; if x 1
Solution to d): From FX (from the solution to c)), we can see that P (fX = 0g) =
1=2 and P (fX = 1g) = 1=2 (since the cdf jumps up by 1=2 at each of these

4
points). Thus, X is a simple random variable that takes the values 0 and 1 each
with probability 1/2.
We have
1=2; if x 2 f0; 1g
pX (x) = :
0; otherwise

3.2 Exercise 2 (discrete random vectors) (25 points – 5


points per part)
3.2.1 De…nition of jump set
Suppose X is a random variable, and let FX denote its cdf. Then FX is contin-
uous at a point x if and only if P (fX = xg) = 0; and so it is discontinuous at
a point x if and only if P (fX = xg) > 0: We let

JX = fx : P (fX = xg) > 0g

denote the set of all points x at which FX is discontinuous. Since the only
possible discontinuities for a cdf are jump discontinuities, JX is precisely the set
of points at which the graph of FX jumps. For this reason, we will call JX the
jump set of X:
Since FX is monotonically increasing, it can have only countably many points
of discontinuity, and so JX is always countable, for any X:
Recall that a random variable X is discrete provided there exists a countable
c
set A of real numbers such that P (fX 2 Ag) = 1: Since each point x in JX
satis…es P (fX = xg) = 0; it can be shown that a random variable X is discrete
if and only if P (fX 2 JX g) = 1: Thus, when X is a discrete random variable,
JX is the smallest countable set which contains all the probability of X; if A is
any countable set for which P (fX 2 Ag) = 1; then JX A:

3.2.2 A detailed example


!
Suppose that X = (X; Y ) is a discrete random vector whose joint pmf’s values
are as given by the following table, which gives p(X;Y ) (a; b) for all (a; b) 2
f0; 3g f 1; 1; 4g :
Note that, since these values add up to 1; it follows that p(X;Y ) (a; b) = 0
whenever (a; b) 2
= f0; 3g f 1; 1; 4g :

x=0 x=3
y= 1 1=40 6=40
y=1 3=40 13=40
y=4 8=40 9=40

We will now calculate pX and pY using the joint pmf.

5
First,
X
pX (0) = p(X;Y ) (0; b)
b2R
X
= p(X;Y ) (0; b)
b2f 1;1;4g

= p(X;Y ) (0; 1) + p(X;Y ) (0; 1) + p(X;Y ) (0; 4)


= 1=40 + 3=40 + 8=40 = 12=40:

X
pX (3) = p(X;Y ) (3; b)
b2R
X
= p(X;Y ) (3; b)
b2f 1;1;4g

= p(X;Y ) (3; 1) + p(X;Y ) (3; 1) + p(X;Y ) (3; 4)


= 6=40 + 13=40 + 9=40 = 28=40:
Note that these are positive and add up to 1; which implies that pX (x)
(which is P (fX = xg)) must be 0 if x 2
= f0; 3g : Combining these results, we see
that JX = f0; 3g ; and that
8
< 12=40; if a = 0
pX (a) = 28=40; if a = 3 :
:
0; otherwise
In a similar way (do it yourself for practice), we can …nd that JY = f 1; 1; 4g ;
and that 8
>
> 7=40; if b = 1
<
16=40; if b = 1
pY (b) = :
>
> 17=40; if b = 4
:
0; otherwise
It is not di¢ cult to see that X and Y are dependent. For example, a quick
calculation shows that
8 12 17
p(X;Y ) (0; 4) = 6= = pX (0) pY (4) ;
40 80 40
since 8=40 = 160=800; while (12=80) (17=40) = 51=800: Since it is not the
case that the joint pmf is always the product of the marginal pmfs, the random
variables are dependent.

3.2.3 More background for the assigned exercise


!
Suppose that X = (X; Y ) is a discrete random vector on a probability space
( ; F; P ) and that the function
(1 = 246) (x + 3y) ; if x 2 f0; 1; 2g and y 2 f5; 6; 7; 8g
p! (x; y) =
X 0; otherwise

6
!
is a joint pmf for X :
It is a valid joint pmf since (1 = 246) (x + 3y) 0 whenever x 2 f0; 1; 2g
and y 2 f5; 6; 7; 8g ; and since 0 0 (so that each part of the pmf is always
non-negative), and since

X X2 X 8
1
p!
X
(x; y) = (x + 3y) = 1:
x=0 y=5
246
(x;y)2R2

The event fX = 0g \ fY 2 f5; 6; 7; 8gg can be partitioned as follows:

fX = 0g \ fY 2 f5; 6; 7; 8gg
0 1
[
= fX = 0g \ @ fY = ygA
y2f5;6;7;8g
[
= (fX = 0g \ fY = yg)
y2f5;6;7;8g
8
[
= (fX = 0g \ fY = yg) :
y=5

By the 3rd Kolmogorov axiom,


8
X
P (fX = 0g) = P (fX = 0g \ fY = yg) ;
y=5

which we can write in pmf notation as


8
X X8
1 13
pX (0) = p!
X
(0; y) = (0 + 3y) = :
y=5 y=5
246 41

Similarly,
8
X
pX (1) = p!
X
(1; y) ;
y=5

and so on.
Thus, to …nd pX (a) we …x the …rst component equal to a and we sum the
joint pmf over all y values in f5; 6; 7; 8g (which is JY ). Similarly, to …nd pY (b)
we …x the second component equal to b and we sum the joint pmf over all x
values in f0; 1; 2g (which is JX ).
For instance,
X2
pY (5) = p!
X
(x; 5) ;
x=0

and so on.

7
These formulas follow from the 3rd Kolmogorov axiom, as shown above, but
we can also consider them to be applications of the Fundamental Probability
Formula for discrete random vectors. For instance, pY (5) is P (fY = 5g) ; and
the Fundamental Probability Formula tells us to …nd this by summing the joint
pmf over all values where the y component is set equal to 5:

3.2.4 Exercises
!
For each of these exercises, suppose that X = (X; Y ) is as in the “more back-
ground for the assigned exercise” section above.

a. Find pX (x) for all x:

b. Find pY (y) for all y:

c. Are X and Y independent random variables? Prove your answer.

d. Find P (fY = 3X + 2g) :


Hint: By the Fundamental Probability Formula, this is the sum of the joint
pmf p! X
(a; b) over all (a; b) pairs for which p!
X
(x; y) > 0 and b = 3a + 2: So,
restrict attention to (a; b) pairs with a 2 f0; 1; 2g and b 2 f5; 6; 7; 8g ; and …nd
all such pairs for which b = 3a + 2: Then sum the joint pmf’s values over all
such points.
n o
2
e. Find P Y (X + 3) 2 :
Hint: Use the Fundamental Probability Formula, as in part d., and proceed as
indicated in the hint for part d.

3.2.5 Solutions
Solution to a):
8
X X8
1 39
pX (0) = p!
X
(0; y) = (0 + 3y) = ;
y=5 y=5
246 123
8
X X8
1 41
pX (1) = p!
X
(1; y) = (1 + 3y) = ;
y=5 y=5
246 123
8
X X8
1 43
pX (2) = p!
X
(2; y) = (2 + 3y) = ;
y=5 y=5
246 123
8
X 8
X
pX (a) = p!
X
(a; y) = 0 = 0 if a 2
= f0; 1; 2g :
y=5 y=5

8
Therefore, 8
>
> 39=123; if x = 0
<
41=123; if x = 1
pX (x) = :
>
> 43=123; if x = 3
:
0; otherwise
Solution to b):
2
X X2
1 16
pY (5) = p!
X
(x; 5) = (x + 15) = ;
x=0 x=0
246 82
2
X X2
1 19
pY (6) = p!
X
(x; 6) = (x + 18) = ;
x=0 x=0
246 82
2
X X2
1 22
pY (7) = p!
X
(x; 7) = (x + 21) = ;
x=0 x=0
246 82
2
X X2
1 25
pY (8) = p!
X
(x; 8) = (x + 24) = ;
x=0 x=0
246 82
2
X 2
X
pY (b) = p!
X
(x; b) = 0 = 0 if b 2
= f5; 6; 7; 8g :
x=0 x=0

Therefore, 8
>
> 16=82; if y = 5
>
>
< 19=82; if y = 6
pY (y) = 22=82; if y = 7 :
>
>
>
> 25=82; if y = 8
:
0; otherwise

Solution to c): X and Y are not independent random variables. For example,
15
p!
X
(0; 5) = 0:06097561;
246
while
13 8
pX (0) pY (5) = 0:06186794;
41 41
so it is not the case that the joint pmf is the product of the marginal pmfs at
each point.

9
Solution to d): By the Fundamental Probability Formula,
X
P (fY = 3X + 2g) = p!X
(a; b)
(a;b)2JX JY ; b=3a+2
X
= p!
X
(a; b)
(a;b)2f0;1;2g f5;6;7;8g; b=3a+2

= p!
X
(1; 5) + p!
X
(2; 8)
16 26 42 7
= + = = :
246 246 246 41

Solution to e): By the Fundamental Probability Formula,


n o X
2
P Y (X + 3) 2 = p!X
(a; b)
(a;b)2JX JY ; b (a+3)2 2
X
= p!
X
(a; b)
2
(a;b)2f0;1;2g f5;6;7;8g; b (a+3) 2

= p!
X
(0; 7) + p!
X
(0; 8)
7 8 15
= + = :
82 82 82

3.3 Exercise 3 (discrete random vectors) (45 points – 5


points per part)
3.3.1 Background
The theory of functions g (X) of a discrete random variable X extends in a
!
straight-forward way to functions g (X1 ; X2 ; : : : ; Xn ) (or g X ) of several dis-
crete random variables X1 ; X2 ; : : : ; and Xn (equivalently, of a discrete ran-
! !
dom vector X ). The equivalence is due to the important fact that X =
(X1 ; X2 ; : : : ; Xn ) is a discrete random vector on a probability space if and only
if all of the Xi s are discrete random variables on the same probability space.
Thus, many familiar functions of several discrete random variables will them-
selves represent random variables.
If X is any discrete random variable, its distribution is completely speci…ed
by the countable set of points x for which P (fX = xg) > 0 (i.e., by the set JX ),
and the corresponding probabilities P (fX = xg) for all x in JX : These numbers
are all stored in the pmf pX of X:
We can similarly describe joint pmfs of random vectors by giving the values
of p!X
(!
x):
We have seen that it is possible to go from a joint pmf to marginal pmfs.
The key is to use the Fundamental Probability Formula. That is precisely the
strategy behind …nding the pmf of a function of two or more random variables.
Reread Example 6.23 in the textbook. Work through that example until it
makes complete sense. We will consider a very similar exercise here.

10
3.3.2 Exercises
!
a. Suppose X = (X; Y ) is a discrete random vector (an arbitrary one, not one
of the speci…c ones introduced in this assignment).
Consider an arbitrary number a not in JX : Suppose b is any real num-
ber (possibly in JY ; possibly not in JY ). Fill in the missing reasons (labeled
“why?”):
p(X;Y ) (a; b) = P (fX = ag \ fY = bg)
P (fX = ag) (why?)
= 0 (why?).

!
b. Suppose X = (X; Y ) is a discrete random vector (an arbitrary one, not one
of the speci…c ones introduced in this assignment). Using the idea from part a.,
show that if (a; b) 2
= JX JY then p(X;Y ) (a; b) = 0:
Remark 1 The contrapositive of this statement is quite important. It is that if
p(X;Y ) (a; b) > 0 then (a; b) 2 JX JY : This shows why JX JY is so useful.
It contains all points (a; b) for which p(X;Y ) (a; b) > 0 (as well as possibly some
points for which p(X;Y ) (a; b) = 0), and it is also countable since JX and JY
are countable. The converse of the statement in part b. is false. I.e., it is not
true that if p(X;Y ) (a; b) = 0 then (a; b) 2
= JX JY ; there may indeed be points
(a; b) 2 JX JY for which p(X;Y ) (a; b) = 0:

Instructions for part c) and all later parts of this exercise: For part c)
!
and for all later parts of this exercise, suppose that X = (X; Y ) is a discrete
random vector whose joint pmf’s values are as given by the following table,
which gives p(X;Y ) (a; b) for all (a; b) 2 f0; 3g f 1; 1; 4g :

x=0 x=3
y= 1 1=40 6=40
y=1 3=40 13=40
y=4 8=40 9=40
This random vector was introduced earlier in this assignment. You may use
all results derived about it above without proof and without having to repeat
the same steps. Simply state any results you need which were proven above,
and, as your reasoning, cite the relevant part of the assignment speci…cally.

c. Find
P (fX 1g \ fY > 0g) + P ln (XY + 2) < X 2 Y :

Background for part d): I will now demonstrate the easy process for …nding
the pmf for W = X + Y: The key is to identify the jump set of W and to use

11
the Fundamental Probability Formula to …nd P (fW = wg) for each w 2 JW :
Once we verify that X
P (fW = wg) = 1;
w2JW

it will follow (since that sum equals P (fW 2 JW g)) that W is discrete, and we
will get its pmf right away by setting pW (w) = P (fW = wg) for all w 2 JW
and pW (w) = 0 for all w 2 = JW :
We …rst make a table of all (x; y; w) values where (x; y) 2 JX JY and
w = x + y:
x y w =x+y
0 1 1
0 1 1
0 4 4
3 1 2
3 1 4
3 4 7
The only values of w resulting from (x; y) pairs in JX JY are 1; 1; 2; 4
(which occurs for two di¤erent pairs), and 7; so JW will be f 1; 1; 2; 4; 7g (as
we will soon con…rm).
We now …nd P (fW = wg) for each w 2 f 1; 1; 2; 4; 7g as follows:

P (fW = 1g) = p(X;Y ) (0; 1) = 1=40;


P (fW = 1g) = p(X;Y ) (0; 1) = 3=40;
P (fW = 2g) = p(X;Y ) (3; 1) = 6=40;
P (fW = 4g) = p(X;Y ) (0; 4) + p(X;Y ) (3; 1) = 8=40 + 13=40 = 21=40;
P (fW = 7g) = p(X;Y ) (3; 4) = 9=40:

These do in fact add up to 40=40 = 1; so JW = f 1; 1; 2; 4; 7g ; P (fW 2 JW g) =


1; W is discrete, and
8
>
> 1=40; if w = 1
>
>
>
> 3=40; if w = 1
<
6=40; if w = 2
pW (w) = :
>
> 21=40; if w = 4
>
>
>
> 9=40; if w = 7
:
0; if w 2= f 1; 1; 2; 4; 7g

Exercise for part d): Let X and Y be as above. De…ne Z as follows:

2XY 2 + X
Z= :
jY j

Prove that Z is discrete and …nd its pmf.

12
Hint: Proceed exactly as in my example above. Note that you will not deduce
that Z is discrete until late in your proof (as I did).

Background for part e): When …nding the expected value of a continuous
function Y = g (X) of a discrete random variable, we proceed by examining the
sum X
E (jg (X)j) = jg (x)j pX (x) :
x

Since X is discrete, pX (x) = 0 except for countably many values of x; so if A


is any countable set for which P (fX 2 Ag) = 1 then we can sum over all x in
A: If we know JX (which, for a discrete random variable, is a countable set for
which P (fX 2 JX g) = 1), we can sum over all x in JX :
If we can show that this sum is …nite, then E (g (X)) is well-de…ned, and we
can …nd its value by calculating
X
g (x) pX (x) :
x2JX

I.e., we must check that the sum representing E (g (X)) is absolutely con-
vergent, since in that case we can conclude that E (g (X)) is well-de…ned.
Another –generally much slower –way to …nd this expected value is to …nd
the pmf for Y and use that to …nd E (Y ) by checking to see whether
X
E (jY j) = jyj pY (y) < 1:
y

If it is, then E (Y ) is well-de…ned and is given by


X
E (Y ) = y pY (y) :
y

The original way –what we’ve done primarily –is generally better, but both
methods work.
The same approach works for the expected value of a continuous function
of several discrete random variables. We will sum the function times the joint
pmf and examine it for absolute convergence. We can restrict the sum to values
in the Cartesian product of the jump sets of the component random variables,
since, as we have seen above, the joint pmf is zero otherwise (and adding zeroes
does not a¤ect a sum).
For a discrete random vector with two components, for instance, we proceed
by checking that
X
E (jg (X; Y )j) = jg (x; y)j p(X;Y ) (x; y) < 1:
(x;y)2JX JY

If it is, then E (g (X; Y )) is well-de…ned, and its value is given by


X
E (g (X; Y )) = g (x; y) p(X;Y ) (x; y) :
(x;y)2JX JY

13
We can proceed this way with continuous functions of any …nite number of
component random variables, not just two.
Important: In every case, and for discrete random vectors having any number
of constituent discrete random variables, E is linear since it is de…ned in terms
of sums, which are linear.
I will demonstrate the process for the random variable X as above.
X is a simple random variable, so X has moments and central moments of
all orders. In particular, E (X) is well-de…ned, and we can calculate it quickly
as follows (see above for pX ):
X 12 28 21
E (X) = x pX (x) = 0 +3 = :
40 40 10
x2JX

We could also have checked by direct calculation that E (jXj) < 1; but I
wanted to demonstrate this alternative, faster method.
We can also try to …nd E (X) by using the formula for E (g (X; Y )) with
g (x; y) = x; which is continuous. We …rst check for absolute convergence:

E (jg (X; Y )j)


= E (jXj)
X
= jxj p(X;Y ) (x; y)
(x;y)2JX JY
X
= jxj p(X;Y ) (x; y)
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

= 0 p(X;Y ) (0; 1) + 0 p(X;Y ) (0; 1) + 0 p(X;Y ) (0; 4)


+3 p(X;Y ) (3; 1) + 3 p(X;Y ) (3; 1) + 3 p(X;Y ) (3; 4)
1 3 8 6 13 9
= 0 +0 +0 +3 +3 +3
40 40 40 40 40 40
21
= :
10
Since this is …nite, we have E (jg (X; Y )j) < 1: Note that it was not neces-
sary to complete this calculation, since we had only to show that E (jg (X; Y )j) <
1: It is true that a sum of …nitely many real numbers is always …nite, and so
any …nite sum is absolutely convergent, so we could have simply stated that,
since JX JY is …nite in this case, the sum is a …nite sum, hence absolutely
convergent, and thus E (jg (X; Y )j) < 1:
It follows that E (g (X; Y )) is well-de…ned (with g (x; y) = x), and so we

14
calculate
X
E (X) = x p(X;Y ) (x; y)
(x;y)2JX JY
X
= x p(X;Y ) (x; y)
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

= 0 p(X;Y ) (0; 1) + 0 p(X;Y ) (0; 1) + 0 p(X;Y ) (0; 4)


+3 p(X;Y ) (3; 1) + 3 p(X;Y ) (3; 1) + 3 p(X;Y ) (3; 4)
1 3 8 6 13 9
= 0 +0 +0 +3 +3 +3
40 40 40 40 40 40
21
= :
10
It is not di¢ cult to see why these two methods for calculating E (X) –one
using pX and the other using p(X;Y ) – give the same result; it follows from
algebra.1

Exercise for part e): Proceeding as I did for E (X) ; …nd E (Y ) in two ways:
…rst by using pY (above) and then by using p(X;Y ) (above).

f. Let W be as de…ned above, in the background for part d. Calculate E (W ) by


using the linearity of E and by using the values of E (X) and of E (Y ) calculated
above.

g. Let W be as de…ned above, in the background for part d. Calculate E (W )


by using p(X;Y ) :

h. Calculate
2XY 2 + X
E
jY j
(i.e., E (Z)) in two ways: by using pZ (calculated above) and then by using
p(X;Y ) and proceeding as in part e.
1 There is an easy, quick proof that these two expressions for E (X) are equal:
X
E (X) = x p(X;Y ) (x; y)
(x;y)2JX JY
X X
= x p(X;Y ) (x; y)
x2JX y2JY
2 3
X X
= x 4 p(X;Y ) (x; y)5
x2JX y2JY
X
= x pX (x) :
x2JX

15
i. Calculate
2XY 2 + X
V AR ;
jY j
speci…cally making use of p(X;Y ) and the shortcut formula for variance. Do not
make use of pZ (which also would work –and you can use that method to check
your answer –but is not what is being assigned).
Important: You are speci…cally required to use p(X;Y ) here. It is true that
using pZ would be easier in this particular case, but that is only because we
found pZ above already. In general, when you need to calculate the expected
value or variance of a function of several discrete random variables, you do not
want to start by …nding the pmf for the function of the variables; doing so is
too slow. The fastest way is to use the joint pmf directly, and that’s why I’ve
instructed you to proceed in that way here – to ensure that you practice this
valuable method, which is typically the best method.
Hint: Calculating the variance of a function of several variables is not compli-
cated. The quickest way is usually to use the shortcut formula. In this exercise,
you are to calculate
2XY 2 + X
V AR ;
jY j
2
which is simply V AR (Z) (which equals E Z 2 E (Z) ). Thus, our desired
variance is equal to
2
! 2
2XY 2 + X 2XY 2 + X
E E :
jY j jY j

You already found


2XY 2 + X
E
jY j
above. Now use p(X;Y ) to …nd
2
!
2XY 2 + X
E ;
jY j

and then complete the calculation of the indicated variance.

3.3.3 Solutions
Solution to a): Whenever A B; we have P (A) P (B) : The missing
reasons are as follows:

p(X;Y ) (a; b) = P (fX = ag \ fY = bg)


P (fX = ag) (since fX = ag \ fY = bg fX = ag )
= 0 (since a 2
= JX ).

16
Solution to b): Suppose that (a; b) 2= JX JY : Then either a 2
= JX ; in which
case
p(X;Y ) (a; b) = P (fX = ag \ fY = bg) P (fX = ag) = 0;
or b 2
= JY ; in which case

p(X;Y ) (a; b) = P (fX = ag \ fY = bg) P (fY = bg) = 0:

Probabilities cannot be negative, so we must have p(X;Y ) (a; b) = 0 whenever


(a; b) 2
= JX JY :

Solution to c): The joint pmf is positive only for the points (0; 1) ; (0; 1) ; (0; 4) ; (3; 1) ; (3; 1) ; (3; 4) :
Of those six points, only the points (3; 1) and (3; 4) satisfy X 1 and Y > 0;
so the Fundamental Probability Formula implies that
22
P (fX 1g \ fY > 0g) = p(X;Y ) (3; 1) + p(X;Y ) (3; 4) = :
40
Of those six points, only the points (3; 1) and (3; 4) satisfy ln (XY + 2) <
X 2 Y; so the Fundamental Probability Formula implies that
22
P ln (XY + 2) < X 2 Y = p(X;Y ) (3; 1) + p(X;Y ) (3; 4) = :
40
Therefore,
44
P (fX 1g \ fY > 0g) + P ln (XY + 2) < X 2 Y = :
40

Solution to d): We …rst make a table of all (x; y; z) values where (x; y) 2
JX JY and
2xy 2 + x
z= :
jyj
2
x y z = 2xyjyj+x
0 1 0
0 1 0
0 4 0
3 1 9
3 1 9
3 4 99=4
The only values of z resulting from (x; y) pairs in JX JY are 0; 9; and 99=4;
so JZ will be f0; 9; 99=4g (as we will soon con…rm).

17
We now …nd P (fZ = zg) for each z 2 f0; 9; 99=4g as follows:

P (fZ = 0g) = p(X;Y ) (0; 1) + p(X;Y ) (0; 1) + p(X;Y ) (0; 4) = 12=40;


P (fZ = 9g) = p(X;Y ) (3; 1) + p(X;Y ) (3; 1) = 19=40;
P (fZ = 99=4g) = p(X;Y ) (3; 4) = 9=40;

These do in fact add up to 40=40 = 1; so JZ = f0; 9; 99=4g ; P (fZ 2 JZ g) =


1; Z is discrete, and
8
>
> 12=40; if z = 0
<
19=40; if z = 9
pZ (z) = :
>
> 9=40 if z = 99=4
:
0; if z 2
= f0; 9; 99=4g

Solution to e): Since Y is a simple random variable, Y has …nite expectation,


so E (Y ) is well-de…ned, and we can calculate
X 7 16 17 77
E (Y ) = y pY (y) = ( 1) + (1) + (4) = :
40 40 40 40
y2JY

Since we already veri…ed that Y has …nite expectation, we can also use p(X;Y )
to calculate
X
E (Y ) = y p(X;Y ) (x; y)
(x;y)2JX JY
X
= y p(X;Y ) (x; y)
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

= ( 1) p(X;Y ) (0; 1) + (1) p(X;Y ) (0; 1) + (4) p(X;Y ) (0; 4)


+ ( 1) p(X;Y ) (3; 1) + (1) p(X;Y ) (3; 1) + (4) p(X;Y ) (3; 4)
1 3 8 6 13 9
= ( 1) + (1) + (4) + ( 1) + (1) + (4)
40 40 40 40 40 40
77
= :
40
Another way to see that this latter sum for E (Y ) is absolutely convergent
is to observe that it is a sum of …nitely many real numbers –any sum of …nitely
many real numbers is absolutely convergent.
Alternatively, we can show the calculation:
X
E (jY j) = jyj p(X;Y ) (x; y)
(x;y)2JX JY
1 3 8 6 13 9
= j 1j + j1j + j4j + j 1j + j1j + j4j
40 40 40 40 40 40
91
= < 1:
40

18
Notice that these two calculations for E (Y ) – one using pY and the other
using p(X;Y ) –yield the same result.

Solution to f ): W is simple, so E (W ) is well-de…ned. Since E is linear,


21 77 161
E (W ) = E (X + Y ) = E (X) + E (Y ) = + = :
10 40 40

Solution to g): W is simple, so E (W ) is well-de…ned. Using p(X;Y ) (see above),


we also have
E (W ) = E (X + Y )
X
= (x + y) p(X;Y ) (x; y)
(x;y)2JX JY
X
= (x + y) p(X;Y ) (x; y)
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

= (0 1) p(X;Y ) (0; 1) + (0 + 1) p(X;Y ) (0; 1) + (0 + 4) p(X;Y ) (0; 4)


+ (3
1) p(X;Y ) (3; 1) + (3 + 1) p(X;Y ) (3; 1) + (3 + 4) p(X;Y ) (3; 4)
1 3 8 6 13 9
= ( 1) + (1) + (4) + (2) + (4) + (7)
40 40 40 40 40 40
161
= :
40

Solution to h): In each of these cases, the sums are …nite, hence absolutely
convergent, so E (Z) is well-de…ned and Z has …nite expectation. We …rst
calculate E (Z) using its pmf pZ ; which we found above:
X 12 19 99 9 315
E (Z) = z pZ (z) = 0 +9 + = :
40 40 4 40 32
z2JZ

We next calculate E (Z) using p(X;Y ) : Using the joint pmf,

2XY 2 + X
E
jY j
X 2xy 2 + x
= p(X;Y ) (x; y)
jyj
(x;y)2JX JY
X 2xy 2 + x
= p(X;Y ) (x; y)
jyj
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

1 3 8 6 13 99 9
= (0) + (0) + (0) + (9) + (9) +
40 40 40 40 40 4 40
315
= :
32

19
Solution to i): Using the joint pmf,
2
!
2XY 2 + X
E
jY j
X 2
2xy 2 + x
= p(X;Y ) (x; y)
jyj
(x;y)2JX JY

X 2
2xy 2 + x
= p(X;Y ) (x; y)
jyj
(x;y)2f(0; 1);(0;1);(0;4);(3; 1);(3;1);(3;4)g

1 3 8 6 13 9801 9
= (0) + (0) + (0) + (81) + (81) +
40 40 40 40 40 16 40
112 833
= = 176:3015625:
640

2 2
Since 2XYjY j+X is non-negative everywhere, it equals its own absolute
value, and so
2
! 2
!
2XY 2 + X 2XY 2 + X 112 833
E =E = < 1;
jY j jY j 640

2 2 2
which implies that 2XYjY j+X has a …rst moment, and hence that 2XYjY j+X
has second moments, hence also second central moments (i.e., variance):
2
! 2
2XY 2 + X 2XY 2 + X 2XY 2 + X
V AR = E E
jY j jY j jY j
2
112 833 315
=
640 32
406 539
= = 79:402148:::
5120

3.4 Exercise 4 (absolutely continuous random vectors) (10


points –5 points per part)
3.4.1 Background
Both joint cdfs and joint pdfs store all the probabilistic information for an
absolutely continuous random vector.
Starting from a joint cdf, under certain conditions (which we must check
carefully) we can get a joint pdf by a speci…c procedure that involves partial
di¤erentiation with respect to both x and y:

20
Starting from a joint pdf, we can get a joint cdf by using the Fundamental
Probability Formula.

3.4.2 Exercises
a. Suppose (X; Y ) is an absolutely continuous random vector with joint cdf
8
> 0;1 2
>
>
if x < 0 or y < 1
>
< 10 x y 10 1 2
x + 401 1
xy 2 40 x; if 0 x < 1 and 1 y < 5
2 2 3
F(X;Y ) (x; y) =
> 5 x + 5 x; if 0 x < 1 and y 5 :
>
> 1 2
y + 1
y 1
; if x 1 and 1 y < 5
> 40
: 10 8
1; if x 1 and y 5
(1)
Find a joint pdf of (X; Y ) :
Hint: When the time comes to di¤erentiate (after checking that all the hy-
potheses for our procedure are satis…ed), be sure to di¤erentiate on open regions
(excluding all boundary points!) only, setting f (x; y) = 0 along all boundary
points.
The …nal answer will be
1 1
f (x; y) = 5x + 20 y; if 0 < x < 1 and 1 < y < 5
:
0; otherwise

Of course, you’ll need to do many steps to explain how to get to this point.

b. We now consider the reverse problem: going from a joint pdf to the joint
cdf.
Remember that

F (a; b) = P (fX ag \ fY bg)

is the probability that our random vector (X; Y ) takes a value in the southwest
region determined by the point (a; b) :
To …nd this probability, we use the Fundamental Probability Formula. Specif-
ically, we intersect the southwest region determined by the point (a; b) with the
set ff > 0g of points (x; y) where f (x; y) > 0; and then we integrate the joint
pdf over this intersection. Remember that, whether it is with one or more vari-
ables, there is never a reason to integrate a function over a region where the
function equals zero (the integral over that region will just be zero).
Here is a sample calculation. Suppose 0 a < 1 and b 5: For sake of
de…niteness, imagine the point to be (2=3; 7) ; but it’s really an arbitrary (a; b)
with a 2 [0; 1) and b 2 [5; 1):
On a sheet of paper, we can draw axes and then shade the southwest region
corresponding to the point (a; b) : We can also (in a di¤erent color) shade the
rectangle consisting of all (x; y) pairs for which 0 < x < 1 and 1 < y < 5: The
intersection of these regions is the set of all (x; y) pairs for which 0 < x a and

21
1 < y < 5: Draw a picture to see this. Thus, by the Fundamental Probability
Formula we have
Z aZ 5
1 1 2 3
F (a; b) = x + y dydx = a2 + a;
0 1 5 20 5 5

which agrees with the 3rd line of the joint cdf above (except that I used an x in
that formula above instead of an a; I used an a here so that we could integrate
with respect to x: We cannot use the same letter for two inconsistent purposes
within the same problem).
In the same way, the other formulas can all be derived.
Exercise for part b): …nd a formula for F (a; b) when a 1 and 1 b < 5:
Do so by proceeding as I indicated above. Be sure to include the graph showing
the two shaded regions intersecting to form the region of integration, and write
what the double integral is (showing the function to be integrated and all the
limits of integration), as well as its value (which you may calculate in one step
with your calculator).

3.4.3 Solutions
Solution to a):
Step 1: We will …nd FX (x) and show it is continuous for all real x:
Since
FX (x) = lim F(X;Y ) (x; y) ;
y!1

we need to look at the pieces of F(X;Y ) which permit y to become arbitrarily


large, which are the 1st, 3rd, and 5th branches.
Suppose x < 0: Then

FX (x) = lim F(X;Y ) (x; y) = lim 0 = 0:


y!1 y!1

Suppose 0 x < 1: Then


2 2 3 2 3
FX (x) = lim F(X;Y ) (x; y) = lim x + x = x2 + x:
y!1 y!1 5 5 5 5
Suppose x 1: Then

FX (x) = lim F(X;Y ) (x; y) = lim 1 = 1:


y!1 y!1

Combining these results, we get


8
< 0; if x < 0
2 2
FX (x) = x + 35 x if 0 x < 1 :
: 5
1; if x 1

22
Each piece of this multi-part function is a polynomial, so FX is continuous
on the open intervals ( 1; 0) ; (0; 1) ; and (1; 1) :

lim FX (x) = lim 0 = 0 = FX (0) ;


x!0 x!0
2 2 3
lim FX (x) = lim x + x = 1 = FX (1) ;
x!1 x!1 5 5
so FX is left-continuous at x = 0 and at x = 1: It follows, since every cdf
is always right continuous everywhere, that FX is continuous at the endpoints
x = 0 and x = 1: This and our earlier result show that FX is continuous for all
x:
Step 2: We will …nd FY (y) and show it is continuous for all real y:
Since
FY (y) = lim F(X;Y ) (x; y) ;
x!1

we need to look at the pieces of F(X;Y ) which permit x to become arbitrarily


large, which are the 1st, 4th, and 5th branches.
Suppose y < 1: Then

FY (y) = lim F(X;Y ) (x; y) = lim 0 = 0:


x!1 x!1

Suppose 1 y < 5: Then


1 2 1 1 1 2 1 1
FY (y) = lim F(X;Y ) (x; y) = lim y + y = y + y :
x!1 x!1 40 10 8 40 10 8
Suppose y 5: Then

FY (y) = lim F(X;Y ) (x; y) = lim 1 = 1:


x!1 x!1

Combining these results, we get


8
< 0; if y < 1
1 2 1 1
FY (y) = y + 10 y if 1 y < 5 :
: 40 8
1; if y 5

Each piece of this multi-part function is a polynomial, so FY is continuous


on the open intervals ( 1; 1) ; (1; 5) ; and (5; 1) :

lim FY (y) = lim 0 = 0 = FY (1) ;


y!1 y!1
1 2 1 1
lim FY (y) = lim y + y = 1 = FY (5) ;
y!5 y!5 40 10 8

so FY is left-continuous at y = 1 and at y = 5: It follows, since every cdf is


always right continuous everywhere, that FY is continuous at the endpoints
y = 1 and y = 5: This and our earlier result show that FY is continuous for all
y:

23
Step 3: Let N be the portions of the lines x = 0; x = 1; y = 1; and y = 5
which are in the closed …rst quadrant. At each (x; y) not in N; we are in one of
the open regions determined by replacing each inclusive inequality ( ; ) with
the corresponding strict inequality (<; >). In each such open region, F(X;Y ) is
given by a polynomial expression (a di¤erent one in each region). Polynomials
have continuous partial derivatives of all orders, and the partial derivatives are
polynomials too. It follows that all four of the second-order partial derivatives
of F(X;Y ) exist and are continuous at each point of R2 n N:
Step 4: We may now apply our theorem from class to deduce that (X; Y ) is
absolutely continuous and to …nd a joint pdf of (X; Y ) : The latter task involves
setting f equal to the mixed second order partial derivatives @ 2 =@y@x of F(X;Y )
in each open piece and setting f equal to 0 on N:
Note that
@2 @ @ @
(r (x)) = r (x) = (0) = 0
@y@x @x @y @x
and that
@2 @ @ @
(s (y)) = s (y) = (0) = 0:
@y@x @y @x @y
Thus, the mixed second partials will be 0 unless the function depends on
both x and y; and so we quickly get
(
@2 1 2 1 2 1 2 1
f (x; y) = @y@x 10 x y 10 x + 40 xy 40 x ; if 0 < x < 1 and 1 < y < 5
0; otherwise
1 1
= 5x + 20 y; if 0 < x < 1 and 1 < y < 5
:
0; otherwise

Solution to b): Suppose a 1 and 1 b < 5: On a sheet of paper, we


can draw axes and then shade the southwest region corresponding to the point
(a; b) : Any (a; b) in that region will do, but I always recommend in such cases
that we draw the point away from any boundaries (so, for instance, we might
draw (2; 3)), to make sure we can see clearly what is going on, remembering that
the x value of the point is a (not 2) and that the y value of the point is b (not
3); we simply drew it at the location (2; 3) since we had to draw it somewhere
and since this seems like as a good and generic a location as any other.
We can also (in a di¤erent color) shade the rectangle consisting of all (x; y)
pairs for which 0 < x < 1 and 1 < y < 5: This is where the joint pdf is positive.
The intersection of these regions is the set of all (x; y) pairs for which 0 <
x < 1 and 1 < y b: Draw a picture to see this. Thus, by the Fundamental
Probability Formula we have
Z 1Z b
1 1 1 2 1 1
F (a; b) = x + y dydx = b + b ;
0 1 5 20 40 10 8
which agrees with the 4th line of the joint cdf above (except that I used the
letters a and b here instead of x and y).

24
3.5 Exercise 5 (absolutely continuous random vectors) (45
points –5 points per part)
3.5.1 Background
The theory of functions g (X) of an absolutely continuous random variable X
!
extends in a straight-forward way to functions g (X1 ; X2 ; : : : ; Xn ) (or g X ) of
several absolutely continuous random variables X1 ; X2 ; : : : ; and Xn which are
!
part of an absolutely continuous random vector X :
!
Warning: as in the discrete case, if X = (X1 ; X2 ; : : : ; Xn ) is absolutely con-
tinuous, then each of the Xi s is absolutely continuous. However, unlike in the
discrete case, it is possible for each of the Xi s to be absolutely continuous
!
without X being absolutely continuous; thus, it is possible for there to exist
marginal pdfs fXi for each of the Xi s but for there not to exist a joint pdf for
!
X : A detailed example is given in the class notes.
In light of this warning, we will often restrict attention to functions of ab-
solutely continuous random vectors, or, equivalently, to functions of several
absolutely continuous random variables which together happen to also form an
absolutely continuous random vector (which, as noted in the warning, is not
always true for a collection of absolutely continuous random variables).
Many familiar functions of several absolutely continuous random variables
forming an absolutely continuous random vector will themselves represent ran-
dom variables.
In this exercise, you will end up needing to evaluate several double integrals.
Do not evaluate them by hand unless you have to. Your calculator can do several
of these, and you may use it for the evaluations. However, you must …rst write
out what integration you are going to carry out – indicating the function, the
exact limits of integration, and even the order of integration.
For instance, you might write something like this:

(something)
Z 8 Z 20
= ((1=5) x + cy) dxdy
5 10
= 195c + 90:”

Do not actually write that, since it is not part of the solution to the assigned
homework. However, at least that much detail must be given.

3.5.2 Exercises
For each part below, suppose (X; Y ) is an absolutely continuous random vector
with joint pdf given by

(1=5) x + cy; if 0 < x < 1; 1 < y < 5


f (x; y) = ;
0; otherwise

25
for some constant c:

a. What is the value of c? I.e., what value of c makes f a legitimate joint pdf?
Hint: In order for f to be a legitimate joint pdf, we need f (x; y) 0 for all
x 2 R and y 2 R; and we also need
Z 1Z 1
f (x; y) dydx = 1:
1 1

When evaluating Z Z
1 1
f (x; y) dydx;
1 1
or with the dxdy integral, we can restrict our limits of integration signi…cantly
by removing regions where the joint pdf is 0: You will …nd that c = 1=20: I am
giving you this answer since, without this, you would get all of the remaining
parts of this problem incorrect. You of course need to show all the work used
to …nd it.

b. I will give an example of the process of going from a joint pdf to a marginal
pdf by …nding a pdf for the random variable X above.
From part a. (this result was given in the hint), we have

(1=5) x + (1=20) y; if 0 < x < 1; 1 < y < 5


f (x; y) = :
0; otherwise

If x 2
= (0; 1) ; we have f (x; y) = 0 for all y; and so
Z 1 Z 1
fX (x) = f (x; y) dy = 0 dy = 0:
1 1

If 0 < x < 1; then


Z 1
fX (x) = f (x; y) dy
1
Z 5
x y
= + dy (since f (x; y) = 0 unless y 2 (1; 5) )
1 5 20
4 3
= x+ :
5 5
Putting these together, we get
4
5x + 35 ; if 0 < x < 1
fX (x) = :
0; otherwise

As a quick check (optional, but recommended) we con…rm that (4=5) x + (3=5)


is always non-negative for x 2 (0; 1) ; and we evaluate
Z 1
4 3
x+ dx = 1:
0 5 5

26
Proceeding similarly (and considering cases, as I demonstrated), …nd a mar-
ginal pdf of Y:
Hint: Remember that we integrate functions only over regions where the func-
tion is non-zero; the integral of a function over a region where the function
equals zero is zero.

c. Use the Fundamental Probability Formula to …nd P (fX + Y > 3g) :


Hint: This is simply P (f(X; Y ) 2 Bg) ; where
B = (x; y) 2 R2 : x + y > 3 :
Start by graphing the set B: Do this by graphing the line x + y = 3 and shading
the appropriate side of it (and also decide whether the line is included in B or
not). Then use the Fundamental Probability Formula. You will integrate the
joint pdf over B \ ff > 0g ; the set of all (x; y) in B such that f (x; y) > 0 as
well. As always, it is not necessary to integrate over a region where the function
being integrated is zero, since such integrals equal zero.

d. When …nding the expected value of a continuous function Y = g (X) of an


absolutely continuous random variable, we start by seeing whether
Z 1
E (jg (X)j) = jg (x)j fX (x) dx
1

is …nite or not. If it is, then E (g (X)) is well-de…ned and is given by


Z 1
E (g (X)) = g (x) fX (x) dx:
1

Another –generally much slower –way to …nd this expected value is to …nd
a pdf for Y and use that see whether
Z 1
E (jY j) = jyj fY (y) dy
1

is …nite or not. If it is, then E (Y ) is well-de…ned and is given by


Z 1
E (Y ) = y fY (y) dy:
1

The original way – what we’ve done all along – is generally much easier, but
both methods work.
The same approach works for the expected value of a continuous function of
several absolutely continuous random variables which also form an absolutely
continuous random vector.
For an absolutely continuous random vector with two components, for in-
stance, we proceed by checking whether or not
Z 1Z 1
E (jg (X; Y )j) = jg (x; y)j f(X;Y ) (x; y) dydx
1 1

27
is …nite. If it is, then E (g (X; Y )) is well-de…ned and is given by
Z 1Z 1
E (g (X; Y )) = g (x; y) f(X;Y ) (x; y) dydx:
1 1

We can proceed this way with functions of any …nite number of component
random variables from an absolutely continuous random vector.
Important: In every case, and for absolutely continuous random vectors having
any number of constituent absolutely continuous random variables, E is linear
since it is de…ned in terms of integrals, which are linear.
I will demonstrate the process for the random variable X as above.
Since fx : fX (x) > 0g is contained inside a bounded interval, it follows that
X has moments and central moments of all orders. In particular, E (X) is
well-de…ned, and we can use fX (see above) to calculate
Z 1
4 3 17
E (X) = x x+ dx = :
0 5 5 30

In this case, we could also have checked by direct calculation that E (jXj) <
1; but I wanted to demonstrate this alternative, faster method.
We can also …nd E (X) by …nding E (g (X; Y )) with g (x; y) = x: This
method has the advantage of allowing us to work directly with the joint pdf; it
is not necessary to …rst …nd a marginal pdf for X:
As always, we start by checking for absolute convergence:

E (jg (X; Y )j) = E (jXj)


Z 1Z 5
1 1
= jxj x + y dydx
0 1 5 20
Z 1Z 5
1 1
x + y dydx (since jxj 1 for x 2 (0; 1) )
0 1 5 20
= 1;

which is …nite, and so E (g (X; Y )) (i.e., E (X) in this case) is well-de…ned and
is calculated as follows:
Z 1Z 1
E (X) = x f(X;Y ) (x; y) dydx
1 1
Z 1Z 5
1 1
= x x + y dydx
0 1 5 20
17
= :
30
Using elementary calculus, it is not di¢ cult to see that these two methods for

28
…nding E (X) –one method using fX ; the other using f(X;Y ) –are equivalent2 .
Important: We could also have replaced jxj by x since jxj = x for all x 2 (0; 1) :
However, the method I used is more general, since it would have worked even
if our integral were, say, from x = 10 to x = 4; in which case we would have
used the fact that jxj 10 for all x 2 ( 10; 4) :

Exercise for part d): Proceeding as I did for E (X) ; …nd E (Y ) in two ways:
…rst by using fY (above) and then by using f(X;Y ) (above).

e. Find E 2XY Y2 :

f. Find V AR 2XY Y 2 :
Hint: Use the shortcut formula for variance.

g. Let

B = [0; 1=2] [1; 2]


= (x; y) 2 R2 : 0 x 1=2; 1 y 2 :

This is a rectangle in the x-y plane. Compute

P (f(X; Y ) 2 Bg)

and also
P (fX 2 [0; 1=2]g) P (fY 2 [1; 2]g) :
Use a calculator to calculate the integrals involved. What, if anything, do these
numbers tell us about the independence of X and Y ?
Hint: If X and Y are independent, then

P (f(X; Y ) 2 B1 B2 g) = P (fX 2 B1 g) P (fY 2 B2 g)

whenever B1 and B2 are Borel subsets of R: The contrapositive of this result


tells us that X and Y are dependent if these quantities are unequal. Here,
B1 = [0; 1=2] and B2 = [1; 2] : For each of the three probabilities involved, use
the appropriate Fundamental Probability Formula. The integrations are easy
with a calculator. Give exact answers, though – if you round, you could make
those quantities unequal by rounding even if they are really equal!
2 There is an easy, quick proof that these two expressions for E (X) are equal:
Z 1Z 1
E (X) = x f(X;Y ) (x; y) dydx
1 1
Z 1 Z 1
= x f(X;Y ) (x; y) dy dx
1 1
Z 1
= x fX (x) dx:
1

29
h. Whenever X is a random variable and B is a Borel subset of R; fX 2 Bg
is an event, and therefore we can do everything with it that we could do with
events. For instance,
P (fX > 2g \ fY 5g)
P (fX > 2g j fY 5g) = ;
P (fY 5g)
and so on. More generally,
P (fX 2 Eg \ fY 2 F g)
P (fX 2 Eg j fY 2 F g) =
P (fY 2 F g)
as long as P (fY 2 F g) 6= 0:
Find
P (fX + Y < 3g j fY 2g) :
Hint: draw a picture! Be sure to shade the area over which you will integrate
the joint pdf above (for one of the steps of the solution). It’s a fairly simple
region, so if you get something truly bizarre then you did something wrong.

i. Here, we will study the independence (or lack of it) of X and Y by looking
at pdfs. Since (X; Y ) is an absolutely continuous random vector, X and Y are
independent if and only if
f (a; b) = fX (a) fY (b) (2)
except possibly for a 2-negligible set (i.e., a set having area 0) of (a; b) values.
If (and only if) we can …nd a set of (a; b) values having positive area (i.e., a set
which is not 2-negligible) for which equation (2) fails, it will follow that X and
Y must be dependent. In this problem, you will do precisely that.
If x 2
= (0; 1) then f (x; y) = 0 and also fX (x) = 0: Therefore, f (x; y) =
fX (x) fY (y) ; since both sides are 0:
If y 2
= (1; 5) then f (x; y) = 0 and also fY (y) = 0: Therefore, f (x; y) =
fX (x) fY (y) ; since both sides are 0:
So, we cannot conclude from our work so far that X and Y are independent,
nor can we conclude they are dependent. We must consider the remaining case,
when 0 < x < 1 and 1 < y < 5:
Let T be the rectangle
T = (0; 1) (1; 5) = (x; y) 2 R2 : 0 < x < 1; 1 < y < 5 :
Find a subset T of T having positive area and for which equation (2) fails,
and draw the appropriate conclusion about the independence of X and Y:
Be very clear about what T is, describing it algebraically and also graphing
it. Show that T has positive area, and explain why f (x; y) 6= fX (x) fY (y)
for all (x; y) 2 T :
Hint: For each (x; y) 2 T; we have x 2 (0; 1) and y 2 (1; 5) ; so you can
…nd simple expressions for f (x; y) ; fX (x) ; and fY (y) : Substitute those into
equation (2) to derive the equation
2xy y 6x + 3 = 0:

30
Let A be the set of all (x; y) 2 T for which this equation holds. Then T = T nA
is the set of all (x; y) 2 T for which this equation fails. You will need to graph
T and to …nd its area.
Solving the polynomial equation above for y would be useful, but it cannot
necessarily be done! Doing so would require that we divide both sides of the
equation by 2x 1; which we cannot do unless 2x 1 6= 0: Therefore, consider
the case where 2x 1 = 0 …rst, and then consider the case where 2x 1 6= 0:
This will let you graph A; and then you can easily graph T : Find the area
of T exactly, and be sure to explain why f (x; y) 6= fX (x) fY (y) for each
(x; y) 2 T : Then draw the appropriate conclusion about the independence or
dependence of X and Y:

3.5.3 Solutions
Solution to a): Setting
Z 5 Z 1
x 2
1= + cy dxdy = 12c +
1 0 5 5
gives c = 1=20: We also note that, when c = 1=20; the function f is always
non-negative, since 0 is non-negative, and since
x x y
+ cy = + >0
5 5 20
when 0 < x < 1 and 1 < y < 5: Therefore c = 1=20 (and only this value) makes
f a legitimate pdf.

Solution to b): From part a), we now know that


(1=5) x + (1=20) y; if 0 < x < 1; 1 < y < 5
f (x; y) = :
0; otherwise
If y 2
= (1; 5) ; we have f (x; y) = 0 for all x; and so
Z 1 Z 1
fY (y) = f (x; y) dx = 0; dx = 0:
1 1

If 1 < y < 5; then


Z 1 Z 1
x y 1 1
fY (y) = f (x; y) dy = + dx = y+ :
1 0 5 20 20 10
Putting these together, we get
1 1
fY (y) = 20 y + 10 ; if 1 < y < 5
:
0; otherwise
As a quick check (optional, but recommended) we evaluate
Z 5
1 1
y+ dy = 1:
1 20 10

31
Solution to c): By the Fundamental Probability Formula, we will integrate
the joint pdf over the set B \ ffX;Y > 0g ; where

B = (x; y) 2 R2 : x + y > 3 ;

and ffX;Y > 0g is the rectangle (0; 1) (1; 5) : My suggestion is to draw the
rectangle and shade it with horizontal lines, and then draw the open half-plane
x + y > 3 and shade it with vertical lines, and see where the two regions overlap.
Whether we proceed graphically or algebraically, our region of integration is

B \ ffX;Y > 0g = f(x; y) : x 2 (0; 1) ; y 2 (1; 5) ; y > 3 xg ;

and therefore
Z 1 Z 5
x y 11
P (fX + Y > 3g) = + dydx = :
0 3 x 5 20 15

Solution to d): ffY > 0g = (1; 5) ; which is bounded, so Y has moments and
central moments of all orders. We may therefore calculate
Z 1 Z 5
1 1 49
E (Y ) = y fY (y) dy = y y+ dy =
1 1 20 10 15

and also Z 1Z 5
x y 49
E (Y ) = y + dydx = :
0 1 5 20 15

Solution to e): Note that 2xy y 2 < 106 when 0 < x < 1 and 1 < y < 5; so
Z 1Z 5
x y
E 2XY Y2 106 + dydx = 106 < 1;
0 1 5 20

so E 2XY Y 2 is well-de…ned. It can be evaluated as follows:


Z 1Z 5
x y 124
E 2XY Y2 = 2xy y2 + dydx = :
0 1 5 20 15

Solution to f ): Using a joint pdf of (X; Y ) ; we compute


Z 1Z 5
2 2 2 x y 1609
E 2XY Y = 2xy y2 + dydx = :
0 1 5 20 15

32
2
Since 2XY Y2 is always non-negative, we have

2 2 1609
E 2XY Y2 =E 2XY Y2 = < 1;
15
2
and so 2XY Y 2 has …nite expectation. In particular, 2XY Y 2 has a sec-
ond moment, hence a second central moment (i.e., variance), which we compute
quickly as follows:
2 2
V AR 2XY Y2 = E 2XY Y2 E 2XY Y2
2
1609 124 8759
= = :
15 15 225

Solution to g):

P (f(X; Y ) 2 Bg) = P (f(X; Y ) 2 [0; 1=2] [1; 2]g)


Z 1=2 Z 2
x y
= + dydx
0 1 5 20
1
= :
16
Also,
Z 1=2
4 3 2
P (fX 2 [0; 1=2]g) = x+ dx = ;
0 5 5 5
Z 2
1 1 7
P (fY 2 [1; 2]g) = y+ dy = :
1 20 10 40

We note that
2 7 7 1
P (fX 2 [0; 1=2]g) P (fY 2 [1; 2]g) = = 6= = P (f(X; Y ) 2 [0; 1=2] [1; 2]g) :
5 40 100 16
Thus, X and Y cannot be independent.

Solution to h): We are given that X and Y are absolutely continuous random
variables with joint pdf given by

(1=5) x + (1=20) y; if 0 < x < 1; 1 < y < 5


f (x; y) = :
0; otherwise

Then
P (fX + Y < 3g \ fY 2g)
P (fX + Y < 3g j fY 2g) = :
P (fY 2g)

33
We can calculate P (fY 2g) in several ways. For instance, we can use the
joint pdf above:
Z 1Z 5
x 1 33
P (fY 2g) = + y dydx = :
0 2 5 20 40

Alternatively, we can use the marginal pdf of Y above:


Z 5
1 1 33
P (fY 2g) = y+ dy = :
2 20 10 40

It remains to calculate P (fX + Y < 3g \ fY 2g) : Once again, we use the


Fundamental Probability Formula. We integrate over all (x; y) pairs for which
x + y < 3; y 2; 0 < x < 1; and 1 < y < 5 (we look at the (x; y) pairs for
which the given condition holds and for which the joint pdf is positive, since
integrating over a region where the joint pdf is 0 will simply give 0).
Drawing these regions one at a time, we see that we must integrate the joint
pdf over a triangle (and its interior) having vertices at (0; 2) ; (0; 3) ; and (1; 2) :
We can evaluate the integral as a dydx integral or as a dxdy integral. I will set
both of them up for you.
Z 1Z 3 x
x 1 11
P (fX + Y < 3g \ fY 2g) = + y dydx = :
0 2 5 20 120
Z 3Z 3 y
x 1 11
P (fX + Y < 3g \ fY 2g) = + y dxdy = :
2 0 5 20 120

Finally,

P (fX + Y < 3g \ fY 2g)


P (fX + Y < 3g j fY 2g) =
P (fY 2g)
11=120
=
33=40
1
= :
9
Solution to i): In the problem statement, the rectangle

T = (0; 1) (1; 5) = (x; y) 2 R2 : 0 < x < 1; 1 < y < 5

was de…ned. Let

A = f(x; y) 2 T : f (x; y) = fX (x) fY (y)g ;


B = f(x; y) 2 T : f (x; y) 6= fX (x) fY (y)g :

Since A and B are disjoint, and since their union is all of T; A and B form a
partition of T:

34
For each (x; y) 2 T; we have
1 1
f (x; y) = x + y;
5 20
4 3
fX (x) = x+ ;
5 5
1 1
fY (y) = y+ :
20 10
Thus, (x; y) 2 A if and only if

1 1 4 3 1 1
x+ y = x+ y+
5 20 5 5 20 10
2 3 1 3
= x+ y + xy + :
25 100 25 50
We can rewrite this so as to have a common denominator of 100 :
20 5 8 3 4 6
x+ y= x+ y+ xy + ;
100 100 100 100 100 100
which is true if and only if

20x + 5y = 8x + 3y + 4xy + 6;

which is true if and only if (subtracting 8x + 3y from both sides)

12x + 2y = 4xy + 6;

which is true if and only if (upon division by 2)

6x + y = 2xy + 3;

which is true if and only if (rearranging terms)

2xy y = 6x 3;

which is true if and only if (factoring each side)

(2x 1) y = (2x 1) (3) :

This is true if x = 1=2; since then both sides equal 0:


Suppose x 6= 1=2: Then we may divide both sides by 2x 1 to get the
equation y = 3:
Thus,

A = f(x; y) 2 T : f (x; y) = fX (x) fY (y)g


1
= (x; y) 2 T : x = or y = 3 ;
2

35
and so

B = f(x; y) 2 T : f (x; y) 6= fX (x) fY (y)g


1
= (x; y) 2 T : x 6= and y 6= 3 :
2

The set A consists of two line segments in the rectangle T; and so Area (A) = 0;
which implies that
Area (B) = Area (T ) = 4:
T = B is the desired set (it was given the notation T in the problem
statement). It consists of all ordered pairs (x; y) with x 2 (0; 1=2) [ (1=2; 1) and
y 2 (1; 3) [ (3; 5) :
Since the equation f (x; y) = fX (x) fY (y) is false in a set (i.e., T ) having
positive area, we conclude that X and Y are dependent.

3.6 Exercise 6 (independence of RVs and expected value)


(25 points –5 points per part)
3.6.1 Background
Starting with independent random variables, if we de…ne new random variables
which are functions of mutually exclusive sets of the original random variables,
then the new random variables are also independent. This is the analogue, for
random variables, of a very similar result for events.
Also, whenever the relevant expectations are all de…ned, the expected value
of a product of …nitely many independent random variables is the product of
the expected values.
Whenever X and Y are both random variables de…ned on the same probabil-
ity space, and each having second moments (hence, …nite variances), we de…ne
the covariance of X and Y according to

Cov (X; Y ) = E ((X X ) (Y Y )) ;

where X = E (X) and Y = E (Y ) :


When X = Y; we just get the variance:

Cov (X; X) = E ((X X ) (X X )) = V AR (X) :

3.6.2 Exercises
a. Suppose that X and Y are independent random variables on the same
probability space, each having second moments. Let X 0 = X X and Y =
0

Y Y:
Show that X 0 and Y 0 are independent, and use that fact to give a quick
proof that Cov (X; Y ) = 0:

36
Remark 2 The contrapositive of this result – that if Cov (X; Y ) 6= 0 then X
and Y are dependent – is also extremely important.

b. Suppose that X1 ; X2 ; : : : ; Xn are independent random variables, each having


second moments. Use the result from part a. to show that
X n
X
Cov (Xi ; Xj ) = V AR (Xi ) :
1 i n; i=1
1 j n

c. Suppose that (R; S; T; U; V; W; X; Y; Z) is an absolutely continuous random


vector on a probability space ( ; F; P ) : Recall that this implies, in particular,
that each of the random variables is itself absolutely continuous.
Suppose that R; S; T; U; V; W; X; Y; and Z are independent random variables,
each having …nite expectation, with expected value equal to 5 in each case.
Suppose H is given by

H = 16 RY W 48 RXW + 72 SXW 144 RZW


24 SY W + 216 SZW + 6 RT X 2 RT Y
9 ST X + 18 RT Z + 30 RV X + 3 ST Y
10 RV Y 27 ST Z 45 SV X + 90 RV Z
+15 SV Y 135 SV Z:

Note that here we have H = g (R; S; T; U; V; W; X; Y; Z) ; where g is a poly-


nomial in several variables. g is de…ned and continuous everywhere, so H is a
random variable. Suppose, additionally, that H has …nite expectation.
Calculate E (H) as follows: …rst make use of the linearity of E; and then
make use of the independence of the random variables (remember that subsets
of independent random variables are also independent).

d. Let R; S; T; U; V; W; X; Y; Z; and H be as in part c. It can be shown using


algebra that

H = (2R 3S) (T + 5V 8W ) (3X Y + 9Z) = X1 X2 X3 ;

where the Xi s are the factors of H as given above.


Show that the Xi s are independent, …nd E (Xi ) for each i; and then …nd
E (H) :

e. Suppose that (W; X; Y; Z) is a random vector on a probability space ( ; F; P ) :


Suppose that W; X; Y; and Z have …nite expectation, with E (W ) = 20; E (X) =
2; E (Y ) = 5; and E (Z) = 9:
Calculate
E ( 8W 3X + 5Y 3Z + 5) :

37
3.6.3 Solutions
Solution to a): Since X and Y are independent, and since X 0 and Y 0 are
functions of pairwise disjoint subcollections of X and Y; it follows that X 0 and
Y 0 are also independent.
X 0 and Y 0 must also have second moments, since their second moments are
the central moments of X and Y; respectively, which are de…ned since we are
given that X and Y have second moments.
Thus, since X 0 and Y 0 are independent, we have

E (X 0 Y 0 ) = E (X 0 ) E (Y 0 ) ;

which, upon rewriting in terms of X and Y; is simply

E ((X X ) (Y Y )) = E (X X) E (Y Y ):

The left side of this expression is Cov (X; Y ) : The right side is zero, since
the linearity of E implies that the …rst central moments of X and of Y are each
zero.
Thus, Cov (X; Y ) = 0:

Solution to b): We have


X X X
Cov (Xi ; Xj ) = Cov (Xi ; Xj ) + Cov (Xi ; Xj ) :
1 i n; 1 i n; 1 i n;
1 j n 1 j n; 1 j n;
i=j i6=j

Since X1 ; X2 ; : : : ; Xn are independent random variables, the result from part a)


guarantees that Cov (Xi ; Xj ) = 0 whenever i 6= j; and so the second summand
on the right side of the equation above is simply zero. Thus,
X X
Cov (Xi ; Xj ) = Cov (Xi ; Xj ) :
1 i n; 1 i n;
1 j n 1 j n;
i=j

Finally, Since Cov (X; X) = V AR (X) ; applying this result with X = Xi


for each i = 1; 2; 3; : : : ; n; we get
X n
X
Cov (Xi ; Xj ) = V AR (Xi ) ;
1 i n; i=1
1 j n

as claimed.

Solution to c): Since R; S; T; U; V; W; X; Y; and Z are independent random


variables, each having …nite expectation, and since we are given that H has
…nite expectation, we can calculate E (H) by making use of the linearity of
expected value. Moreover, the additional condition of independence of all of

38
those random variables ensures that the expected value of a product of any
three of them will be the product of the expected values, hence 5 5 5 = 125:
Thus,

E (H) = 16 (125) 48 (125) + 72 (125) 144 (125)


24 (125) + 216 (125) + 6 (125) 2 (125)
9 (125) + 18 (125) + 30 (125) + 3 (125)
10 (125) 27 (125) 45 (125) + 90 (125)
+15 (125) 135 (125)
= 22 (125)
= 2750:

Solution to d): Since X1 ; X2 ; and X3 are each functions of pairwise disjoint


subcollections of independent random variables, they themselves are indepen-
dent. We are assured that the relevant random variables have …nite expectation,
and so we may calculate (making use of independence)

E (H) = E (X1 X2 X3 )
= E (X1 ) E (X2 ) E (X3 ) :

Here,

E (X1 ) = E (2R 3S) = 2E (R) 3E (S) = 2 (5) 3 (5) = 5;


E (X2 ) = E (T + 5V 8W ) = E (T ) + 5E (V ) 8E (W ) = 5 + 5 (5) 8 (5) = 10;
E (X3 ) = E (3X Y + 9Z) = 3E (X) E (Y ) + 9E (Z) = 3 (5) 5 + 9 (5) = 55;

and thus

E (H) = E (X1 ) E (X2 ) E (X3 ) = ( 5) ( 10) (55) = 2750:

Solution to e): Since W; X; Y; and Z each have …nite expectation, and 8W


3X + 5Y 3Z + 5 is an a¢ ne combination of them, it also has …nite expectation,
and so we can use linearity properties of expected value to calculate

E ( 8W 3X + 5Y 3Z + 5)
= 8E (W ) 3E (X) + 5E (Y ) 3E (Z) + 5
= 8 (20) 3 (2) + 5 ( 5) 3 (9) + 5
= 213:

39

You might also like