You are on page 1of 22

3.

1 Joint and Marginal Distributions

SECTION 3: MULTIVARIATE PROBABILITY DISTRIBUTIONS


In Section 2, we examined random variables one at a time. In this section, we will review
multiple random variables simultaneously. Although the concepts presented in this section
can be extended to any number of random variables, we will develop the concepts using just
two random variables. This section is heavily tested in Exam P, so it is very important that
you master the concepts and work through numerous practice problems.

3.1 Joint and Marginal Distributions


3.1.1 Joint Probability Mass Functions and Joint Probability Density Functions

Similar to the definition in Section 2, random variables can be discrete or continuous. If


X and Y are discrete random variables and fX,Y (x, y) is the joint probability function of
(X, Y ), then
0 ≤ fX,Y (x,y) ≤ 1 (3.1.1)

!!
fX,Y (x,y) = 1 (3.1.2)
all x all y

For discrete random variables, fX,Y (x,y) refers to the probability that X = x and Y = y,
i.e. Pr(X = x ∩ Y = y). From the first condition, we see that fX,Y (x,y) has to be between 0
and 1. The second condition states that the sum of fX,Y (x,y) over all values of x and y has
to be 1. These two conditions go hand in hand because in order for the sum of all probabili-
ties to equal 1, each individual probability has to be non-negative and less than or equal to 1.

If X and Y are continuous random variables, and fX,Y (x,y) is the joint density function of
(X, Y ), then
0 ≤ fX,Y (x,y) (3.1.3)

" ∞ " ∞
fX,Y (x,y) dy dx = 1 (3.1.4)
−∞ −∞

For continuous random variables, fX,Y (x,y) is not required to be less than 1; we only require
that it be non-negative. The double integral of fX,Y (x,y) over its domain has to equal 1.
This is analogous to the double summation in the discrete case.

Note that fX,Y (x,y) is not a probability; it is only the joint density function evaluated at
x and y used to find probability. So, it is okay for fX,Y (x,y) to be greater than 1 at some
points as long as condition 3.1.4 is met.

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 303
3.1 Joint and Marginal Distributions

Example 3.1.1

Let X and Y be discrete random variables with the joint probability function given by the
following table:

X
1 2 3
0 0 0.30 0.20
Y
1 0.10 0.15 0.25

Find
(i) Pr(X + Y = 2)
(ii) Pr(X + Y > 2)

Solution:

Note that the probabilities given in the table are joint probabilities, fX,Y (x,y). To answer
the first question, go through the six probabilities in the table and choose the ones where
X + Y = 2. There are two of them: fX,Y (2,0) and fX,Y (1,1). Thus,

Pr(X + Y = 2) = fX,Y (2,0) + fX,Y (1,1) = 0.30 + 0.10 = 0.40

For the second question, use the same technique, but choose the probabilities where X +Y >
2. There are three of them: fX,Y (2,1), fX,Y (3,0), and fX,Y (3,1). So,

Pr(X + Y > 2) = fX,Y (2,1) + fX,Y (3,0) + fX,Y (3,1) = 0.15 + 0.20 + 0.25 = 0.60

Example 3.1.2

Let X and Y be random variables with the joint density function

fX,Y = e−(x+y) for x > 0 and y > 0

Find Pr(X + Y < 2).

Solution:

Step 1: Draw a diagram that satisfies all of the constraints.

For this kind of question, it is a good idea to sketch the region that satisfies all the constraints.
In this case, the constraints would be x > 0, y > 0, and x + y < 2. Figure 3.1.1 shows this
region.

P Study Manual (3rd Edition 2nd Printing)


304 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

"

!#
#"#
" % $#

$$$
! " # !
Figure 3.1.1
Step 2: Choose one variable for the outer integral.

To calculate the desired probability, double-integrate over this region. Then, choose one
variable for the outer integral.

If we choose x, then the limits of the outer integration would be the minimum and maximum
value of x in the region. From the diagram, the minimum value of x is 0 and the maximum
value of x is 2. Thus, the lower limit is 0 and the upper limit is 2.
! 2"! #
Pr(X + Y < 2) = fX,Y (x,y) dy dx
0

