Sunteți pe pagina 1din 33

Joint Distributions

Tieming Ji
Fall 2012
1 / 33
X: univariate random variable.
(X, Y): bivariate random variable.
In this chapter, we are going to study the distributions of
bivariate random variables joint distributions, both in
discrete cases and continuous cases.
Motivation: Many problems require the study of two random variables at
the same time. For example, studying the eect of pesticide application
time for the soybean yield; the population size and the crime rate
relationship; the phenotype and genotype in agronomy studies; the yield
of a chemical reaction in conjunction with the temperature at which the
reaction is run, etc.
2 / 33
Discrete Cases
Denition: Let X and Y be discrete random variables. The
ordered pair (X, Y) is called a two-dimensional discrete
random variable. The joint (probability) density function f for
(X, Y) is dened as
f (x, y) = P(X = x, Y = y).
Denition: Function f is a valid discrete joint density function
if and only if
f (x, y) 0 for x, y , and

y
f (x, y) = 1.
3 / 33
Example 5.1.1 (book page 157): In an automobile plant two tasks are
performed by robots. The rst entails welding two joints; the second,
tightening three bolts. Let X denote the number of defective welds and
Y the number of improperly tightened bolts produced per car. Past data
indicates that the joint density for (X, Y) is shown in the table below.
x/y 0 1 2 3
0 0.840 0.030 0.020 0.010
1 0.060 0.010 0.008 0.002
2 0.010 0.005 0.004 0.001
1. Is f (x, y) a proper joint density distribution?
f (x, y) is a valid joint discrete density for (X, Y) because (1) for any x
and y, f (x, y) 0; and (2)

y
f (x, y) =

2
x=0

3
y=0
f (x, y) =
0.840 + 0.030 + 0.020 + 0.010 + 0.060 + + 0.001 = 1.
4 / 33
2. What is P(X = 1, Y = 0)? P(X = 1, Y = 0) = 0.060.
3. What is the probability that there is no improperly tightened bolts?
Solution: When there is no improperly tightened bolts, Y=0. So, we
want to compute P(Y = 0). We have
P(Y = 0) = P(X = 0, Y = 0) + P(X = 1, Y = 0) + P(X = 2, Y = 0)
= 0.840 + 0.060 + 0.010 = 0.91.
5 / 33
Denition: The marginal probability density functions f
X
(x) for
X given the joint probability density function f
X,Y
(x, y) is
given by
f
X
(x) =

y
f
X,Y
(x, y).
Similarly, the marginal probability density function f
Y
(y) for Y
is given by
f
Y
(y) =

x
f
X,Y
(x, y).
6 / 33
Example: Compute the marginal distributions of X and Y given the table
in the last example.
x/y 0 1 2 3 f
X
(x)
0 0.840 0.030 0.020 0.010 0.900
1 0.060 0.010 0.008 0.002 0.080
2 0.010 0.005 0.004 0.001 0.020
f
Y
(y) 0.910 0.045 0.032 0.013 1
7 / 33
Continuous Cases
Denition: Let X and Y be continuous random variables. The
ordered pair (X, Y) is called a two-dimensional continuous
random variable. The probability that X [a, b] and
Y [c, d] given the joint continuous probability density
f
X,Y
(x, y) is computed by
P(a X b, c Y d) =

b
a

d
c
f
X,Y
(x, y)dydx.
Denition: Function f is proper continuous joint density
function if and only if
f (x, y) 0 for x, y , and

f
X,Y
(x, y)dydx = 1.
8 / 33
Example: In a healthy individual age 20 to 29 years, the calcium level in
the blood, X, is usually between 8.5 and 10.5 milligrams per deciliter
(mg/dl) and the cholesterol level, Y is usually between 120 and 240
mg/dl. Assume that for a healthy individual in this age group, X is
uniformly distributed in the range (8.5, 10.5), and Y is uniformly
distributed on (120, 240). Thus, the density function is
f
X,Y
(x, y) =

1
240
, 8.5 x 10.5 and 120 y 240;
0, o.w.
1. Verify that f
X,Y
is a proper probability density function.
Solution:
(1) For any x and y , f (x, y) is non-negative.
(2)

f (x, y)dydx =

10.5
8.5

240
120
1
240
dydx = 1.
9 / 33
2. Compute the probability that a healthy person in this age group will
have calcium level between 9 and 10 mg/dl and cholesterol level between
125 and 140 mg/dl.
Solution:
This is to compute P(9 X 10, 125 Y 140).
P(9 X 10, 125 Y 140) =

