0% found this document useful (0 votes)
19 views

Chap4 Slides

The document discusses joint probability distributions of discrete and continuous bivariate random variables. It defines joint and marginal density functions, independent random variables, expectation, covariance, and provides examples to illustrate these concepts.

Uploaded by

Parv Sojatia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Chap4 Slides

The document discusses joint probability distributions of discrete and continuous bivariate random variables. It defines joint and marginal density functions, independent random variables, expectation, covariance, and provides examples to illustrate these concepts.

Uploaded by

Parv Sojatia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Chapter 4: Joint Probability Distributions

Dr. Suresh Kumar 1 / 50


Discrete Bivariate Random Variable
Let X and Y be two discrete random variables. Then
the ordered pair (X, Y) is called a two dimensional or
bivariate discrete random variable.
Joint Density Function
A function f such that (i) f(x, y) ≥ 0
(ii) f(x,
Xy) X= P[X = x, Y = y]
(iii) f(x, y) = 1
X=x Y=y
is called joint density function of (X, Y).
Dr. Suresh Kumar 2 / 50
Cumulative Distribution Function X X
The cdf of (X, Y) is given by F(x, y) = f(x, y).
X≤x Y≤y
Expectation
The expectation
XX of X and H(X, Y) are
E[X] = xf(x, y) = µX.
X=x Y=y
XX
E[H(X, Y)] = H(x, y)f(x, y).
X=x Y=y

Dr. Suresh Kumar 3 / 50


Covariance
If µX and µY are the means of X and Y respectively,
then covariance of X and Y, denoted by Cov(X, Y) is
defined as

Cov(X, Y) = E[(X − µX)(Y − µY )]


= E[XY] − E[X]E[Y].

Dr. Suresh Kumar 4 / 50


Marginal Density Functions
The marginal densities of X and Y are defined as
X
fX(x) = f(x, y).
Y=y
X
fY (y) = f(x, y).
X=x
Independent random variables
The discrete random variables X and Y are said to
be independent if and only if f(x, y) = fX(x)fY (y) for all
(x, y).
Dr. Suresh Kumar 5 / 50
Toss of two fair coins
Let X denote the number of heads and Y denote the number
of tails.
Then X = 0, 1, 2, Y = 0, 1, 2, and f (x, y ) is
X /Y 0 1 2 fX (x)
0 0 0 1/4 1/4
1 0 1/2 0 1/2
2 1/4 0 0 1/4
fY (y ) 1/4 1/2 1/4 1
Dr. Suresh Kumar 6 / 50
Ex. Two ballpoint pens are selected at random from a box that
contains 3 blue pens, 2 red pens, and 3 green pens. If X is the
number of blue pens selected and Y is the number of red pens
selected, find
(a) the joint probability mass function f (x, y ),
(b) P[X + Y ≤ 1].

Dr. Suresh Kumar 7 / 50


(x3)(y2)(2−x−y
3
)
Sol. (a) We have f (x, y ) = 8 ,
(2)
x = 0, 1, 2; y = 0, 1, 2; 0 ≤ x + y ≤ 2.
X /Y 0 1 2 fX (x)
3 6 1 10
0 28 28 28 28
9 6 15
1 28 28 0 28
3 3
2 28 0 0 28
15 12 1
fY (y ) 28 28 28 1

(b) P[X + Y ≤ 1] = f (0, 0) + f (0, 1) + f (1, 0) = 9/14.


Dr. Suresh Kumar 8 / 50
Ex. In an automobile plant, two tasks are performed by robots,
the welding of two joints and tightening of three bolts. Let X
denote the number of defective joints and Y denote the number
of improperly tightened bolts produced per car. The probabili-
ties of (X, Y) are given in the table.
X/Y 0 1 2 3
0 0.84 0.03 0.02 0.01
1 0.06 0.01 0.008 0.002
2 0.01 0.005 0.004 0.001
Dr. Suresh Kumar 9 / 50
X/Y 0 1 2 3
0 0.84 0.03 0.02 0.01
1 0.06 0.01 0.008 0.002
2 0.01 0.005 0.004 0.001
(i) Is it a density function?
X2 X 3
Yes. For, f(x, y) = 1.
X=0 Y=0