Likewise, if we choose y, then the limits of the outer integration would be the minimum and
maximum value of y in the region, which are 0 and 2, respectively.
! 2"! #
Pr(X + Y < 2) = fX,Y (x,y) dx dy
0

Both integrals will produce the same answer, but the variable chosen for the outer inte-
gration will determine the order of integration; so choose the variable that will not require
separating the region of integration, if possible.

Step 3: Determine the limits of the inner integral.

The third step is to define the rest of the integral. The variable for the inner integral will
automatically be the variable not chosen for the outer integral. For example, if we chose X
for the outer integral, then the inner integral will be with respect to y.

To determine the limits of integration when the integration is on y, draw a line parallel to
the y-axis that cuts across the region of integration, as shown in Figure 3.1.2. The limits are
the y-coordinates of the intersection points of the vertical line that was just drawn and the
top and bottom bounds of the region.

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 305
3.1 Joint and Marginal Distributions

"

#
"$%$#$− !

!#
#"#
" %$#

$$$
! "$%$! " # !
Figure 3.1.2

In this example, the lower limit is y = 0 because the vertical line intersects the lower bound
at 0. Similarly, the upper limit is y = 2 − x because the vertical line intersects the upper
bound at 2 − x. Since the vertical line can be drawn at any arbitrary location within the
range of values of x, always express the y-coordinates in terms of x, or the variable chosen
for the outer integral.
! 2"! # ! 2"! 2−x #
Pr(X + Y < 2) = fX,Y (x,y) dy dx = fX,Y (x,y) dy dx
0 0 0

On the other hand, if we chose y for the outer integral, then the inner integral will be for
the variable x. In this case, draw a line parallel to the x-axis that cuts across the region,
shown below in Figure 3.1.3.

"

!#
#"#
" %$#

!$%$! !$%$#$−$"

$$$
! " # !
Figure 3.1.3

Determine the limits of integration in the exact same way as before except the limits are
now the x-coordinates of the intersection points of the horizontal line and the left and right

P Study Manual (3rd Edition 2nd Printing)


306 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

bounds of the region, expressed in terms of y. In this example, the horizontal line intersects
the left bound at x = 0 and the right bound at x = 2 − y.
! 2"! # ! 2"! 2−y #
Pr(X + Y < 2) = fX,Y (x,y) dx dy = fX,Y (x,y) dx dy
0 0 0

Step 4: Evaluate the double integral.

The last step is to evaluate the double integral. There are 2 possible orders of integration,
dy dx or dx dy. Regardless, always start with the inner integral and work outwards. We will
start with the dy dx case.
! 2"! 2−x #
Pr(X + Y < 2) = fX,Y (x,y) dy dx
0 0
! 2"! 2−x #
−(x+y)
= e dy dx
0 0
! 2
$ −(x+y) %y=2−x
= −e y=0
dx
0
! 2
$ −(x+2−x)
+ e−(x+0) dx
%
= −e
!0 2
& −2
−e + e−x dx
'
=
0
%x=2
= −e x − e−x x=0
$ −2

= −2e−2 − e−2 − 0 − e−0


& ' & '

= 1 − 3e−2

Notice that the dx dy case produces the same answer.


! 2"! 2−y #
Pr(X + Y < 2) = fX,Y (x,y) dx dy
0 0
! 2"! 2−y #
−(x+y)
= e dx dy
0 0
! 2
$ −(x+y) %x=2−y
= −e x=0
dy
0
! 2
$ −(2−y+y)
+ e−(0+y) dy
%
= −e
!0 2
& −2
−e + e−y dy
'
=
0
%y=2
= −e y + e−y y=0
$ −2

= −2e−2 − e−2 − 0 − e−0


& ' & '

= 1 − 3e−2

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 307
3.1 Joint and Marginal Distributions

3.1.2 Joint Cumulative Distribution Functions

In general, regardless of the nature of the probability or density function, the joint cumulative
distribution function (CDF) of random variables X and Y is defined as