10
9

140
125
1
240
dydx
=
1
240

10
9
(140 125)dx
=
15
240
.
10 / 33
Denition: Let (X, Y) be a two-dimensional continuous
random variable with joint density f
X,Y
. The marginal density
for X, denoted by f
X
, is given by
f
X
(x) =

f
X,Y
(x, y)dy.
The marginal density for Y, denoted by f
Y
, is given by
f
Y
(y) =

f
X,Y
(x, y)dx.
11 / 33
Example: Continued with the last example.
1. Compute the marginal distributions for X and Y.
Solution:
f
X
(x) =

240
120
1
240
dy =
1
2
, 8.5 x 10.5.
When x < 8.5 or x > 10.5, f
X
(x) = 0.
f
Y
(y) =

10.5
8.5
1
240
dx =
1
120
, 120 y 240.
When y < 120 or y > 240, f
Y
(y) = 0.
12 / 33
2. Compute the probability that a healthy individual has a cholesterol
level between 150 and 200.
Solution: This is to compute P(150 Y 200).
P(150 Y 200) =

10.5
8.5

200
150
1
240
dydx =
5
12
.
We can also use marginal density to compute this as follows.
P(150 Y 200) =

200
150
1
120
dy =
5
12
.
13 / 33
Example: Let
f (x, y) =

1, 0 x 1, 0 y 1.
0, o.w.
Compute the probability that
1
2
X + Y
3
2
.
14 / 33
Example: Let
f (x, y) =

e
(x+y)
, x, y 0
0, o.w.
Compute the probability that Y X 2.
15 / 33
Example: In studying the behavior of air support roofs, the random
variables X, the inside barometric pressure (in inches of mercury), and Y,
the outside pressure, are consdered. Assume that the joint density for
(X, Y) is given by f
X,Y
(x, y) =
c
x
when 27 y x 33, and
c =
1
627ln
33
27
1.72.
1. Compute the marginal density functions of X and Y.
16 / 33
2. Compute the probability that X 30 and Y 28.
17 / 33
Independence
Denition: Let X and Y be random variables with joint
density f
XY
and marginal densities f
X
and f
Y
, respectively. X
and Y are independent if and only if
f
XY
(x, y) = f
X
(x)f
Y
(y)
for all x and y.
18 / 33
Example: Continue with Example 5.1.1 on slide no. 4.
x/y 0 1 2 3 f
X
(x)
0 0.840 0.030 0.020 0.010 0.900
1 0.060 0.010 0.008 0.002 0.080
2 0.010 0.005 0.004 0.001 0.020
f
Y
(y) 0.910 0.045 0.032 0.013 1
X and Y are not independent, because f
XY
(x = 0, y = 0) = 0.840, and
f
X
(x = 0)f
Y
(y = 0) = 0.900 0.910 = 0.819 = f
XY
(x = 0, y = 0).
19 / 33
Example: Continue with Example on slide no. 9 and no. 12. We have
already derived the joint pdf and marginal pdfs as follows.
f
X,Y
(x, y) =

1
240
, 8.5 x 10.5 and 120 y 240;
0, o.w.
f
X
(x) =

1
2
, 8.5 x 10.5;
0, o.w.
f
Y
(y) =

1
120
, 120 y 240;
0, o.w.
Thus, for any pair of (x, y)
2
, f
X,Y
(x, y) = f
X
(x)f
Y
(y). X and Y are
independent.
20 / 33
Expectation
For (X, Y) discrete,
E(X) =

x
xf
X
(x) =

y
xf
XY
(x, y), and
E(Y) =

y
yf
Y
(y) =

y
yf
XY
(x, y).
For (X, Y) continuous,
E(X) =

x
xf
X
(x)dx =

x
xf
XY
(x, y)dxdy, and
E(Y) =

y
yf
Y
(y)dy =

x
yf
XY
(x, y)dxdy.
21 / 33
Extension: Let (X, Y) be a two-dimensional random variable
with joint density f
XY
. Let h(X, Y) be a random variable. The
expected value of h(X, Y), denoted by E(h(X, Y)), is given by
E(h(X, Y)) =

y
h(X, Y)f
XY
(x, y),
when (X, Y) is discrete and E(h(X, Y)) exists; or
E(h(X, Y)) =

