Conditional Probability Distribution
Let X and Y denote the random variables of either continuous or discrete type which have the joint probability distribution function and marginal probability density functions of and , respectively. The conditional probability function of Y given X is
The conditional probability function of X given Y is
, f x y x f x f yy
, , X
0 Y x X f x y f y f y x f x f x
, , Y
0 X y Y f x y f x f x y f y f y 3.7 Conditional Probability Distribution
The following properties must be satisfied: i)
ii) If X and Y are discrete random variables, then
iii) If X and Y are continuous random variables, then
(
)
0 or (
)
0
f y x
f x y
( ) 1 or ( ) 1
y x f y x f x y ( ) 1 or ( ) 1 y x f y x dy f x y dx
3
Example 3.19:
Using the joint probability distribution function from Example 3.9, find
a)
f(yx = 2)
b)
P(Y=1x = 2)
c)
P(Y ≥ 1│ x = 2)
X=x f(x,y) 0 1 2 Y=y 0 1/18 1/9 1/6 1 1/9 1/18 1/9 2 1/6 1/6 1/18Solution: a) ( 2) (2, ) ( 2) X f y f y x f x
2 0 (2) (2, ) (2,0) (2,1) (2, 2) X y f f y f f f 3 1 18 1 9 1 6 1 (2, ) ( , 2) ( 2) 3 ( , 2) 1 (2) 3 X f y f y f y x f y f : 2 , 1 , 0 y .:5 6 1 18 1 . 3 ) 2 , 2 ( . 3 ) 2 2 ( 3 1 9 1 . 3 ) 1 , 2 ( 3 ) 2 1 ( 2 1 6 3 ) 0 , 2 ( 3 ) 2 0 ( f x f f x f f x f y=y 0 1 2 1
) 2 (y x f 2 1 3 1 6 1b) c) (2,1) (2,1) 1 1 ( 1 2) 3 (2,1) 3. 1 (2) 9 3 3 X f f P Y x f f (2, 1) ( 1 2) 3. (2, 1) (2) X f y P Y x f y f 6 1 18 1 . 3 ) 2 , 2 ( 3 ) 2 2 ( 3 1 9 1 . 3 ) 1 , 2 ( 3 ) 2 1 ( f x y f f x y f
Exercise f(x,y) 0 1 2 0 1/18 4/18 6/18 1 3/18 3/18 1/18 X=x Y=y
Use the joint probability , find
i. 1 ii. 2 1 iii. 1 1 f x y f x y f x y Example 3.20:
If X and Y have joint probability density function
find a) b) 3 ; 0 1, 0 1 ( , ) 4 0 ; elsewhere xy x y f x y ( ) f y x 1 ( ) P Y X
9 Solution: a) x f y x f x y f x ) , ( ) (
1 0 ) 4 3 ( xy dy x fx 4 2 3 2 4 3 2 4 3 1 0 2 x x xy y x xy x xy x y f 2 3 4 3 4 2 3 4 3 ) ( ; 0 x 1,0 y 1 .:b) P y x) f (y x)dy 2 1 ( 1 2 1
1 2 1 2(3 2 ) 3 3 2 3 4 3 x x dy x xy11
Example 3.21:
The joint probability density function is given as follows:
Find
a) the marginal density of X. b) the marginal density of Y.
c) the conditional density of Y given X = x. d) the conditional density of X given Y = y.
8 ; 0 1, 0 ( , ) 0 ; elsewhere xy x y x f x y
Solution: a) b) c) d) 3 0 2 0 4 2 8 8 ) ( ) (x g x xydy xy x f x x y y x
1
0
x
, ) 1 ( 4 2 8 8 ) ( ) ( 2 1 2 1 y y y x xydx y h y f y x y x y
1 0 y , 2 3 2 4 8 ) ( ) , ( ) ( x y x xy x g y x f x y f , 0 y 1 ) 1 ( 4 8 ) ( ) , ( ) ( 2 y y xy y h y x f y x f ,0
x
1
Exercise
Let X1 and X2 have the joint pdf given as
1, 2
6 2, 0 2 1 1= 0, elsewhere.
f x x x x x
i. Find the marginal function of ii. Find f x x
2 1
.1. X
3.8 Transformation Technique
Theorem:
Let X and Y be continuous random variables having joint density function f(x,y). Let us define U =
1(X,Y), V=
2(X,Y)where X=
1(U,V), Y=
2(U,V). Then the joint density function of U and V is given by g(u,v) where1 2 ( , ) ( , ) or ( , ) ( , ) ( , ) [( ( , ), ( , )] ( , ) g u v dudv f x y dxdy x y g u v f x y f u v u v J u v
15 The Jacobian determinant atau Jacobian, J is given as follows;
( ,
)
( , )
x
x
x y
u
v
J
y
y
u v
u
v
Example 3.22:
The joint probability density function of X and Y is given as follows: Let and find 1 ; 0 1, 0 1 ( , ) 0 ; elsewhere y x f x y
U
X
Y
V X Y, ( , ). f u v17
Solution:
Substitute (2) into (1) and substitute (1) into (2)
Y
X
U
V
X
Y
Y
U
X
…..(1)Y
X
V
…..(2) 2 1 , 2 1 2 2 ) ( dv dx du dx V U X V U X V X U X V X U X 2 1 , 2 1 2 2 ) ( dv dy du dy V U Y V U Y V Y U Y V Y U Y2 1 ) 2 1 )( 2 1 ( ) 2 1 )( 2 1 ( 2 1 2 1 2 1 2 1 J
2
1
2
1
J
2 1 2 1 . 1 ) , ( ) , (u v f x y J g 1 ; 0 2, 0 2 ( , ) 2 0; elsewhere. U V U V g u v 19
Example 3.23:
are standard normal distributions functions. X1 dan X2 are independent. If and
find 1 ~ (0,1) and 2~ (0,1) X N X N 1 1 2 Y X X 1 2 2 X Y X f y y( ,1 2)
Solution:
X1~N(0,1) X2~N(0,1)
X1 and X2 are independent.
) ( 2 1 2 1 2 1 2 2 2 1
2
1
)
(
).
(
)
,
(
x
x
f
x
f
x
e
x xf
.:2 2 1 2 2 2 1 2 2 1 2 2 2 2 1 ) 1 ( , 1 1 1 : . Y Y dY dX Y dY dX Y Y X X X Y Y 2 2 1 2 1 2 2 1 1 2 1 2 1 2 1 . 2 1 ) 1 ( , 1 1 : . 1 Y Y dY dX Y Y dY dX Y Y Y X Y Y Y X Therefore, 2 2 1 2 2 2 1 2 2 ) 1 ( 1 1 ) 1 ( 1 Y Y Y Y Y Y Y J
23 2 ) 2 1 ( 1 3 ) 2 1 ( ) 2 1 ( 1 3 ) 2 1 ( 1 3 ) 2 1 ( 2 1 Y Y Y Y Y Y Y Y Y Y J y x f Y Y g( 1, 2) ( , )
2 2 2 1 1 1 1 2 2 2 2 2 1 1 exp ; , 2 2 1 1 1 Y Y Y Y Y Y Y Y Y Example 3.24:
The joint probability density function is given as follows
; 0
4, 1
5
( , )
96
0 ; otherwise
xy
x
y
f x y
Find the joint probability density function g(u,v) if U = X + 2Y and V=X.
25 Solution: Substitute (2) into (1). ) 1 ...( 2 y x U V x...(2) 2 1 , 2 1 2 2 2 dV dy dU dy V U y V U y y V U
1
,
0
dV
dx
dU
dx
x
V
2 1 2 1 2 1 1 0 dV dy dU dy dV dx dU dx J 2 1 2 1 J
J
y
x
f
V
U
g
(
,
)
(
,
)
.: ( ) ; 2 10, 0 4 ( , ) 384 . 0 ; elsewhere V U V U V V g u v 27
Example 3.25:
The joint probability density function of X1 and X2 is given as follows:
Let and , find
1 2 1 2 1 2
; 0
, 0
( ,
)
0 ; elsewhere
x xe
x
x
f x x
1 1 1 2 X Y X X Y2 X1 X2 f y y( ,1 2).Solution: Solve: and As a result: and Therefore: 1 1 2 y x x 2 1 1 2 x y x x 1 1 2 x y y 2 2(1 1) x y y
2 1 2 1 1 2 2 2 1 1 2 2 2 1 1 1 y y J y y y y y y y y y y y y 2 2 ; 0 1 , 0 2 ( , ) y e y y y g y y29
Quiz 3.8
The joint density function is given by
If and , find 1 ( ) 2 1 ; 0, 0 ( , ) 8 0 ; elsewhere x y xe x y f x y y U x