Dr. Suresh Kumar 10 / 50


X/Y 0 1 2 3 fX(x)
0 0.84 0.03 0.02 0.01 0.9
1 0.06 0.01 0.008 0.002 0.08
2 0.01 0.005 0.004 0.001 0.02
fY (y) 0.91 0.045 0.032 0.013 1
(ii) Find the probability that there would be exactly one error
made by the robots.
P[X = 1, Y = 0] + P[X = 0, Y = 1]
= f(1, 0) + f(0, 1) = 0.06 + 0.03 = 0.09.
Dr. Suresh Kumar 11 / 50
X/Y 0 1 2 3 fX(x)
0 0.84 0.03 0.02 0.01 0.9
1 0.06 0.01 0.008 0.002 0.08
2 0.01 0.005 0.004 0.001 0.02
fY (y) 0.91 0.045 0.032 0.013 1
(iii) Find the probability that there would be no improperly
tightened bolts.
X2
P[Y = 0] = f(x, 0)
X=0
= f(0, 0) + f(1, 0) + f(2, 0) = 0.91.
Dr. Suresh Kumar 12 / 50
X/Y 0 1 2 3 fX(x)
0 0.84 0.03 0.02 0.01 0.9
1 0.06 0.01 0.008 0.002 0.08
2 0.01 0.005 0.004 0.001 0.02
fY (y) 0.91 0.045 0.032 0.013 1
(iv) Are the variables X and Y independent?
No. From the Table, we notice that f(0, 0) = 0.84,
fX(0) = 0.9 and fY (0) = 0.91. So we have
fX(0)fY (0) = 0.819 6= f(0, 0).
Dr. Suresh Kumar 13 / 50
(v) Find Cov(X, Y).
X2 X3
E[X] = xf(x, y) = 0.12,
X=0 Y=0
X2 X 3
E[Y] = yf(x, y) = 0.148,
X=0 Y=0
X2 X 3
E[XY] = xyf(x, y) = 0.064.
X=0 Y=0
Hence, Cov(X, Y) = E[XY] − E[X]E[Y] = 0.046.
Dr. Suresh Kumar 14 / 50
Ex. Suppose X and Y are two discrete random variables
taking only integer values. The joint density function of
(X , Y ) is
f (x, y ) = c/[n(n + 1)], 1 ≤ y ≤ x ≤ n, where n is some
positive integer.
(i) Find the value of c.
(ii) Find the marginal densities.
(iii) Given that n = 5, find P[X ≤ 3, Y ≤ 2].
Ans. c = 2, P[X ≤ 3, Y ≤ 2] = 1/3.
Dr. Suresh Kumar 15 / 50
Continuous Bivariate Random Variable
It is the ordered pair (X, Y) of two continuous random
variables X and Y.
Joint Density Function
A f is joint density function of (X, Y) if
(i) f(x, y) ≥ 0 ZZ
(ii) P[(X, Y) ∈ S]= f(x, y)dxdy
Z ∞Z ∞ S

(iii) f(x, y)dxdy = 1.


−∞ −∞
Dr. Suresh Kumar 16 / 50
Cumulative Distribution Function Z x Z y
The cdf of (X, Y) is given by F(x, y) = f(x, y)dxdy.
−∞ −∞
Marginal Density Functions
The marginal densities of X and Y are defined as
Z ∞
fX(x) = f(x, y)dy.
−∞
Z ∞
fY (y) = f(x, y)dx.
−∞
Dr. Suresh Kumar 17 / 50
Independent random variables
The continuous random variables X and Y are said to
be independent if and only if f(x, y) = fX(x)fY (y) for all
(x, y).
Expectation
The expectation of X and H(X, Y) are
Z Z ∞ ∞
E[X] = xf(x, y)dxdy = µX.
−∞ Z −∞ Z
∞ ∞
E[H(X, Y)] = H(x, y)f(x, y)dxdy.
−∞ −∞
Dr. Suresh Kumar 18 / 50
Covariance
If µX and µY are the means of X and Y respectively,
then covariance of X and Y, denoted by Cov(X, Y) is
defined as

Cov(X, Y) = E[(X − µX)(Y − µY )]


= E[XY] − E[X]E[Y].

