Ambo University
Department of Electrical & Computer Engineering
Probability and Random Process (ECEg-2113)
Chapter 3, Lecture 2
Multiple Random Variables
Multiple Random Variables
Outline
§ Introduction
§ The Joint Cumulative Distribution Function
§ The Joint Probability Density and Mass Functions
§ Marginal Statistics
§ Independence
§ Conditional Distributions
§ Correlation and Covariance
§ Functions of Two Random Variables
2
The Joint Cumulative Distribution Function
§ The joint cdf of two random variables X and Y denoted by
FXY(x, y) is a function defined by:
FXY ( x, y ) P[ X ( ) x and Y ( ) y ]
FXY ( x, y ) P( X x, Y y )
where x and y are arbitrary real numbers.
Properties of the Joint cdf, FXY(x, y):
i. 0 FXY ( x, y ) 1
ii . lim F XY ( x , y ) F XY ( , ) 1
x
y
iii . lim F XY ( x , y ) F XY ( , ) 0
x
y
3
The Joint Probability Density Function
§ The joint probability function (pdf) of two continuous random
variables X and Y is defined as:
2 FXY ( x, y )
f XY ( x, y )
xy
§ Thus, the joint cumulative distribution function (cdf) is given
by:
y x
f XY ( x, y ) f XY (u , v)dudv
- -
4
The Joint Probability Density Function Cont’d…..
Properties of the Joint pdf, fXY(x, y):
1. f XY ( x, y ) 0
2.
- -
f XY ( x, y )dxdy 1
y2 x2
3. P ( x1 X x2 , y1 Y y2 ) f XY ( x, y )dxdy
y1 x1
5
The Joint Probability Mass Function
§ The joint probability mass function (pmf) of two discrete
random variables X and Y is defined as:
PXY ( xi , y j ) P ( X xi , Y y j )
§ The joint cdf can be written as:
FXY ( x, y ) PXY ( xi , y j )
xi x y j y
Properties of the Joint pmf, PXY (xi , yj ):
1. 0 PXY ( xi , y j ) 0
2. P
xi yj
XY ( xi , y j ) 1
6
Marginal Statistics
§ In the case of two or more random variables, the statistics of
each individual variable are called marginal statistics.
i. Marginal cdf of X and Y
F X ( x ) lim F XY ( x , y ) F XY ( x , )
y
FY ( y ) lim F XY ( x , y ) F XY ( , y )
x
ii. Marginal pdf of X and Y
f X ( x) -
f XY ( x , y ) dy
fY ( y) f XY ( x , y ) dx
-
7
Marginal Statistics Cont’d…..
iii. Marginal pmf of X and Y
P ( X x i ) PX ( x i ) P
yj
XY ( xi , y i )
P (Y y j ) PY ( y j ) P
xi
XY ( xi , y i )
8
Independence
§ If two random variables X and Y are independent, then
i. from the joint cdf
F XY ( x , y ) F X ( x ) FY ( y )
ii. from the joint pdf
f XY ( x , y ) f X ( x ) f Y ( y )
iii. from the joint pmf
PXY ( x i , y j ) PX ( x i ) PY ( y j )
9
Conditional Distributions
i. Conditional Probability Density Functions
f XY ( x , y )
f X /Y ( x / y) , fY ( y ) 0
fY ( y )
f XY ( x , y )
fY / X ( y / x) , f X ( x) 0
f X ( x)
i. Conditional Probability Mass Functions
PXY ( x i , y j )
PX / Y ( x i / y j ) , PY ( y j ) 0
PY ( y j )
PXY ( x i , y j )
PY / X ( y j / x i ) , PX ( x i ) 0
PX ( x i )
10
Correlation and Covariance
i. Correlation
R XY Cor ( X , Y ) E ( XY )
ii. Covariance
XY Cov ( X , Y ) E [( X X )(Y Y )]
XY Cov ( X , Y ) E ( XY ) E ( X ) E (Y )
iii. Correlation Coefficient
Cov ( X , Y ) XY
XY
X Y X Y
11
Examples on Two Random Variables
Example-1:
The joint pdf of two continuous random variables X and Y is
given by:
kxy , 0 x 1, 0 y 1
f XY ( x, y )
0 , otherwise
where k is a constant.
a. Find the value of k .
b. Find the marginal pdf of X and Y .
c. Are X and Y independent?
d. Find P( X Y 1)
e. Find the conditional pdf of X and Y .
12
Examples on Two Random Variables Cont’d……
Solution:
1 1
a.
-
f XY ( x , y ) dxdy 1 kxydxdy 1
0 0
1 x2 1
k y 1
0
2 0
k 1 y 2 1 k
ydy k 1
2 0 4 0 4
k 4
13
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pdf of X and Y
i. Marginal pdf of X
1
f X ( x) f XY ( x , y ) dy 4 xydy
0
y 2
1
f X ( x ) 4 x 2 x
2 0
2 x, 0 x 1
f X ( x)
0, otherwise
14
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pdf of X and Y
ii. Marginal pdf of Y
1
fY ( y ) f XY ( x , y ) dx 4 xydx
0
x2 1
f Y ( y ) 4 y 2 y
2 0
2 y , 0 y 1
fY ( y )
0, otherwise
15
Examples on Two Random Variables Cont’d……
Solution:
c. f XY ( x, y ) f X ( x ) f Y ( y )
X and Y are independen t
1 1 y 1 x2 1
d . P( X Y 1) 4 xydxdy 4 y dy
0 0 0
2 0
1 1
4 y[1 / 2(1 y) ]dy 2( y 2 y 2 y 3 )dy
2
0 0
2 3 4
2( y / 2 2 y / 3 y / 4) 1 / 6
P( X Y 1) 1 / 6
16
Examples on Two Random Variables Cont’d……
Solution:
e. Conditional pdf of X and Y
i. Conditional pdf of X
f XY ( x, y) 4 xy
f X / Y ( x / y) 2x
fY ( y ) 2y
2 x, 0 x 1, 0 y 1
f X / Y ( x / y)
0, otherwise
17
Examples on Two Random Variables Cont’d……
Solution:
e. Conditional pdf of X and Y
ii. Conditional pdf of Y
f XY ( x, y ) 4 xy
fY / X ( y / x) 2y
f X ( x) 2x
2 y, 0 x 1, 0 y 1
fY / X ( y / x)
0, otherwise
18
Examples on Two Random Variables Cont’d……
Example-2:
The joint pdf of two continuous random variables X and Y is
given by:
k , 0 y x 1
f XY ( x, y )
0, otherwise
where k is a constant.
a. Determine the value of k .
b. Find the marginal pdf of X and Y .
c. Are X and Y independen t?
d . Find P (0 X 1 / 2)
e. Find the conditiona l pdf of X and Y .
19
Examples on Two Random Variables Cont’d……
Solution:
1 1
a.
-
f XY ( x , y ) dxdy 1 kdxdy 1
0 y
1 1
k x 1
0 y
1 y 2 1 k
k (1 y ) dy k y 1
0
2 0 2
k 2
20
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pdf of X and Y
i. Marginal pdf of X
x
f X ( x) f XY ( x , y ) dy 2 dy
0
x
f X ( x ) 2 y 2 x
0
2 x, 0 x 1
f X ( x)
0, otherwise
21
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pdf of X and Y
ii. Marginal pdf of Y
1
fY ( y ) f XY ( x , y ) dx 2 dx
y
1
f Y ( y ) 2 x 2(1 y )
y
2(1 y ), 0 y 1
fY ( y )
0, otherwise
22
Examples on Two Random Variables Cont’d……
Solution:
c. f XY ( x, y) f X ( x) fY ( y)
X and Y are not independent
1/ 2 x
d. P(0 X 1/ 2) f XY ( x, y)dydx
0 0
1/ 2 x 1/ 2 x
2dydx (2 y) dx
0 0 0 0
1/ 2 1/ 2
2xdx x 2
1/ 4
0 0
P(0 X 1/ 2) 1/ 4
23
Examples on Two Random Variables Cont’d……
Solution:
e. Conditional pdf of X and Y
i. Conditional pdf of X
f XY ( x, y) 2 1
f X / Y ( x / y)
fY ( y ) 2(1 y) (1 y)
1
, 0 y x 1
f X / Y ( x / y) 1 y
0, otherwise
24
Examples on Two Random Variables Cont’d……
Solution:
e. Conditional pdf of X and Y
ii. Conditional pdf of Y
f XY ( x, y ) 2 1
fY / X ( y / x)
f X ( x) 2x x
1
, 0 y x 1
fY / X ( y / x) x
0, otherwise
25
Examples on Two Random Variables Cont’d……
Example-3:
The joint pmf of two discrete random variables X and Y is given
by:
k ( 2 xi y j ) , xi 1, 2; y 1, 2
PXY ( xi , y j )
0 , otherwise
whe re k is a constant.
a. Find the value of k .
b. Find the marginal pmf of X and Y .
c. Are X and Y independen t?
26
Examples on Two Random Variables Cont’d……
Solution:
a. Pxi yj
XY ( xi , y j ) 1
2 2
k ( 2 xi y j ) 1
xi 1 y j 1
k [( 2 1) ( 2 2) ( 4 1) ( 4 2)] 1
18 k 1
k 1 / 18
27
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pmf of X and Y
i. Marginal pmf of X
2
1
PX ( xi ) PXY ( xi , y j ) ( 2 xi y j )
yj y j 1 18
1 1
PX ( xi ) ( 2 xi 1) ( 2 xi 2)
18 18
1
( 4 xi 3), xi 1, 2
PX ( xi ) 18
0, otherwise
28
Examples on Two Random Variables Cont’d……
Solution:
b. Marginal pmf of X and Y
ii. Marginal pmf of Y
2
1
PY ( y j ) PXY ( xi , y j ) ( 2 xi y j )
xi xi 1 18
1 1
PY ( y j ) ( 2 y j ) ( 4 y j )
18 18
1
( 2 y j 6), y j 1, 2
PY ( y j ) 18
0, otherwise
29
Examples on Two Random Variables Cont’d……
Solution:
c. PXY ( xi , y j ) PX ( xi ) PY ( y j )
X and Y are not independent.
30