FX,Y (x,y) = Pr [(X ≤ x) ∩ (Y ≤ y)] (3.1.5)

If X and Y are discrete random variables, then:

x y
! !
FX,Y (x,y) = fX,Y (s,t) (3.1.6)
s=−∞ t=−∞

In words, the joint CDF is the double summation of the joint density function over all pairs
of values of s and t that are less than or equal to x and y. If X and Y are continuous random
variables, then:
" x " y
FX,Y (x,y) = fX,Y (s,t) dt ds (3.1.7)
−∞ −∞

In the continuous case, the double integral is analogous to the double summation. We in-
tegrate over all values of s and t below x and y, respectively. Note that we can switch the
order of integration and integrate with respect to s first.

Important Properties of Joint CDFs

There are a few properties that joint CDFs have to satisfy. Some are similar to those for
single-variable CDFs, while others are specific to joint CDFs.

1. The joint CDF evaluated at any point (x,y) is a probability that has to be between 0
and 1
0 ≤ FX,Y (x,y) ≤ 1 (3.1.8)

2. The joint CDF evaluated at negative infinity for both variables is 0, because it is the
probability of X and Y both being less than negative infinity, which is impossible. On
the other hand, the joint CDF evaluated at positive infinity for both variables is 1,
because it is the probability of X and Y both being less than positive infinity, which
is always true.
FX,Y (−∞, − ∞) = 0 (3.1.9)

FX,Y (∞,∞) = 1 (3.1.10)

P Study Manual (3rd Edition 2nd Printing)


308 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

3. When the value of one of the variables of the joint CDF is positive infinity, the proba-
bility of that variable is 1 and the joint CDF simplifies to a single-variable CDF of the
other variable.
FX,Y (x,∞) = Pr [(X ≤ x) ∩ (Y ≤ ∞)]
= Pr(X ≤ x)
= FX (x) (3.1.11)

FX,Y (∞, y) = Pr [(X ≤ ∞) ∩ (Y ≤ y)]


= Pr(Y ≤ y)
= FY (y)
4. When the value of one of the variables is negative infinity, the probability of that
variable is 0, and the joint CDF becomes zero as well.
FX,Y (−∞, y) = 0 (3.1.13)

FX,Y (x, − ∞) = 0 (3.1.14)


5. In the continuous case, determine the CDF from the density function using double
integration with respect to x and y. Undo the integration to get the density function
from the CDF with a second-order partial derivative with respect to x and y.
∂2
FX,Y (x,y) = fX,Y (x,y) (3.1.15)
∂x∂y
Example 3.1.3

Let X and Y be discrete random variables with the joint CDF, FX,Y (x,y), given by the
following table:
X
1 2 3
0 0.10 0.15 0.23
Y 1 0.25 0.32 0.52
2 0.45 0.56 1

Find Pr [(2 < X ≤ 3) ∩ (1 < Y ≤ 2)].

Solution:

Remember the probabilities given are cumulative, so we cannot simply choose probabilities
and add them like if we were given the joint probability function.

For this kind of question, it is a good idea to sketch a diagram, as shown in Figure 3.1.4.
The desired probability is represented by the shaded square.

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 309
3.1 Joint and Marginal Distributions

"
#

"

###
! " # $ !

Figure 3.1.4

To determine this probability, begin with FX,Y (3,2) as shown in Figure 3.1.5.

"
#

"

###
! " # $ !

Figure 3.1.5

Then, subtract FX,Y (2,2) and FX,Y (3,1) from FX,Y (3,2) (see Figure 3.1.6 and Figure 3.1.7).

" "
# #

" "

### ###
! " # $ ! ! " # $ !

Figure 3.1.6 Figure 3.1.7

At this point, we have subtracted the region defined by FX,Y (2,1) (shown in pale gray in
Figure 3.1.8) twice. So we need to add it back.

"
#

"

###
! " # $ !

Figure 3.1.8

P Study Manual (3rd Edition 2nd Printing)


310 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

The expression for Pr [(2 < X ≤ 3) ∩ (1 < Y ≤ 2)] is therefore

