G (X) F (X, Y) : Marginal Distributions Definition 5
G (X) F (X, Y) : Marginal Distributions Definition 5
Definition 5
If X and Y are discrete random variables and f ( x , y ) is the value of their joint
probability distribution at ( x , y ) , the function given by:
g ( x ) =∑ f ( x , y )
for eachxwithin the range of X is called the marginal distribution of
y
X.
Correspondingly the function given by:
h ( y ) =∑ f ( x , y )
for eachywithin the range of Y is called the marginal distribution of
x
Y.
Example 7
The joint probability distribution function of random variables X and Y are given in the
table below:
x
1 2 3
0 1 1
1 6 6
y 1 0 1
2 6 6
1 1 0
3 6 6
Determine the:
i. Marginal distribution of X
ii. Marginal distribution of Y
Solution
x
g( y)
1 2 3
0 1 1 1
1 6 6 3
y 1 0 1 1
2 6 6 3
1 1 0 1
3 6 6 3
f (x) 1 1 1
3 3 3
Page 1 of 13
3
f ( x )= ∑ f ( x , y )
y=1
=f ( x , 1 )+ f ( x , 2 ) + f ( x , 3 )
When X =1
1 1 1
f ( 1 )=f ( 1,1 )+ f ( 1,2 ) +f ( 1,3 )=0+ 6 + 6 = 3
When X =2
1 1 1
f ( 2 )=f ( 2,1 ) +f ( 2,2 ) + f ( 2,3 ) = 6 +0+ 6 = 3
When X =3
1 1 2 1
f ( 3 ) =f ( 3,1 ) +f ( 3,2 ) + f ( 3,3 )= 6 + 6 + 0= 3 = 3
When X and Y are continuous random variables, the probability distributions are
replaced by probability densities, summations are replaced by integrals and we get
Definition 6
If X and Y are continuous random variables and f ( x , y ) is the value of their joint
probability density at ( x , y ) , the function given by:
g ( x ) =∫ f ( x , y ) dy
y is called the marginal density of X.
Page 2 of 13
Correspondingly, the function given by:
h ( y )=∫ f ( x , y ) dx
x is called the marginal densityof Y.
Example 8
Given the joint probability density
2
{
f ( x , y ) =¿ ( x+2 y ) for 0<x<1, 0< y<1 ¿ ¿¿¿
3
Find the marginal densities of X and Y.
Solution
Performing the necessary integrations, we get
1
2 2
g ( x ) =∫ f ( x , y ) dy= ∫ ( x +2 y ) dy= ( x+1 )
y y=0 3 3
CONDITIONAL DISTRIBUTIONS
We define the conditional probability of event A given event B as
Pr ( A∩B )
Pr ( A /B )=
, provided Pr ( B)≠0
Pr ( B )
Suppose now that A andB are the events X =x and Y = y , so that we can write
Pr ( X=x Y = y )=PrPr (( YX== xy ,) Y = y ) = f h( x( ,yy) )
Provided Pr ( Y = y )=h ( y )≠0 , where f ( x , y ) is the value of the joint probability
distribution of X and Y at ( x , y ) and h ( y ) is the value of the marginal distribution of
Y at y.
Page 3 of 13
If f ( x , y ) is the value of the joint probability distribution of the discrete random
variables X and Y at ( x , y ) and h ( y ) is the value of the marginal distribution of
Y at y, the function given by
f ( x y )= f h( x( ,yy) ) , h ( y )≠0
, for each x within the range of X is called the
conditional distribution of X given by Y = y .
Correspondingly, if g ( x ) is the value of the marginal distribution of X at x, the
function given by
w ( y x)= f (gx( ,x y) ) , g ( x )≠0
for each y within the range of Y is
called the conditional distribution of Y given X =x .
Definition 8
If f ( x , y ) is the value of joint density of the joint density of the continuous random
variables X and Y at ( x , y ) and h ( y ) is the value of marginal density of Y at y,the
function given by
f ( x y )= f h( x( ,yy) ) , h ( y )≠0
for −∞ < x <∞ , is called the
conditional density of X given Y = y .
Correspondingly, if g ( x ) is the value of the marginal density of X at x, the function
given by
w ( y x)= f (gx( ,xy) ) , g( x )≠0 for −∞ < x <∞ ,is called condition densityof Y
given X =x .
Example 9
Given the joint probability density
i.e.
g (x )=¿ {2 x, 0<x<1¿¿¿¿
Also
1
1
h ( y )=∫ f ( x , y ) dx= ∫ 4 xy dx=[ 2 x 2 y ]x =0= 2 y
x x=0
Page 4 of 13
i.e.
h ( y )=¿ {2 y, 0<y<1¿¿¿¿
Then, substituting into the formula for a conditional density, we get
f ( x y )= f h( x( ,yy) ) = 42xyy =2 x ,
i.e.,
f (x y )=¿ {2 x , 0<x<1 ¿¿¿¿
Page 5 of 13
Example 10
With reference to example 1, find the conditional distribution of:
(i) X given Y=1 (ii) Y given X = 0.
Solution
The results of Example 1 are shown in the following table, together with the marginal
totals, that is, the totals of the respective rows and columns:
x
0 1 2 h (y)
0 1 1 1 7
6 3 12 12
1 2 1 0 7
y 9 6 18
2 1 0 0 1
36 36
g (x) 5 1 1
12 2 12
Page 6 of 13
1 1 1 6 +12+ 3 21 7
h ( 0 )=f ( 0,0 ) + f ( 1,0 )+ f ( 2,0 )= + + = = =
6 3 12 36 36 12
When Y = 1;
2 1 8+6+ 0 14 7
h ( 1 )=f ( 0,1 )+ f ( 1,1 )+ f ( 2,1 )= + + 0= = =
9 6 36 36 18
WhenY = 2;
1 1
h ( 2 )=f ( 0,2 )+ f ( 1,2 )+ f ( 2,2 )= +0+0=
36 36
Hence the marginal probability distribution of Y is:
y 0 1 2
h( y ) 7 7 1
12 18 36
(i) Then, substituting into the formula for a conditional density, we get
f ( X= x Y =1)= f h( x( 1, 1) ) , x=0,1,2
When x = 0;
f ( X=0 Y =1 )= f h( 0,1
(1 )
) 2/ 9 4
= =
7/ 18 7
When x = 1;
f ( X=1 Y =1)= fh( 1,1 ) 1/ 6 3
= =
( 1 ) 7 /18 7
When x = 2;
f ( X=2 Y =1)= fh( 2,1
( 1)
)
=
7
0
/ 18
=0
When Y = 0;
f (Y =0 X=0 )= fg( 0,0 ) 1/ 6
= =
( 0 ) 5 /12 5
2
When Y = 1;
f (Y =1 X =0 )= f g( 0,1
( 0)
) 2/ 9
= =
8
5/ 12 15
When Y = 2;
f (Y =2 X =0 )= f g( 0,2 ) 1/ 36
= =
( 0 ) 5/ 12 15
1
Page 7 of 13
2 8 1
f (Y = y X =0 ) 5 15 15
When we are dealing with two or more random variables, questions of independence
are usually of great importance.
on y, it follows that
f ( x y )=g ( x ) , and hence the formula definition 7 and8 yield
f ( x , y ) =f ( x y )×h ( y )= g ( x )×h( y )
.
That is, the values of the joint distribution are given by the products of the
corresponding value of the two marginal distributions.
Generalizing from this observation, let us now make the following definition:
Definition 9
If f ( x , y ) is the value of joint density of the joint probability distribution function of
two discrete random variables, X and Y at (x, y), and g (x) and h (y) are the marginal
distributions of X and Y, respectively, then the two random variables are independent if
and only if
Definition 10
If f ( x , y ) is the value of joint density of the joint probability density function of two
continuous random variables, X and Y at (x, y), and g (x) and h (y) are the marginal
densities of X and Y, respectively, then the two random variables are independent if
and only if
Example 11
If the joint probability density of X and Y is given by:
Page 8 of 13
Solution
(a) Performing the necessary integrations, we get the marginal density function of X
is given by:
1− x 1− x 1−x
y 2 xy 2 y 3
g ( x ) =∫ f ( x , y ) dy= ∫ 24 y (1−x− y ) dy=24 ∫ ( y−xy − y ) dy=24 − −
y y=0 y=0 2 2
2
3 [ ] y=0
2 2 3
(1−x ) x(1−x ) (1−x ) 3−3 x−2(1−x )
=24
2[ 3
−
2
−
3
=24(1−x )2 − −
2 2 3 ]
1 x (1−x )
= 24(1−x )2 [
6 ] [ ]
24(1−x )
= =4 (1−x )3
6
i.e.
g ( x ) =¿ {4 (1−x)3 , 0<x<1 ¿ ¿¿¿
(b) Also the marginal density function of Y is given by:
1− y 1− y 1− y
x2 y
h ( y )=∫ f ( x , y ) dx = ∫ 24 y (1−x− y ) dx=24 ∫ ( y−xy− y ) dx=24 xy−
x x=0 x =0 2
2
−xy 2 [ ] x=0
y (1− y )2 (1− y )
[
=24 y (1− y )−
2 ]
− y 2 (1− y ) =24 y (1− y ) 1−
2 [ ]
− y =24 y (1− y )
2−1+ y−2 y
2 [ ]
24 y (1− y )(1− y )
= =12 y (1− y )2
2
i.e.
h ( y )=¿ {12 y(1−y)2 , 0<y<1 ¿ ¿¿¿
(c) The two random variables are independent if and only if
f ( x , y ) = g( x )×h( y ) . In our case;
3 2 3 2
g( x)× h( y)=4(1−x) ×12 y(1−y) =48 y(1−x ) (1− y ) ≠f ( x , y )
Hence, the two random variables are not independent.
Page 9 of 13
Example 12
With reference to example 1, determine whether the two random variables X and Y are
independent.
Solution
The results of Example 1 are shown in the following table, together with the marginal
totals, that is, the totals of the respective rows and columns:
x
0 1 2 h (y)
0 1 1 1 7
6 3 12 12
1 2 1 0 7
y 9 6 18
2 1 0 0 1
36 36
g (x) 5 1 1
12 2 12
5 7 35 1
g(0 )×h (0) = × = ≠f (0,0 )=
12 12 144 6
1 7 7 1
g(1)×h(1) = × = ≠f (1,1 )=
2 18 36 6
5 1 5 1
g(0 )×h (2 ) = × = ≠f (0,2 )=
12 36 432 36
Page 10 of 13
EXERCISE
(1) Given the values of the joint probability distribution of X and Y shown in the table:
x
-1 1
-1 1 1
8 2
y 0 0 1
4
1 1 0
8
Find the:
Marginal distribution of X.
(a)
(b) Marginal distribution of Y.
(c) Conditional distribution of X given Y = 1.
(d) Conditional distribution of Y given X = 0.
(2) Given the values of the joint probability distribution of X and Y shown in the table:
x
0 1 2
0 1 1 1
12 6 24
y 1 1 1 1
4 4 40
2 1 1 0
8 20
3 1 0 0
120
Find the:
1
[ g (−1 )= and g ( 1 )= 34 ]
Marginal distribution of X. ⇒ 4
(a)
5
[h (−1 ) = , h(0 )= 14 , and h(1)= 18 ]
Marginal distribution of Y. ⇒ 8 .
(b)
1
⇒ [ f (−1/−1)= 5
and f (1 /−1 )= 45 ]
(c) Conditional distribution of X given Y = -1.
(3) Check whether X and Yare independent, if their joint probability distribution is
given by:
Page 11 of 13
1
a)
f ( x , y ) = 4 for x=−1 and y=−1 ; x=−1 and y=1 , x=1 and y=−1 ,
x=1 and y=1 ⇒ independent
1
b)
f ( x , y ) = 3 for x=0 and y=0 ; x=0 and y=1 , x=1 and y=1 , ⇒ not
independent
(6) If Xis the amount of money (in dollars)that a sales person spends on a gasoline
during a day and Yis the corresponding amount of money (in dollars)for which he
or she is reimbursed, the joint density of these two random variables is given by:
f ( x , y ) =¿ 251 20−x
x
{( ) x
for 10<x<20 , 2
< y<x ¿ ¿¿¿
Find the:
20−x
[
⇒¿ g ( x )= 50
for 10<x<20 ¿ ¿ ¿]
a) Marginal density of X ; ¿
y 1
b) Condition density of Y given X =12 →
[ x=12 6 ]
f( )=
Page 12 of 13
c) Probability that the sales person will be reimbursed at least $8 when spending
$12
→ [ 1 3]
(7) The useful life (in hours)of a certain kind of vacuum tube is a random variable
having the probability density:
20,000
f ( x ) =¿ { ( x+100 )2
, x>0 ¿ ¿¿¿
If two of these tubes operate independently, find
a) The joint probability of X 1 and X 2 representing the lengths of their useful lives
( 20,000 )2
f ( x 1 , x 2 )=¿
{2
( x1+100 ) ( x 2+100 ) 2
for x 1 >0, x 2>0 ¿ ¿¿¿
Page 13 of 13