Two Dimensional Random Variable
Two Dimensional Random Variable
Suppose X and Y be two random variables defined on the same sample space (S). With every
w S we can associate Z w X w , Y w , Z w R 2 . Under certain conditions Z is called a
two dimensional random variable.
. . . . . . . .
. . . . . . . .
. . . . . . . .
…. …. p j
ij pi
xi pi1 pi2 pij pin
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
. . . . . . . .
. . . . . . . .
. . . . . . . .
…. …. p
j
mj pm
xm pm1 pm2 pmj pmn
Tota p
i
i1 p1 pi 2 p2
i
…. pi
im pm …. p
i
in pn
l 1
X x1 x2 ………………. xm
P(X = xi) p1. p2. ……………….. pm.
= P1 j P2 j ...... Pmj P ij
P. j
i
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Thus, the pairs of values y j , P Y y j give the Marginal Probability Distribution of Y
Y y1 y2 …………… Yn
P(Y = yi) p.1 p.2 …………… p.n
P X xi / Y y j =
P X xi , Y y j P ij
P Y y j P. j
P X xi , Y y j Pij
P Y y j / X xi
P X xi Pi .
Remarks:
1. pi. p1. p2. ...... pm. 1
i
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Suppose (X, Y) be a two dimensional continuous random variable, then the joint probability
distribution function of (X, Y) is denoted by F(x, y) and is defined as
F ( x , y ) P X x, Y y
x y
= f x, y dx dy
(a) FX ( x) P X x, Y F x,
x
= f x, y dy dx
FY ( y ) P X , Y y F , y or
y
= f x, y dx dy
Let (X, Y) be a two dimensional random variable whose joint probability distribution
function is given by F(x, y). The conditional probability distribution function of Y given X
= x, can be denoted by F(y/x) and is defined as
F(y/x) = P[Y y/X= x].
Now, the probability distribution function F(x, y) may be expressed in terms of the
conditional distribution function F(y/x) as
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
x
F(x, y) =
F y / x d
2 FX x
x
= F ( y / x) f
2 X ( x) dx
dFX ( x)
where f X ( x) is the marginal p.d.f. of X.
dx
Similarly, we have
y y
F(x, y) =
F x / y d F y F x / y f y dy
1 Y
1 Y
dFY ( y )
where fY ( y ) is the marginal p.d.f. of Y.
dy
Here, F(x/y) = P X x / Y y
F1 x / y , F2 y / x are respectively the conditional distribution function of X and Y.
Suppose (X, Y) be a two dimensional continuous random variable, whose joint probability
distribution function is given by F(x, y). If f(x, y) is any continuous function of x and y, for - <
x < , - < y < , such that
2 F x, y y x
f x, y or F x, y f x, y dx dy
x y
then f(x, y) is called the joint probability density function of (X, Y). It should be noted that f(x,
y) > 0 and f x, y dx dy 1
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
d FX x
1. fX(x) = f x, y dy
dx
d FY y
2. fY(y) = f x, y dx
dy
Suppose f(x, y) be the joint probability density function of a two dimensional random
variable (X, Y); and fX(x) and fY(y) be the marginal probability density function of X and Y
respectively. Then the conditional probability density function of X given Y = y, is
f x, y
f(x/y) = , provided fY(y) 0
fY y
Similarly, the conditional probability density function of Y given X = x is defined as
f x, y
f(y/x) = , provided fX (x) 0
fX x
Remarks: We have,
(i) f(x/y) = F x / y
x
(ii) f(y/x) = F y / x
y
Problem : In the experiment of rolling two dice, two random variables X and Y are
defined as follows:
X: Sum of the scores on the upper most faces of the dice
Y: Product of the scores on the upper most faces of the dice.
Find the probability that X=5 and Y=6
Problem : Given below is the joint probability distribution of two random variables X and
Y:
X 1 2 3
Y
1 1/12 1/6 0
2 0 1/9
1/5
3 1/18 1/4
2/15
Derive the conditional distribution of Y given X=2.
These conditional probabilities define the conditional probability distribution of Y given X=3.
Problem : Let X1 and X2 be two random variables whose joint probability mass function
is given by,
x1 x2
P[X1=x1, X2=x2] = ; x1=1, 2, 3; x2=1, 2
21
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Solution: P[X1=x1]= P [ X 1 x1 , X 2 x2 ]
x2
x1 1 x1 2 2 x1 3
=
21 21 21
2x 3 2 1 3 5
P[ X1 x1 ] 1 ; P[ X1 1]
21 21 21
Marginal probability distribution of X1:
X1 1 2
3
P[X1=x1] 5/21 7/21
9/21
x1 x2
P[ X 2 x2 ] P[ X 1
x1 , X 2 x2 ]
21
x1 x1
1 x2 2 x2 3 x2
21 21 21
3 x2 6
=
21
9
P[ X 2 1]
21
2
Problem : X and Y are discrete random variables, for which, P[X=0, Y=0]= ; P[X=0,
9
1 1 5
Y=1]= : P[X=1, Y=0]= ; P[X=1, Y=1]= . Examine whenever X and Y are independent.
9 9 9
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Solution:
P [X=0]= P[X=0, Y=0] + P [X=0, Y=1]
2 1 3
=
9 9 9
P [X=1]= P [X=1, Y=0] + P [X=1, Y=1]
1 5 6
=
9 9 9
2 1 3
P [Y=0] = P [X=0, Y=0] + P [X=1, Y=0] =
9 9 9
1 5 6
P [Y=1] = P[X=0, Y=1] + P[X=1, Y=1] =
9 9 9
3 3 1 2
P [X=0] P [Y=0] = = P [X=0, Y=0]
9 9 9 9
X and Y are not independent
Problem : Two cards are randomly drawn (without replacement) from an arbitrary deck
of 52 playing cards. X and Y are number of aces obtained in the first draw and number of aces
drawn in both draws. Find. (a). the joint probability distribution of X and Y; (b) the marginal
distribution of X; (c) The conditional distribution of Y given X=1
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
4
C0 48 C2 4
C2 46 C0
P(X=0, Y=2) = 52
50
C2 C2
P [X = 0, Y = 3] = P [X = 0, Y = 4] = 0
P [X = 1, Y = 0] = 0
4
C1 48C1 3
C0 47C2
P [X = 1, Y = 1] = 52
50
C2 C2
C1 C1 C1 C1
4 48 3 47
P [X = 1, Y = 2] = 52
50
C2 C2
C1 C1 C 2 C0
4 48 3 47
P [X = 1, Y = 3] = 52
52
C2 C2
P [X = 1, Y = 4] = 0
P [X = 2, Y = 0] = 0
P [X = 2, Y = 1] = 0
4
C2 48 C0 2 C0 48 C1
P [X = 2, Y = 2] = 52
50
C2 C2
4
C2 48C0 2
C1 48C1
P [X = 2, Y = 3] = 52
50
C2 C2
C2 48C0
4 2
C2 48C0
P [X = 2, Y = 4] = 52
52
C2 C2
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
4
C0 48C2
P [X=0]= 52
C2
C1 48C1
4
P [X=1]= 52
C2
C2 48C0
4
P [X=2]= 52
C2
(c) The conditional distribution of Y given X = 1:
P [ X 1, Y 0] 0
P [Y = 0 / X = 1] = 0
P [ X 1] P[ X 1]
P[ X 1, Y 1]
P [Y=1/X=1] =
P [ X 1]
4
C1 48 C1 3C0 47C2 4
C1 48C1 C0 47C2
3
52
50 52
= 50
C2 C2 C2 C2
P [ X 1, Y 2] C1 47C1
3
P [Y = 2 / X = 1] =
P [ X 1] 50
C2
P [ X 1, Y 2] 8
C0 47C0
P [Y = 3 / X = 1] =
P [ X 1] 50
C2
P [X = 4 / X = 1] = 0
Problem 6.20.6 : X and Y are two random variables whose joint probability distribution is given
by
X 1 2 3
Y
1 0.1 0.1 0.2
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
X 1 2 3
P X x Y 2 2 3 1
6 6 6
(b) X Y 4 X 1, Y 1 X 1, Y 2 X 2, Y 1
P X Y 4 P X 1, Y 1 P X 1, Y 2 P X 2, Y 1
=0.1+0.2+0.1=0.4
P X Y 4 0.4
Problem : Two unbiased dice are rolled. X and Y represent the scores on first and second
dice respectively, find the probabilities given below:
(a) P X Y 6 (b) P X Y 10
(c) P X Y (d) P X Y 6 Y 4
Solution:
a X Y 6 X 1, Y 5 X 2, Y 4 X 3, Y 3 X 4, Y 2 X 5, Y 1
5
P X Y 6
36
b X Y 10 X Y 10 X Y 11 X Y 12
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
X 4, Y 6 X 5, Y 5 X 6, Y 4 X 5, Y 6 X 6, Y 5 X 6, Y 6
6 1
P X Y 10
36 6
(c) X Y X 1, Y 1 X 2, Y 2 ........ X 6, Y 6
6 1
P X Y
36 6
(d) X Y 6 Y 4 X 2, Y 4
1
P X Y 6 Y 4 P X 2, Y 4
36
Problem : The joint probability mass function of two random variables X and Y is
specified as follows:
1
P X x, Y y 2x y , x 0,1, 2; y 0,1, 2.
27
Find the conditional distribution Y for given X.
Solution :
Y
0 1 2 P[X=x]
X
1 2 3
0 0
27 27 27
1 2 3 4 9
27 27 27 27
2 4 5 6 15
27 27 27 27
1
f x, y 2 x y , x 0,1, 2; y 0,1, 2
27
Marginal distribution of X:
3 9 15
P X 0 ; P X 1 ; P X 2 ;
27 27 27
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Conditional probability P Y y / X 0 ;
P X 0, Y 0
P Y 0 / X 0 0
P X 0
1/ 27 1
P Y 1 X 0
3/ 27 3
2 / 27 2
P Y 2 X 0
3/ 27 3
Conditional probabilities : P Y y X 1
2 / 27 2
P Y 0 X 1
9 / 27 9
3/ 27 3
P Y 1 X 1
9 / 27 9
4 / 27 4
P Y 2 X 1
9 / 27 9
Conditional Probabilities : P Y y X 2
4 / 27 4
P Y 0 X 2
15 / 27 15
5 / 27 5
P Y 1 X 2
15 / 27 15
6 / 27 6
P Y 2 X 2
15 / 27 15
Conditional distribution of Y for X x :
X
0 1 2
Y
0 0 1/3 2/3
1 2/9 3/9 4/9
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Problem : X and Y are two random variables whose joint probability density function is
given by,
x y if 0<x<1, 0<y<1
f x, y
0 otherwise
Find (a) the joint distribution function (b) marginal density functions and (c) conditional density
functions
x y
x y
F x, y u v du dv u v dv du
0 0 0 0
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
y
x
v2
x
y2
uv du uy du
0
2 0 0
2
x
u 2 y y 2u x 2 y xy 2 xy
x y
2 2 0 2 2 2
xy
F x, y x y , 0 x 1, 0 y 1
2
x 1, 0 y 1
x y
1 y
x y
F x, y u v du dv u v dv du u v dv du
0 0 0 0 1 0
1
y2
uy du 0
0
2
1
1
y2 u 2 y uy 2 y y2 y
F x, y uy du 1 y
0
2 2 2 0 2 2 2
y
F x, y 1 y , x 1, 0 y 1
2
Let (x, y) belong to region – III
x 1, y 1
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
x y
1 1 y
x 1 y
F x, y u v du dv u v dv u v dv du u v dv u v dv du
0 0 0 0 1 1 0 1
1 1
u v dv du 0 0
0 0
1 1
1
u2
1
1 u2 1 1 1
uv du u du 1
0
0
2 0 2 2 2 0 2 2
0 x 1, y 1
x 1
F x, y u v dv du
0 0
1
x
v2
uv du
0
2 0
x
1
x
u2 u x2 x
u du
0
2 2 2 0 2 2
x
F x, y 1 x , if 0 x 1, y 1
2
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
0 if x 0 or y 0
xy
x y if 0 x 1, 0 y 1
2
y
F x, y 1 y if x 1, 0 y 1
2
1 if x 1, y 1
x
1 x if 0 x 1, y 1
2
1
1
y2 1
f1 x x y dy xy 0 x
1
0 2 0 2
1
f1 x x if 0 x 1
2
1
1
x2 1
f 2 y x y dx xy 0 y
1
0 2 0 2
1
f2 y y if 0 y 1
2
f x, y x y
g1 x / y
f1 y y ½
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
2 x y
if 0 x 1
g1 x / y 2 y 1
0
otherwise
f x, y x y
g2 y / x
f2 x x
1
2
2 x y
if 0 y 1
g2 y / x 2 x 1
0
otherwise
Problem : The joint probability density function of two random variables X and Y is
given by,
8 xy, 0 x y 1
F x, y
0 otherwise
1 1
Find (a) P X Y ,(b) marginal and conditional distributions
2
4
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
1/ 4
1/ 4
y4
4 y dy 4
3
0 4 0
1
256
1 1 1
P X Y
2 4 256
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
f 2 ( y ) 8 xy dx 8 y x dx 8 y
0 0 2 0
=4y3
f2 ( y) 4 y3 , o y 1
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
f ( x, y ) 8 xy 2y
g2 y / x
f1 ( x) 4 x(1 x ) 1 x 2
2
2y
g2 y / x ; x y 1, 0 x 1
1 x2
2 if x y 1, x 0 and y 0
f x, y
0 otherwise
Find the conditional distribution of Y, given X=x.
Solution:
2 if ( x, y) { x, y : x 0, y 0, x y 1
F x, y
0 otherwise
Vertical variation:
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
0 y 1 x
1 x
Density of X: f1 ( x) 2dy 2(1 x)
0
2(1 x), if 0 x 1
f1 ( x)
0
Conditional density of y given x:
f ( x, y ) 2 1
g y / x
f1 ( x) 2(1 x) 1 x
1
g y / x ;0 y 1 x , 0 x 1
1 x
f1 ( x) 3(1 x)2 , 0 x 1
Marginal density function of Y:
f 2 ( y ) 3(1 y )2
Product of marginal densities: f1 ( x) f 2 ( y ) 9 1 x 1 y
2 2
f ( x, y )
X and Y are not independently distributed.
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Problem : The following expression stands for a joint probability density function:
k x x y ,if 0 x 1, x y x
f x, y find the value of k.
0 otherwise
1 x
Solution: kx x y dx dy 1
0 x
1
x
k x( x y )dy dx 1
0 x
1
k 2 x3dx 1
0
k
1 k 2
2
2 x( x y ) if 0 x 1, x y x
f x, y
0 otherwise
Problem : Given below is the distribution function of the random variables X and Y:
1 e x e y e x y , x 0, y 0
F x, y
0 , otherwise
Find P(X+Y>3)
2 F ( x, y)
Solution: e x y
xy
e x y , x 0, y 0
f x, y
0 , otherwise
To find the required probability we use the change of variable technique
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
Let x y v
yu
x u v x v u
Since x>0, v>u
u v
If x and y are replaced by u and v we obtain,
G (u , v) e v J
Usually when a transformation of variables takes place, to bring equality between integrals of the two
functions, the transformed function should be multiplied by , |J|,called the modulus of Jacobian
transformation.
If two variables are involved
x x
u v
J
y y
u v
In the present case, we have,
x v u
yu
x x y y
1; 1; 1; 0
u v u v
1 1
J 1
1 0
|J| = 1
G u, v ev
e v , 0 u v, 0 v
G u, v
0 , otherwise
Let f2(v) be the marginal density of v.
v u
f 2 v e du e
v v
du ve
v
0 0
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
v e v , v 0
f2 v
0 , otherwise
The desired probability is P X Y 3
P X Y 3 P V 3 v e v dv
3
v e v e v dv
3
3
1
x 1
f1 x 2
0 otherwise
1
1 1
f2 y 1 xy dy
1
4 2
1
, y 1
f2 y 2
0 otherwise
x
1
P X x P x X x
2
dx
x
2
Dr.Mokesh Rayalu,M.Sc,Ph.D.,
MAT 2001- Statistics for Engineers
x
x
x
2 x
P X 2 x x 1
P Y 2 y y 2
Consider the event, X 2 x, Y 2 y x X x , y Y y
x y 1
P X 2 x, Y 2 y 4
1 xy dy dx x y
x
y
Dr.Mokesh Rayalu,M.Sc,Ph.D.,