Conditional Distribution
Conditional Distribution
Conditional Distribution
The
conditional distribution of the random variable Y given that X = x is
f (x, y)
f (y | x) = , provided g(x) > 0.
g(x)
f (x, y)
f (x | y) = , provided h(y) > 0.
h(y)
If we wish to find the probability that the discrete random variable X falls between a and b when
it is known that the discrete variable Y = y, we evaluate
X
P (a < X < b | Y = y) = f (x | y),
a<x<b
where the summation extends over all values of X between a and b. When X and Y are continuous,
we evaluate
Zb
P (a < X < b | Y = y) = f (x | y) dx.
Example 13: The joint density for the random variables (X, Y ), where X is the unit temperature
change and Y is the proportion of spectrum shift that a certain atomic particle produces, is
(
10xy 2 if 0 < x < y < 1,
f (x) =
0, elsewhere.
(a). Find the marginal densities g(x), h(y), and the conditional density f (y | x).
(b). Find the probability that the spectrum shifts more than half of the total observations, given
that the temperature is increased by 0.25 unit.
Solution:
(a). By definition
Z∞ Z1 y=1
10 3 10
g(x) = f (x, y) dy = 10xy 2 dy = xy = x(1 − x3 ), 0 < x < 1.
3 y=x 3
−∞ x
Z∞ Zy x=y
h(y) = f (x, y) dx = 10xy 2 dy = 5x2 y 2 = 5y 4 , 0 < y < 1.
x=0
−∞ 0
Now
f (x, y) 10xy 2 3y 2
f (y | x) = = 10 = , 0 < y < 1.
g(x) 3
x(1 − x3 ) 1 − x3
10
(b). Therefore
Z1 Z1
1 3y 2 8
P (Y > | X = 0.25) = f (y | x = 0.25) dy = 3
dy = .
2 1 − 0.25 9
1/2 1/2
and
Z1/2 1/2
1 1 1 x x2 3
P( < X < | Y = ) = dx = = .
4 2 3 2 4 1/4 64
1/4
Question: Determine the values of c so that the following functions represent joint probability
distributions of the random variables X and Y :
Solution: Obviously, in both parts, random variables X and Y are discrete random variables.
(a). Then
XX 3 X
X 3 3
X 3
X
1 = f (x, y) = cxy = c x y
x y x=1 y=1 x=1 y=1
= c (1 + 2 + 3) (1 + 2 + 3) = c(6 × 6) = 36c
11
1
Hence 36c = 1. This implies c = 36
.
(b). Now
XX XX
1 = f (x, y) = c|x − y|
x y x y
= c |(−2) − (−2)| + |0 − (−2)| + |2 − (−2)| + |(−2) − (3)| + |0 − 3| + |2 − 3|
= c(0 + 2 + 4 + 5 + 3 + 1) = 15c
1
Hence 15c = 1. This implies c = 15
.
Question: Consider the random variables X and Y with joint density function
(
x + y if 0 ≤ x, y ≤ 1,
f (x) =
0, elsewhere.
Solution:
(a). First find the marginal distribution of the random variable X by formula
Z∞ Z1 1
y2
1
g(x) = f (x, y) dy = x + y dy = xy + = x+ .
2 y=0 2
−∞ 0
Z∞ Z1 1
x2
1
h(y) = f (x, y) dx = x + y dx = xy + = y+ .
2 x=0 2
−∞ 0
(b). Now
Z1 Z1
P (X > 0.5, Y > 0.5) = P (0.5 < X < 1, 0.5 < Y < 1) = f (x, y) dy dx
0.5 0.5
Z1 Z1 Z1 1
y2
= x + y dy dx = xy + dx
2 0.5
0.5 0.5 0.5
Z1 Z1
12 0.52
x 3
= x.1 + − x.0.5 − dx = + dx
2 2 2 8
0.5 0.5
2 1
x 3x 3
= + = .
4 8 0.5 8
12
Exercise: Questions No: 3.37, 3.38, 3.40, 3.41, 3.42, 3.43, 3.48, 3.49, 3.50, 3.53, 3.62, 3.66.
Example 15: Assuming that 1 fair coin was tossed twice, we find that the sample space for our
experiment is S = {HH, HT, T H, T T }. Let X is the number of heads that occur per toss. Since
the 4 sample points are all equally likely, it follows that
1 1 1 1
P (X = 0) = P (T T ) =, P (X = 1) = P (HT ) + P (T H) = + =
4 4 4 2
1
P (X = 2) = P (HH) = .
4
Hence
1 1 1
µ = E(X) = (0)( ) + (1)( ) + (2)( ) = 1.
4 2 4
Example 16: A lot containing 7 components is sampled by a quality inspector; the lot contains
4 good components and 3 defective components. A sample of 3 is taken by the inspector. Find
the expected value of the number of good components in this sample.
Solution: Let X represent the number of good components in the sample. The probability dis-
tribution of X is
4
3
x 3−x
f (x) = 7
, x = 0, 1, 2, 3.
3
Simple calculations yield f (0) = 1/35, f (1) = 12/35, f (2) = 18/35, and f (3) = 4/35. Therefore,
1 12 18 4 12
µ = E(X) = (0)( ) + (1)( ) + (2)( ) + (4)( ) = .
35 35 35 35 7
Example 17: Let X be the random variable that denotes the life in hours of a certain electronic
device. The probability density function is
(
20,000
x3
if x > 100
f (x) =
0, elsewhere.
13