FX,Y (3,2) − FX,Y (2,2) − FX,Y (3,1) + FX,Y (2,1) = 1 − 0.56 − 0.52 + 0.32 = 0.24

Example 3.1.4

The joint CDF of X and Y is:

4 1 4
FX,Y (x,y) = 1 − 2
− 3 + 2 3, x > 2, y > 1
x y xy

Find Pr [(4 < X ≤ 5) ∩ (3 < Y ≤ 6)].

Solution:

Method 1: Integrating joint density

The first method is longer and it involves determining the joint density function using a
second-order partial derivative (Equation 3.1.15). The order in which we differentiate the
joint CDF does not matter because we will end up with the same joint density function.

∂2
! "
∂ 3 12 24
fX,Y (x,y) = FX,Y (x,y) = − = , x > 2, y > 1
∂x∂y ∂x y 4 x2 y 4 x3 y 4

The desired probability is the integral of the joint density function over the region of inte-
gration, which is the shaded rectangular region shown in Figure 3.1.9.
# 5# 6
Pr [(4 < X ≤ 5) ∩ (3 < Y ≤ 6)] = fX,Y (x,y) dy dx
4 3
# 5# 6
24
= 3 4
dy dx
4 3 x y
# 5$ %y=6
8
= − 3 3 dx
4 x y y=3
# 5! "
8 8
= − 3 3 + 3 3 dx
4 x (6 ) x (3 )
$ %5
4 4
= −
216x2 27x2 4
! " ! "
4 4 4 4
= − − −
216(25) 27(25) 216(16) 27(16)
≈ 0.0029

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 311
3.1 Joint and Marginal Distributions

"
%

! " # !

Figure 3.1.9

Method 2: Using cumulative probabilities

The second method involves using the same technique as in Example 3.1.3. The probability
we are calculating is represented by the shaded region in Figure 3.1.9.

Begin with FX,Y (5,6), then subtract FX,Y (4,6) and FX,Y (5,3), then add back FX,Y (4,3) be-
cause it was subtracted twice.

These steps are shown in Figure 3.1.10, Figure 3.1.11, Figure 3.1.12, and Figure 3.1.13.

" "
& &

% %

""" """
! """ """ """ # $ ! ! """ """ """ # $ !

Figure 3.1.10 Figure 3.1.11


" "
& &

% %

""" """
! """ """ """ # $ ! ! """ """ """ # $ !

Figure 3.1.12 Figure 3.1.13

P Study Manual (3rd Edition 2nd Printing)


312 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

Now, calculate the probability as follows:


! "
4 1 4
FX,Y (5,6) = 1 − 2 − + ≈ 0.8361
5 63 (52 )(63 )
! "
4 1 4
FX,Y (4,6) = 1 − 2 − + ≈ 0.7465
4 63 (42 )(63 )
! "
4 1 4
FX,Y (5,3) = 1 − 2 − + ≈ 0.8089
5 33 (52 )(33 )
! "
4 1 4
FX,Y (4,3) = 1 − 2 − + ≈ 0.7222
4 33 (42 )(33 )

Pr [(4 < X ≤ 5) ∩ (3 < Y ≤ 6)] = F (5,6) − F (4,6) − F (5,3) + F (4,3)


≈ 0.8361 − 0.7465 − 0.8089 + 0.7222
= 0.0029

3.1.3 Marginal Distributions


For a set of n random variables and a subset of these variables, the marginal distribution of
the subset of variables is the probability density function of the variables contained in the
subset. The basic idea is that we extract the density function of a subset of the variables
from the joint density function of all of the variables.

Specifically, for two random variables X and Y , the marginal distribution of X is the proba-
bility density function of X, while the marginal distribution of Y is the density function of Y .

The joint density function of X and Y contains information on the probabilities of x and
y jointly occurring. So, if we want the density function of just one of the variables, say X,
then combine fX,Y (x, y) over all y, for each value of x. If we want the density function of Y ,
combine fX,Y (x, y) over all x, for each value of y.