Dr. Suresh Kumar 19 / 50


Ex. Let X denote a person’s blood calcium level and Y , the
blood cholesterol level. The joint density function of (X , Y ) is
f (x, y ) = k, 8.5 ≤ x ≤ 10.5, 120 ≤ y ≤ 240.
(i) Find the value of k.
f (x, y ) being joint density function, we have
Z 240 Z 10.5
1= kdxdy = 240k.
120 8.5

So k = 1/240 and f (x, y ) = 1/240.


Dr. Suresh Kumar 20 / 50
(ii) Find the marginal densities of X and Y .
The marginal density of X is
Z 240
1 1
fX (x) = dy = .
120 240 2
Similarly, the marginal density of Y is
Z 10.5
1 1
fY (y ) = dy = .
8.5 240 120

Dr. Suresh Kumar 21 / 50


(iii) Find the probability that a healthy person has a
cholesterol level between 150 to 200.
Z 200
5
P[150 ≤ Y ≤ 200] = fY (y )dy = .
150 12
(iv) Are the variables X and Y independent?
1 1 1
fX (x)fY (y ) = × = f (x, y ).
2 120 240
This shows that X and Y are independent.
Dr. Suresh Kumar 22 / 50
(v) Find ZCov(X , Y ).
240 Z 10.5
x
E [X ] = dxdy = 9.5,
120 8.5 240
Z 240 Z 10.5
y
E [Y ] = dxdy = 180,
120 8.5 240
Z 240 Z 10.5
xy
E [XY ] = dxdy = 1710.
120 8.5 240
Hence, Cov(X , Y ) = 1710 − 9.5 × 180 = 0.
Dr. Suresh Kumar 23 / 50
Ex. The joint density function of (X, Y) is

f(x, y) = c/x, 27 ≤ y ≤ x ≤ 33.

(i) Find the value of c.


To find c, we use
Z 33 Z x
f(x, y)dydx = 1
27 27
1
and we get c = 6−27 ln(33/27) .
Dr. Suresh Kumar 24 / 50
33

y=x
x = 33

y
27

y = 27
23
23 27 33
x

Figure: The shaded golden region is the triangular region common to


the three regions given by the inequalities y ≥ 27, y ≤ x and x ≤ 33.

Dr. Suresh Kumar 25 / 50


(ii) Find the marginal densities and hence check the
independence of X and Y.
Z y=x
c
fX(x) = dy = c(1 − 27/x).
y=27 x
Z x=33
c
fY (y) = dx = c(ln 33 − ln y).
x=y x
We observe that
f(x, y) = c/x 6= fX(x)fY (y).
So XDr.and Y are not independent.
Suresh Kumar 26 / 50
(iii) Evaluate P[X ≤ 30, Y ≤ 28].
Z 28 Z 30
c
P[X ≤ 30, Y ≤ 28] = dxdy = 0.15.
27 y x

Dr. Suresh Kumar 27 / 50


Theorem: If X and Y are two independent random variables
with joint density f , then
E [XY ] = E [X ]E [Y ], that is, Cov(X , Y ) = 0.
Proof: We have Z Z ∞ ∞
E [XY ] = xyf (x, y )dxdy
Z−∞ −∞
∞ Z ∞
= xyfX (x)fY (y )dxdy
Z−∞

−∞ 
Z ∞ 
= yfY (y ) xfX (x)dx dy
−∞ −∞
Dr. Suresh Kumar 28 / 50
Z ∞ Z ∞ 
E [XY ] = yfY (y ) xfX (x)dx dy
Z−∞

−∞

= yfY (y )E [X ]dy
−∞ Z

= E [X ] yfY (y )dy
−∞
= E [X ]E [Y ].

Dr. Suresh Kumar 29 / 50


If E [XY ] = E [X ]E [Y ], then X and Y need not be inde-
pendent. For, consider
X /Y −2 −1 1 2 fX (x)
1 0 1/4 1/4 0 1/2
4 1/4 0 0 1/4 1/2
fY (y ) 1/4 1/4 1/4 1/4 1

We find that E [X ] = 5/2, E [Y ] = 0 and E [XY ] = 0. So E [XY ] =