y
h(X, Y)f
XY
(x, y)dxdy,
when (X, Y) is continuous and E(h(X, Y)) exists.
22 / 33
Example: The joint pdf of X and Y are in the following table. Compute
E(X) and E(X + Y).
x/y 0 1 2 3 f
X
(x)
0 0.840 0.030 0.020 0.010 0.900
1 0.060 0.010 0.008 0.002 0.080
2 0.010 0.005 0.004 0.001 0.020
f
Y
(y) 0.910 0.045 0.032 0.013 1
23 / 33
Example: The joint density for the random variable (X, Y), where X
denotes the calcium level and Y denotes the cholesterol level in the
blood of a healthy individual, is given by
f
X,Y
(x, y) =

1
240
, 8.5 x 10.5 and 120 y 240;
0, o.w.
Compute E(X) and E(XY).
24 / 33
Covariance
Denition: Let X and Y be random variables with means
X
and
Y
, respectively. The covariance between X and Y,
denoted by Cov(X, Y) or
XY
is given by
Cov(X, Y) = E((X
X
)(Y
Y
)).
Using denition to compute covariance is often inconvenient.
Instead we use the following formula to compute covariance.
Cov(X, Y) = E((X
X
)(Y
Y
)) = E(XY) E(X)E(Y).
25 / 33
Theorem: Let (X, Y) be a two-dimensional random variable
with joint density f
XY
. If X and Y are independent then
E(XY) = E(X)E(Y).
Thus, If X and Y are independent, then
Cov(X, Y) = E(XY) E(X)E(Y) = 0.
That is, independence covariance is 0.
However, when covariance is 0 for two random variables, it is not always
true that they are independent.
26 / 33
Example 5.2.4 (book page 169): The joint density for X and Y is in the
following table.
x/y -2 -1 1 2 f
X
(x)
1 0 1/4 1/4 0 1/2
4 1/4 0 0 1/4 1/2
f
Y
(y) 1/4 1/4 1/4 1/4 1
From the table, we have E(X) = 5/2, E(Y) = 0, and E(XY) = 0,
yielding a covariance of 0. However, X and Y are not independent.
27 / 33
Correlation
Denition: Let X and Y be random variables with means
X
and
Y
and variances
2
X
and
2
Y
, respectively. The
correlation,
XY
, between X and Y is given by

XY
=
Cov(X, Y)

2
X

2
Y
=
Cov(X, Y)

Y
.
This is also called the Pearson coecient of correlation.
28 / 33
Property: The Pearson correlation coecient
XY
ranges from
-1 to 1, and it measures linearity of X and Y. Specically,
When
XY
=1, Y can be written as Y =
0
+
1
X and
1
is positive.
When
XY
=-1, Y can be written as Y =
0
+
1
X and
1
is negative.
When
XY
= 0, there is no linear relationship between X
and Y, but they could have other relationships.
29 / 33
Example: The joint pdf of X and Y are in the following table. Compute

XY
.
x/y 0 1 2 3 f
X
(x)
0 0.840 0.030 0.020 0.010 0.900
1 0.060 0.010 0.008 0.002 0.080
2 0.010 0.005 0.004 0.001 0.020
f
Y
(y) 0.910 0.045 0.032 0.013 1
30 / 33
Conditional Density
Denition: Let (X, Y) be a two-dimensional random variable
with joint density f
XY
and marginal densities f
X
and
Y
. Then
The conditional density for X given Y = y is given by
f
X|Y=y
(x) =
f
XY
(x, y)
f
Y
(y)
, when f
Y
(y) > 0.
The conditional density for Y given X = x is given by
f
Y|X=x
(y) =
f
XY
(x, y)
f
X
(x)
, when f
X
(x) > 0.
Note: When two r.v.s are independent, the marginal density is
the same with the conditional density, i.e. f
X|Y
(x) = f (x).
and same for Y.
31 / 33
Example: The joint pdf of X and Y are in the following table. Compute
P(X 1|y = 0).
x/y 0 1 2 3 f
X
(x)
0 0.840 0.030 0.020 0.010 0.900
1 0.060 0.010 0.008 0.002 0.080
2 0.010 0.005 0.004 0.001 0.020
f
Y
(y) 0.910 0.045 0.032 0.013 1
32 / 33
Chapter Summary
For both the discrete and continuous cases, know the denition of
joint pdf, and use the joint pdf to compute marginal pdfs.
Given the joint pdf, be able to compute probability of X and Y
satisfying specic requirements, such as P(X + Y 1),
P(X < Y < 0.5), etc.
Expectations computed from marginal density or joint density.
Covariance and independence.
Correlation.
Relationship of marginal density, conditional density and joint
density.
33 / 33

S-ar putea să vă placă și