If X and Y are discrete random variables, then the marginal distributions of X and Y are:
#
fX (x) = fX,Y (x,y) (3.1.16)
all y
#
fY (y) = fX,Y (x, y) (3.1.17)
all x

In the discrete case, combine fX,Y (x, y) by taking the sum over the variable for which we are
not determining the marginal distribution.

If X and Y are continuous random variables, then the marginal distributions of X and Y
are: $ ∞
fX (x) = fX,Y (x,y) dy (3.1.18)
−∞

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 313
3.1 Joint and Marginal Distributions

! ∞
fY (y) = fX,Y (x,y) dx (3.1.19)
−∞

In continuous case, combine fX,Y (x,y) by taking the integral over the variable for which we
are not determining marginal distribution

The important thing to remember is to always combine the other variable: in the discrete
case, take the sum, in the continuous case, integrate.

Example 3.1.5

Let X and Y be discrete random variables with the joint probability function given by the
following table:

X
1 2 3
0 0 0.30 0.20
Y
1 0.10 0.15 0.25

Find the marginal probability function of X.

Solution:

There are three possible values of x; so we need to calculate Pr(X = 1), Pr(X = 2), and
Pr(X = 3) by adding fX,Y (x,y) over the two possible values of y, for each of the three values
of x.
"
Pr(X = 1) = fX (1) = fX,Y (1,y) = fX,Y (1,0) + fX,Y (1,1) = 0 + 0.10 = 0.10
all y
"
Pr(X = 2) = fX (2) = fX,Y (2,y) = fX,Y (2,0) + fX,Y (2,1) = 0.30 + 0.15 = 0.45
all y
"
Pr(X = 3) = fX (3) = fX,Y (3,y) = fX,Y (3,0) + fX,Y (3,1) = 0.20 + 0.25 = 0.45
all y

Therefore, ⎧


⎪ 0.10, x = 1

fX (x) = 0.45, x = 2


⎩0.45, x = 3

Notice that we are essentially summing the columns in the table. Normally, we would sum
the columns or rows depending on how the variables are presented. If we wanted the marginal
probability function of Y , then we would sum the rows.

P Study Manual (3rd Edition 2nd Printing)


314 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

It is a good idea to perform a check by adding all the probabilities in the marginal probability
function to see if they add to 1. If they do not, then there is a mistake in the calculations.

!
Check: fX (x) = fX (1) + fX (2) + fX (3) = 1
all x

Example 3.1.6

Let X and Y be continuous random variables with the joint density function

⎨3(1 − x + y), 0 ≤ x ≤ y ≤ 1 − x
fX,Y (x,y) =
⎩ 0, otherwise

Find the marginal densities of X and Y , fX (x) and fY (y).

Solution:

Step 1: Draw a diagram that satisfies all the constraints.

When dealing with joint density functions of continuous random variable, it is worth taking
time to sketch the region defined by the domain of the joint density, because it is the basis
for the integration that often follows. The region of interest is bounded by x ≥ 0, y ≥ x and
y ≤ 1 − x, as shown in Figure 3.1.14.

"

$
%!
"%&

!"#
"%&
%$
%−
%!

! !"# $ !

Figure 3.1.14

Step 2: Determine the limits of integration.

Determine the marginal density of X, fX (x), which we integrate over all possible values of
y. To determine the limits of integration, draw a line parallel to the y-axis across the region
(see Figure 3.1.15).

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 315
3.1 Joint and Marginal Distributions

"

$
"#&%$%'#! #!
" #&

!"#
"%&
%$
%−
%!
"#&#!

! !"# $ !

Figure 3.1.15

The point where the vertical line intersects the lower bound (y = x) is the lower limit of the
integral, while the point where the vertical line intersects the upper bound (y = 1 − x) is
the upper limit.
! 1−x
fX (x) = 3(1 − x + y) dy
x

Step 3: Evaluate the integral.

When calculating the marginal density of x, we substitute the limits into y, not x, after
evaluating the integral because we integrate with respect to y.

#y=1−x
y2 9
"
fX (x) = 3 y − xy + = 6x2 − 12x + , 0 ≤ x ≤ 0.5
2 y=x 2