Next, fX (1)fY (−2) = (1/2)(1/4) 6= 0 = f (1, −2).
Dr. Suresh Kumar 30 / 50
Pearson coefficient of correlation
If X and Y are two random variables with means µX,
µY , and variances σX2 and σY2 , then correlation between
X and Y is given by
Cov(X, Y)
ρXY = .
σX σY
It can be proved that ρXY lies in the range [−1, 1].
Further, |ρXY | = 1 if and only if Y = a + bX for some
real numbers a and b 6= 0.
Dr. Suresh Kumar 31 / 50
Figure: In case of large negative covariance, we have ρXY ≈ −1. In case
of nearly zero covariance, ρXY ≈ 0 while in case of very large positive
covriance, ρXY ≈ 1.

Dr. Suresh Kumar 32 / 50


Note that if ρXY = 0, we say that X and Y are uncorre-
lated. It does not imply that X and Y are unrelated. Of
course, the relationship, if exists, would not be linear.

In Robot’s example, σX2 = 0.146, σY2 = 0.268, Cov(X, Y) = 0.0


and therefore ρXY = 0.23.

Dr. Suresh Kumar 33 / 50


Covariance matrix
Covariance matrix of X and Y is written as
 2 
σX σXY
σYX σY2

Notice that the covariance matrix is always symmetric since


σXY = σYX .

Dr. Suresh Kumar 34 / 50


Correlation matrix
The correlation matrix is given by
 
1 ρXY
ρYX 1

It is also symmetric since ρXY = ρYX . In addition, its diagonal


elements are unity.

Dr. Suresh Kumar 35 / 50


Q.1 Let X denote the number of times a photocopy machine
will malfunction: 0, 1, 2 or 3 times, on any given month. Let
Y denote the number of times (0, 1 or 2) a technician is called
on an emergency service. The joint pmf is given as: f (0, 0) =
0.15, f (0, 1) = 0.05, f (0, 2) = 0, f (1, 0) = 0.30, f (1, 1) =
0.15, f (1, 2) = 0.05, f (2, 0) = 0.05, f (2, 1) = 0.05, f (2, 2) =
0.10, f (3, 0) = 0, f (3, 1) = 0.05, and f (3, 2) = 0.05. Find
(i) P(X < Y ), (ii) the marginal pmfs of X and Y , and (iii)
Cov(X , Y ).
Dr. Suresh Kumar 36 / 50
Sol. The given joint pmf in tabular form is
X /Y 0 1 2 fX (x)
0 0.15 0.05 0 0.20
1 0.30 0.15 0.05 0.50
2 0.05 0.05 0.10 0.20
3 0 0.05 0.05 0.10
fY (y ) 0.50 0.30 0.20 1

Dr. Suresh Kumar 37 / 50


(i) To find P(X < Y ), do the sum of probabilities of the pairs
(X , Y ) where X < Y . Such pairs are (0, 1), (0, 2), (1, 2). So
we have
P(X < Y ) = f (0, 1)+(0, 2)+f (1, 2) = 0.05+0+0.05 = 0.1.
(iii) E (X ) = 1.2, E (Y ) = 0.7, E (XY ) = 1.2 and
Cov(X , Y ) = 0.36.

Dr. Suresh Kumar 38 / 50


