ST2334 Chapter 3 Slides
ST2334 Chapter 3 Slides
Distributions
1 J OINT D ISTRIBUTIONS FOR M ULTIPLE R ANDOM VARIABLES
D EFINITION 2
Let X1, X2, . . . , Xn be n functions each assigning a real number to every out-
come s ∈ S. We call (X1, X2, . . . , Xn) an n-dimensional random variable
(or an n-dimensional random vector).
We define the discrete and continuous two-dimensional RVs as fol-
lows.
D EFINITION 3
1 (X,Y ) is a discrete two-dimensional RV if the number of possible values
of (X(s),Y (s)) are finite or countable.
That is the possible values of (X(s),Y (s)) may be represented by
(xi, y j ), i = 1, 2, 3, . . . ; j = 1, 2, 3, . . .
• On a day, Let
for x, y being possible values of X and Y , or in the other words (x, y) ∈ RX,Y .
The joint probability mass function has the following properties:
• The joint probability function f (x, y) for (X,Y ) is given in the ta-
ble, where each entry represents f (xi, y j ) = P(X = xi,Y = y j ).
• What is the probability that in a day line A produces more ma-
chines than line B?
Table for the joint probability function f (x, y)
x Row
y
0 1 2 3 4 5 Total
0 0 0.01 0.02 0.05 0.06 0.08 0.22
1 0.01 0.03 0.04 0.05 0.05 0.07 0.25
2 0.02 0.03 0.05 0.06 0.06 0.07 0.29
3 0.02 0.04 0.03 0.04 0.06 0.05 0.24
Column Total 0.05 0.11 0.14 0.20 0.23 0.27 1
Consider the event
Then we have
P(A) = P(X
> Y)
= P (X,Y ) = (1, 0) or (X,Y ) = (2, 0) or
(X,Y ) = (2, 1) or . . . or (X,Y ) = (5, 3)
= P (X,Y ) = (1, 0) + . . . + P (X,Y ) = (5, 3)
= f (1, 0) + f (2, 0) + . . . + f (5, 3) = 0.73.
L–example 3.3
3 4/84 0 0 0 4/84
Assume that it is the joint p.d.f. of (X,Y ). Let A = {(x, y)|0 < x < 1/2; 1 <
y < 2}. Compute P((X,Y ) ∈ A).
• Set A corresponds to the shaped area in
the figure on the right.
y
• We have 2
A
P((X,Y ) ∈ A) = P(0 < X < 1/2; 1 < Y < 2)
Z 1/2 Z 2
12
= x(x + y)dydx 1
0 1 13
Z 1/2
12
= x(x + 1.5)dx
13 0 1
12 1 3 1 2 /2
= x + 1.5 · x 0 1 x
13 3 2 0
= 11/52.
2 M ARGINAL AND C ONDITIONAL D ISTRIBUTIONS
1 3 1
= x ∑ y = x.
36 y=1 6
L–example 3.5
We reuse the joint p.f. of (X,Y ) derived in L–Example 1:
y Row
x
0 1 2 3 Total
0 0 3/84 6/84 1/84 10/84
3 4/84 0 0 0 4/84
Can we read out the marginal p.f. of X and Y from the table directly?
L–example 3.6
Reuse the p.d.f. of Example 3.3:
12
x(x + y), 0 ≤ x ≤ 1; 1 ≤ y ≤ 2
f (x, y) = 13 .
0, elsewhere
Assume that it is the joint p.d.f. of (X,Y ). Find the marginal distribu-
tion of X.
Solution: (X,Y ) is a continuous RV. For each x ∈ [0, 1], we have
Z ∞ Z 2 12
fX (x) = f (x, y)dy = x(x + y)dy
−∞
Z 2 1 13
12
= x x+ ydy
13 1
12
= x (x + 1.5) ;
13
and for x ∈
/ [0, 1], fX (x) = 0.
D EFINITION 7 (C ONDITIONAL D ISTRIBUTION )
Let (X,Y ) be a RV with joint p.f. fX,Y (x, y). Let fX (x) be the marginal p.f.
for X. Then for any x such that fX (x) > 0, the conditional probability
function of Y given X = x is defined to be
fX,Y (x, y)
fY |X (y|x) = .
fX (x)
R EMARK
• For any y such that fY (y) > 0, we can similarly define the condi-
tional distribution of X given Y = y:
fX,Y (x, y)
fX|Y (x|y) = .
fY (y)
• fY |X (y|x) is defined only for x such that fX (x) > 0; likewise fX|Y (x|y)
is defined only for y such that fY (y) > 0.
• But fY |X (y|x)
Z is not a p.f. for x; this means that there is NO re-
∞
quirement fY |X (y|x)dx = 1 for X continuous or ∑ fY |X (y|x) = 1
−∞ x
for X discrete.
f (x, y) (1/36)xy 1
fY |X (y|x) = = 1 = y,
fX (x) ( /6)x 6
for y = 1, 2, 3.
• We can compute
1
P(Y = 2|X = 1) = fY |X (2|1) = · 2 = 1/3;
6
y Row
x
0 1 2 3 Total
0 0 3/84 6/84 1/84 10/84
3 4/84 0 0 0 4/84
Can we read out the conditional p.f. fX|Y (x|y) and fY |X (y|x) from the
table directly? How to compute E(Y |X = x)?
L–example 3.8 Reuse Examples 3.3 and L–Example 2.
f (x, y) (12/13)x(x + y)
fY |X (y|x) = = 12
fX (x) ( /13)x (x + 1.5)
x+y
= ,
x + 1.5
• We can compute
Z 1.5 0.5 + y
P(Y ≤ 1.5|X = 0.5) = dy = 0.5625.
1 0.5 + 1.5
• Furthermore
Z 2 0.5 + y
E(Y |X = 0.5) = y dy
1 0.5 + 1.5
1 2
Z
= (0.5y + y2)dy
2 1
1 3 7
= + = 37/24.
2 4 3
3 I NDEPENDENT R ANDOM VARIABLES
y
x fX (x)
1 3 5
2 0.1 0.2 0.1 0.4
4 0.15 0.3 0.15 0.6
fY (y) 0.25 0.5 0.25 1
y
x fX (x)
0 1 2 3
0 1/8 1/4 1/8 0 1/2
1 0 1/8 1/4 1/8 1/2
fY (y) 1/8 3/8 3/8 1/8 1
• For any (x, y) ∈ RX,Y , we have fX,Y (x, y) = C · g1(x)g2(y); that is, it
can be “factorized" as the product of two functions g1 and g2,
where the former depends on x only, the latter depends on y
only, and C is a constant not depending on both x and y.
Note: g1(x) and g2(y) on their own are NOT necessarily p.f.s.
1
• We use the joint p.d. in Example 3.2 to illustrate: f (x, y) = xy
36
for x = 1, 2, 3 and y = 1, 2, 3.
g1(x)
fX (x) = .
g
∑t∈RX 1 (t)
g1(x)
fX (x) = R dt.
g
t∈RX 1 (t)
• We continue to use the example above to illustrate. Here X is a
discrete RV, RX = A1 = {1, 2, 3}. We obtain its p.m.f.:
g1(x) x
fX (x) = = 3 = x/6.
∑x∈RX g1(x) ∑x=1 x
g2(y) 1+y 2
fY (y) = R = R1 = (1 + y).
g
y∈A2 2 (y)dy 0 (1 + y)dy
3
4 E XPECTATION AND C OVARIANCE
D EFINITION 9 (E XPECTATION )
For any two variable function g(x, y),
• if (X,Y ) is a discrete RV,
E(g(X,Y )) = ∑ ∑ g(x, y) fX,Y (x, y);
x y
D EFINITION 10 (C OVARIANCE )
The covariance of X and Y is defined to be
y
x fX (x)
0 1 2 3
0 1/8 1/4 1/8 0 1/2
1 0 1/8 1/4 1/8 1/2
fY (y) 1/8 3/8 3/8 1/8 1
Therefore
x2 + xy , for 0 ≤ x ≤ 1, 0 ≤ y ≤ 2
fX,Y (x, y) = 3 .
0, otherwise
For 0 ≤ x ≤ 1,
Z 2
∞ xy
Z
fX (x) = fX,Y (x, y) dy = x2 + dy
−∞ 0 3
2
2
2 xy 2 2x
= x y+ = 2x + .
6 y=0 3
It is clear that fX (x) = 0 for x < 0 or x > 1. Thus
2x2 + 2x , for 0 ≤ x ≤ 1
fX (x) = 3 .
0, otherwise
Similarly, the marginal density of Y is given as
1 + y , for 0 ≤ y ≤ 2
fY (y) = 3 6 .
0, otherwise
The conditional probability density function of Y given X = x when
0 ≤ x ≤ 1 is then given as
x2 + xy/3
fX,Y (x, y) , for 0 ≤ y ≤ 2
fY |X (y|x) = = 2x2 + 2x/3
fX (x) 0, otherwise
3x + y , for 0 ≤ y ≤ 2
= 2(3x + 1) .
0, otherwise
(b) We shall use the expression cov(X,Y ) = E(XY ) − E(X)E(Y ).
Now
Z 2Z 1
2 xy
E(XY ) = xy x + dx dy
0 0 3
Z 2Z 1 2 2
yx
= yx3 + dx dy
0 0 3
Z 2 4 2 3
1
x yx
= y + dy
0 4 9 x=0
y y2
Z 2
= + dy
0 4 9
43
= .
54
We have computed the marginal distributions for X and Y in Part
(a). Thus
Z 1 4 3
1
2x 2x 2x 13
E(X) = x 2x2 + dx = + = ,
0 3 4 9 x=0 18
and
2
2 3
2
1 y y y 10
Z
E(Y ) = y + dy = + = .
0 3 6 6 18 y=0 9
This gives
43 13 10 1
cov(X,Y ) = E(XY ) − E(X)E(Y ) = − × = − .
54 18 9 162
L–example 3.14
V (X ±Y ) = V (X) +V (Y ).