Notice that the marginal density can only involve the variable x. It cannot involve any
other variables. Notice from Figure 3.1.15 that x ranges from 0 to 0.5 within the region of
domain, which is why the domain of X is from 0 to 0.5. As a check, integrate the marginal
distribution over its domain to see if we get 1.

0.5 $ %
9
! !
2
fX (x) dx = 6x − 12x + dx = 1
0 2

Go through the same sequence of steps to calculate the marginal density of Y . First, draw
a line parallel to the x-axis cutting across the region. However, there are two possible lines
because the function defining the right bound of the region changes at x = 0.5, as shown in
Figure 3.1.16.

P Study Manual (3rd Edition 2nd Printing)


316 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

"

$
%!
!%&%$%− " "%&
!%&%!

!"#
"%&
%$
!%&%! !%&%" %−
%!

%%%
! !"# $ !

Figure 3.1.16
This is an indication to split the integration into two. The first integral is valid from y = 0
to y = 0.5, and the second is valid from y = 0.5 to y = 1.

Second, for the first integral, the horizontal line intersects the left bound at x = 0 which
becomes the lower limit, and intersects the right bound at x = y which becomes the upper
limit. Do the same for the second integral, except the upper limit is x = 1 − y.
⎧ % y
3(1 − x + y) dx, 0 ≤ y ≤ 0.5



fY (y) = 0
% 1−y
3(1 − x + y) dx, 0.5 < y ≤ 1



0
Third, after integrating, substitute the limits of integration into x instead.
'x=y
x2
⎧ & ⎧
y2
( )

⎪ 3 x − + xy , 0 ≤ y ≤ 0.5 ⎪
⎨ 3 y+
⎪ , 0 ≤ y ≤ 0.5
2

fY (y) = x=0
x=1−y = 2
x2 3
& '
⎩3 x − + xy , 0.5 < y ≤ 1 ⎩ (1 − y)(1 + 3y), 0.5 < y ≤ 1

⎪ ⎪

2 x=0 2

Again, notice that the marginal density of Y only involves y. To check for mistakes integrate
both parts of the marginal density over their respective domain and see if they add to 1.

3.1.4 Joint Moments


The concept of joint moments is the extension of the concept of moments in the one-variable
case.

Previously, when we considered one-variable probability distributions, we calculated the


E[g(X)] by first multiplying g(x) with fX (x), then summing over all x in the discrete case,
or integrating over all x for the continuous case.
*
Discrete case: E[g(X)] = g(x) · Pr(X = x) (3.1.20)
all x

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 317
3.1 Joint and Marginal Distributions

! ∞
Continuous case: E[g(X)] = g(x) · fX (x) dx (3.1.21)
−∞

In the context of two-variable probability distributions, we add another dimension. We have


a function g(x,y) instead, which we multiply with the joint probability or density function
fX,Y (x,y).

Then, sum or integrate over all x and all y, depending on whether the variables are discrete
or continuous.
""
Discrete case: E[g(X,Y )] = g(x,y) · fX,Y (x,y) (3.1.22)
all x all y

! ∞ ! ∞
Continuous case: E[g(X,Y )] = g(x,y) · fX,Y (x,y) dy dx (3.1.23)
−∞ −∞

Example 3.1.7

Let X and Y be discrete random variables with the joint probability function given by the
following table:

X
1 2 3
0 0 0.30 0.20
Y
1 0.10 0.15 0.25

Find E[X].

Solution:

Method 1: Calculating moment using marginal distribution

One way to calculate the expected value is to determine the marginal probability function of
X using techniques from Section 3.1.3, and then calculate the moment like in the one-variable
case.

Pr(X = 1) = fX,Y (1,0) + fX,Y (1,1) = 0 + 0.10 = 0.10


Pr(X = 2) = fX,Y (2,0) + fX,Y (2,1) = 0.30 + 0.15 = 0.45
Pr(X = 3) = fX,Y (3,0) + fX,Y (3,1) = 0.20 + 0.25 = 0.45