Q.2 Consider two continuous random variables X and Y with
pdf (
2 2
81 x y , 0 < x < k, 0 < y < k
f (x, y ) =
0, elsewhere
Find (i) k, (ii) P(X > 3Y ), (iii) P(X + Y > 3), and (iv) the
marginal pdfs of X and Y . Are X and Y independent?

Dr. Suresh Kumar 39 / 50


Z k Z k
2 2
x y = 1 =⇒ k = 3.
0 0 81
Z 3 Z x/3
2 2 1
P(X > 3Y ) = x ydydx = .
0 0 81 15
Z 3Z 3
2 2
P(X + Y > 3) = x ydydx = 0.99.
0 3−x 81
1 2
fX (x) = x 2, fY (y ) = y .
9 9
Dr. Suresh Kumar 40 / 50
Q.3 Consider two continuous random variables X and Y with
pdf
(
k(x + y ), x > 0, y > 0, 3x + y < 3
f (x, y ) =
0, elsewhere

Find (i) k, (ii) P(X < Y ), (iii) the marginal pdfs of X and Y ,
(iii) Cov(X + 2, Y − 3), (iv) Corr(−2X + 3, 2Y + 7), and (iii)
Cov(−2X + 3Y − 4, 4X + 7Y + 5).

Dr. Suresh Kumar 41 / 50


Sol. (i) k = 2,
(ii) P(X < Y ) = 27/32,
(iii) the marginal pdfs of X and Y are
9 3
− 3x + x 2, 0 < x < 1
fX (x) =
4 4
1 1 5
fY (y ) = + y − y 2, 0 < y < 3
4 3 36
Verify E (X ) = 5/16, E (Y ) = 21/16, E (XY ) = 3/10

Dr. Suresh Kumar 42 / 50


Q.4 Consider two continuous random variables X and Y with
pdf (
ke −y , −y < x < y , y > 0
f (x, y ) =
0, elsewhere
Find (i) k, (ii) the marginal pdfs of X and Y , and (iii) the
conditional pdfs of X and Y .
Sol. (i) k = 1/2

Dr. Suresh Kumar 43 / 50


Q.5 Two persons A and B have agreed to meet for lunch
between noon (0:00 pm) to 1:00 pm. Denote A’s arrival time
by X , B’s by Y , and suppose X and Y are independent with
density functions:
(
3x 2, 0 < x < 1,
fX (x) =
0, elsewhere
(
2y , 0 < y < 1,
fY (y ) = .
0, elsewhere
Dr. Suresh Kumar 44 / 50
(i) Find the probability that A arrives before B, and hence
compute the expected amount of time A would have to wait
for B to arrive.
Sol. Since X and Y are independent, their joint pdf is given
by
(
3x 2y , 0 < x < 1, 0 < y < 1
f (x, y ) = fX (x)fY (y ) =
0, elsewhere

(i) P(A arrives before B) = P(X < Y ) = 2/5.


Dr. Suresh Kumar 45 / 50
Next, expected amount of time A would have to wait for B to
arrive is given by E (Y − X ) provided Y > X . Solving the
double integral of (y − x)f (x, y ) over the region
0 < x < 1, 0 < y < 1, y > x, we get E (Y − X ) = 1/12
hours. (Verify!).
(ii) If they have pre-decided on a condition that whoever
comes first will only wait for 15 minutes for the other, what is
the probability that they will meet for lunch?
Hint: P(Y − X < 1/4) + P(X − Y < 1/4).
Dr. Suresh Kumar 46 / 50
Q.6 The following table shows the quality and meal price
ratings (1 lowest to 3 highest) of 300 restaurants in a metro
city:
Quality/Meal Price 1 2 3 Total
1 42 39 3 84
2 33 63 54 150
3 3 15 48 66
Total 78 117 105 300

Dr. Suresh Kumar 47 / 50


Develop a bivariate probability distribution for quality X and
meal price Y of a randomly selected restaurant in the metro
city. Determine Cov(X , Y ) and Cor(X , Y ). Based on your
results, do you suppose it is likely to find a low cost restaurant
with high meal quality.
X/Y 1 2 3 fX (x)
1 0.14 0.13 0.01 0.28
2 0.11 0.21 0.18 0.50
3 0.01 0.05 0.05 0.22
fY (y ) 0.26 0.29 0.35 1
Dr. Suresh Kumar 48 / 50
E (X ) = 1.94, E (Y ) = 2.09, V (X ) = 0.4964,
V (Y ) = 0.6019, Cov(X , Y ) = 0.2854 and
Cor(X , Y ) = 0.5221.

Dr. Suresh Kumar 49 / 50


Q.7 Let T1, T2, ..., Tk be independent exponential random vari-
ables with mean values 1/λ1, 1/λ2, ..., 1/λk , respectively. De-
note Tmin = min(T1, T2, ..., Tk ). Show that Tmin has an expo-
nential distribution. What is the mean of Tmin?
Sol. Since T1, T2, ..., Tk are independent,
P(Tmin > t) =
P(T1 > t)P(T2 > t)....P(Tk > t)

Dr. Suresh Kumar 50 / 50

You might also like