⎪ 0.10, x = 1

fX (x) = 0.45, x = 2


⎩0.45, x = 3

P Study Manual (3rd Edition 2nd Printing)


318 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

!
E[X] = x · Pr(X = x)
all x
= 1 · Pr(X = 1) + 2 · Pr(X = 2) + 3 · Pr(X = 3)
= 1(0.10) + 2(0.45) + 3(0.45)
= 2.35

Method 2: Calculating moment using formula

Another way to calculate the expected value is to use double summation directly without
finding the marginal probability function first. In other words, we are using Equation 3.1.22,
where g(X) = X. Multiply g(X) with fX,Y (x,y) and add all six possibilities.
!!
E[X] = x · fX,Y (x,y)
all x all y

= 1 · f (1,0) + 1 · f (1,1) + 2 · f (2,0) + 2 · f (2,1) + 3 · f (3,0) + 3 · f (3,1)


= 1(0) + 1(0.10) + 2(0.30) + 2(0.15) + 3(0.20) + 3(0.25)
= 2.35

Notice that the values of x are repeated in multiple factors to account for the different values
of y for each value of x.

If we factor out the equal values of x, we would get


!!
E[X] = x · fX,Y (x,y)
all x all y

= 1 [f (1,0) + f (1,1)] + 2[f (2,0) + f (2,1)] + 3[f (3,0) + f (3,1)]


= 1 · fX (1) + 2 · fX (2) + 3 · fX (3)
!
= x · fX (x)
all x

Essentially, the marginal probability function calculations are embedded in the expected
value calculations. Thus, the two methods to solve this problem are equivalent.

Example 3.1.8

Let X and Y be discrete random variables with the joint probability function given by the
following table:

X
1 2 3
0 0 0.30 0.20
Y
1 0.10 0.15 0.25

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 319
3.1 Joint and Marginal Distributions

Y
Find E[ X ].

Solution:

The same two methods used in Example 3.1.7 can be applied in this example. However, the
Y
probability function for X is more difficult to determine because there are more values to
consider. It is easier to use the double summation method.

Y
In this example, gX,Y (X,Y ) = X
. Logically, we multiply gX,Y (x,y) times fX,Y (x,y) and sum
all six possibilities.

! " ##
Y y
E = · fX,Y (x,y)
X all x all y
x
$ % $ % $ % $ % $ % $ %
0 0 0 1 1 1
= f (1,0) + f (2,0) + f (3,0) + f (1,1) + f (2,1) + f (3,1)
1 2 3 1 2 3
1 1
= 0 + 0 + 0 + 1(0.10) + (0.15) + (0.25)
2 3
≈ 0.2583

Example 3.1.9

Let X and Y be random variables with the joint density function



⎨2(x + y), 0 ≤ y ≤ x ≤ 1
f (x,y) =
⎩ 0, otherwise

Find E[Y ].

Solution:

Method 1: Calculating moment using marginal distribution

The first method to calculate E[Y ] is to find the marginal density of Y , and then determine
the expected value in a similar process that was performed for one-variable density functions.
Remember from Section 3.1.3 that we integrate over all possible values of x to determine the
marginal density of Y .

In this case, x is defined between y and 1; so integrate the joint density function from y to
1, and substitute the limits into x.

P Study Manual (3rd Edition 2nd Printing)


320 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

! 1
fY (y) = 2(x + y) dx
y
#x=1
x2
"
=2 + xy
2 x=y
2
= 1 + 2y − 3y , 0≤y≤1

The domain of fY (y) is 0 ≤ y ≤ 1 rather than 0 ≤ y ≤ x because the variable x has been
evaluated and removed from the joint density function. Thus, the only variable remaining
is y.

Another way to determine the limits of integration is to sketch a diagram of the domain by
combining the inequalities y ≥ 0, y ≤ x, and x ≤ 1, as shown in Figure 3.1.17.

"

"

"!$!!

!!
" #$

#
!!! "!$!# " !

Figure 3.1.17

To calculate E[Y ], integrate y · fY (y) with respect to y over the domain of fY (y).
! 1
E[Y ] = y · fY (y) dy
0
! 1
= y(1 + 2y − 3y 2 ) dy
!0 1
= (y + 2y 2 − 3y 3 ) dy
0
" 2 #1
y 2y 3 3y 4
= + −
2 3 4 0
1 2 3
= + −
2 3 4
5
=
12

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 321
3.1 Joint and Marginal Distributions

Method 2: Calculating moment using formula

The second method is to evaluate the expected value directly using Equation 3.1.23, where
g(X,Y ) = Y . Evaluate the double integral in any order. In this example, we integrate with
respect to x first, then y. Figure 3.1.18 shows a horizontal line cutting through the region
of integration.

"

"

!!
" #$

!!$!"
!!$!"

#
!!! " !

Figure 3.1.18

The lower and upper limits of the inner integration are the intersection points of the horizon-
tal line with the left and right bounds of the region. After evaluating the inner integration,
we substitute the limits into x and not y, because the inner integration is with respect to x.
! 1! 1
E[Y ] = y · fX,Y (x,y) dx dy
0 y
! 1! 1
= y · 2(x + y) dx dy
0 y
! 1 #x=1
x2 y + 2xy 2
"
= x=y
dy
0
! 1
= (y + 2y 2 − 3y 3 ) dy
0
$ 2 %1
y 2y 3 3y 4
= + −
2 3 4 0
1 2 3
= + −
2 3 4
5
=
12

To show that both methods are equivalent, factor y from the inner integration because y
is treated as a constant when integrating with respect to x. Then, the inner integration
becomes the marginal density of Y , fY (y). The integral of y · fY (y) is the definition of E[Y ].
Therefore, Method 2 is equivalent to Method 1 but with the integral calculating the marginal

P Study Manual (3rd Edition 2nd Printing)


322 c
Copyright ⃝2015 Coaching Actuaries
3.1 Joint and Marginal Distributions

density embedded into the integral calculating the expected value.

! 1! 1
E[Y ] = = y · fX,Y (x,y) dx dy
0 y
! 1 ! 1
= y fX,Y (x,y) dx dy
0 y
! 1
= y · fY (y) dy
0

Section 3.1 Summary


Joint Distributions

Discrete Continuous
Joint PMF Properties: Properties:
(discrete) 0 ≤ fX,Y (x,y) ≤ 1
"" ! ∞ ! ∞0 ≤ fX,Y (x,y)
Joint PDF fX,Y (x,y) = 1 fX,Y (x,y) dy dx = 1
all x all y −∞ −∞
(continuous)
x y ! x ! y
" "
Joint CDF FX,Y (x,y) = fX,Y (s,t) FX,Y (x,y) = fX,Y (s,t) dt ds
s=−∞ t=−∞ −∞ −∞

Properties:
0 ≤ FX,Y (x,y) ≤ 1

FX,Y (∞,∞) = 1
FX,Y (−∞, − ∞) = 0
FX,Y (−∞,y) = 0
FX,Y (x, − ∞) = 0

FX,Y (x,∞) = FX (x)


FX,Y (∞, y) = FY (y)
For continuouse joint CDF only:
∂2
FX,Y (x,y) = fX,Y (x,y)
∂x∂y

P Study Manual (3rd Edition 2nd Printing)


c
Copyright ⃝2015 Coaching Actuaries 323
3.1 Joint and Marginal Distributions

Marginal Distributions

Discrete Continuous
! " ∞
fX (x) = fX,Y (x,y) fX (x) = fX,Y (x,y) dy
all y −∞
" ∞
!
fY (y) = fX,Y (x,y) fY (y) = fX,Y (x,y) dx
all x −∞

Joint Moments

Discrete Continuous
!! " ∞" ∞
E[g(X,Y )] = g(x,y) · fX,Y (x,y) E[g(X,Y )] = g(x,y) · fX,Y (x,y) dy dx
all x all y −∞ −∞

P Study Manual (3rd Edition 2nd Printing)


324 c
Copyright ⃝2015 Coaching Actuaries

You might also like