STAT2601A (23-24, 1st) Tutorial 11
STAT2601A (23-24, 1st) Tutorial 11
Core course for App.AI , Bioinfo., Data Sci.&Eng., Dec.Analytics, Q.Fin., Risk Mgmt. and Stat. Majors:
1 Revision
Transformation of Multivariate Distributions
Let X1 , X2 , . . . , Xn be jointly distributed continuous random variables with joint probability density
function fX (x1 , x2 , . . . , xn ). Also, let Yi = gi (X1 , X2 , . . . , Xn ), i = 1, 2, . . . , n for some functions g’s
which satisfy the following conditions:
2. The functions gi ’s have continuous partial derivatives at all points (x1 , x2 , . . . , xn ) and the n × n
Jacobian determinant is non-zero, i.e.,
where xi = hi (y1 , y2 , . . . , yn ), i = 1, 2, . . . , n.
In fact, for easier calculation, the reciprocal of the Jacobian determinant J(x1 , x2 , . . . , xn ) can
be determined as follows:
∂h1 ∂h1 ∂h1
∂y1 ∂y2
··· ∂yn
∂h2 ∂h2 ∂h2
∂y1 ∂y2
··· ∂yn
J(x1 , x2 , . . . , xn )−1 = .. .. .. .. ,
. . . .
∂hn ∂hn ∂hn
∂y1 ∂y2
··· ∂yn
1. Z = X + Y
P P
Discrete case: pZ (z) = Pr(X + Y = z) = x p(x, z − x) = y p(z − y, y)
Continuous case:
FZ (z) = Pr(Z ≤ z) = Pr(X + Y ≤ z)
ˆ ∞ ˆ z−x
= Pr(Y ≤ z − X) = f (x, y)dydx
−∞ −∞
ˆ ∞ ˆ z−y
= Pr(X ≤ z − Y ) = f (x, y)dxdy,
−∞ −∞
ˆ ∞ ˆ ∞
0
fZ (z) = F (z) = f (x, z − x)dx = f (z − y, y)dy.
−∞ −∞
2. Z = X − Y
P P
Discrete case: pZ (z) = Pr(X − Y = z) = x p(x, x − z) = y p(z + y, y)
Continuous case:
FZ (z) = Pr(Z ≤ z) = Pr(X − Y ≤ z)
ˆ ∞ˆ ∞
= Pr(Y ≥ X − z) = f (x, y)dydx
−∞ x−z
ˆ ∞ ˆ z+y
= Pr(X ≤ z + Y ) = f (x, y)dxdy,
−∞ −∞
ˆ ∞ ˆ ∞
0
fZ (z) = F (z) = f (x, x − z)dx = f (z + y, y)dy.
−∞ −∞
3. Z = XY
P P
Discrete case: pZ (z) = Pr(XY = z) = x p(x, x/z) = y p(y/z, y)
Continuous case:
FZ (z) = Pr(Z ≤ z) = Pr(XY ≤ z)
= Pr(Y ≤ z/X, X > 0) + Pr(Y ≥ z/X, X < 0)
ˆ ∞ ˆ z/x ˆ 0 ˆ ∞
= f (x, y)dydx + f (x, y)dydx,
0 −∞ −∞ z/x
ˆ ∞ ˆ 0
1 1
fZ (z) = F 0 (z) = f (x, z/x) dx − f (x, z/x) dx
0 x −∞ x
ˆ ∞ ˆ ∞
1 1
= f (x, z/x) dx = f (z/y, y) dy.
−∞ x −∞ y
X
4. Z = Y
P P
Discrete case: pZ (z) = Pr(X/Y = z) = x p(x, xz) = y p(yz, y)
Continuous case:
FZ (z) = Pr(Z ≤ z) = Pr(X/Y ≤ z)
= Pr(X ≤ zY, Y > 0) + Pr(X ≥ zY, Y < 0)
ˆ ∞ ˆ zy ˆ 0 ˆ ∞
= f (x, y)dxdy + f (x, y)dxdy,
0 −∞ −∞ zy
ˆ ∞ ˆ 0
fZ (z) = F 0 (z) = f (zy, y)ydy − f (zy, y)ydy
0 −∞
ˆ ∞ ˆ ∞
|x|
= f (x, x/z) 2 dx = f (zy, y)|y|dy.
−∞ z −∞
2 Exercises
1. Let X and Y be random variables with joint pdf
( −y
2xe
y2
, for 0 < x < y < ∞;
f (x, y) =
0, otherwise.
Let W = Y − X, Z = Y + X. Find the joint pdf of W and Z.
Solution:
Given ( (
W =Y −X X = Z−W
2
=⇒
Z =Y +X Y = Z+W
2
∂x ∂x
− 12 1 1
J −1 (x, y) = ∂w
∂y
∂z
∂y = 1
2
1 =− .
∂w ∂z 2 2 2
∂u ∂u ∂u
∂x ∂y ∂z 1 1 0
∂v ∂v ∂v
J(x, y, z) = ∂x ∂y ∂z = 1 0 1 = −2.
∂w ∂w ∂w 0 1 1
∂x ∂y ∂z
As a result, the joint pdf of U, V, W is given by
−1 1 1
g(u, v, w) = e−(x+y+z) = e− 2 (u+v+w) , u > 0, v > 0, w > 0.
2 2
Solution:
(a) Let
U = XY, V = X/Y
√
r
U
=⇒ X = U V , Y = , X > 1, Y >1
√
V √
∂x ∂x v u
√ √ −1 1 −1
J −1 (x, y) = ∂u
∂y
∂v
∂y = 2 u 2 √v
− u = − = .
√1 √ 4v 4v 2v
∂u ∂v 2 uv 2 v3
1 v −1 1 1
fU,V (u, v) = = 2 , ≤ v ≤ u, 1 ≤ u < ∞.
uv u 2v 2u v u
For 1 ≤ v < ∞,
ˆ ∞ ∞
1 1 1 1
fV (v) = 2
du = − = 2.
v 2u v 2v u v 2v
Therefore, the marginal pdf of V is
(
1
2
, for 0 < v < 1;
fV (v) = 1
2v 2
, for 1 ≤ v < ∞.
y y
z
1 1
z region of region of
integration integration
z−1
x x
0 z 1 0 z−1 1 z
x + y = z where z < 1 x + y = z where z > 1
(a) Determine the probability mass function and moment generating function of X + Y .
(b) Determine the moment generating function of X − Y .
Solution:
6. In the past, the overall assessment of the course STAT2601 was made up by coursework (25%)
and a final examination (75%). Suppose that the coursework mark and final examination mark
of a student of STAT2601 are independently distributed as N(80, 25) and N(70, 64) respectively.
Determine the probability that this student can have an overall score higher than 85.
[How about using the current weightings? Will the probability be greater or smaller?]
Solution:
Let X and Y denote the coursework mark and final examination mark respectively. Then
they are independently distributed as X ∼ N(80, 25) and Y ∼ N(70, 64). The overall score
S = 0.25X + 0.75Y is a linear combination of X and Y and is also distributed as normal, with
mean and variance being
Therefore S ∼ N(72.5, 37.5625) and the probability that the student can have an overall score
higher than 85 can be calculated as
85 − 72.5
Pr(S > 85) = 1 − Φ √ = 1 − Φ(2.04) = 1 − 0.9793 = 0.0207.
37.5625
7. Let X and Y respectively denote the weights (in kg) of a male freshman before and after a health
fitness programme. Suppose that X and Y have a bivariate normal distribution, with marginal
distributions N(75, 121) and N(72, 144), respectively; and correlation coefficient ρ = 0.9.
(a) Let Z = X − Y represent the weight loss of a random male freshman after completing the
health fitness programme. Find the distribution of Z.
(b) Use the result in part (a), or otherwise, to determine the probability that a male freshman
can successfully lose weight after completing the health fitness programme.
Solution:
(a) The weight loss Z = X − Y is a linear combination of X and Y and is also distributed as
normal, with mean and variance being
E(Z) = 75 − 72 = 3, and
Var(Z) = Var(X) + Var(Y ) − 2Cov(X, Y )
= 121 + 144 − 2 × 0.9 × 11 × 12 = 27.4.
X
(a) Determine the joint pdf of W = XY and Z = .
Y
(b) Determine the marginal pdf of Z defined in part (a).
Solution:
√ p
(a) Note that W = XY and Z = X/Y ⇐⇒ X = W Z, Y = W/Z (X and Y must be
positive).
Hence, the transformation is one-to-one. The support of (W, Z) can be determined as
( (√ ( (
x>1 wz > 1 z > 1/w 1/w < z < w
⇐⇒ p ⇐⇒ ⇐⇒ .
y>1 w/z > 1 z<w w>1
The Jacobian determinant can be evaluated as
√ √
∂x ∂x z w
√ √ 1 1 1
∂w ∂z 2 w 2 √z
J= ∂y ∂y = =− − =− .
∂w ∂z
√1
2 wz
− 2√wz3 4z 4z 2z
(a) Find the marginal pdfs of X and Y . What marginal distributions do they have?
(b) Find the correlation coefficient between X and Y .
(c) Are X and Y independent? Why?
(d) Find the conditional pdf of X given that Y = y.
(e) Let Z = X + Y . Find the distribution function of Z.
Solution:
ˆ ∞
(a) The marginal density of X is fX (x) = 4e−2y dy = 2e−2x , x > 0.
ˆ x
y
The marginal density of Y is fY (y) = 4e−2y dx = 4ye−2y , y > 0.
0
That is, Y ∼ Γ(2, 2) and X ∼ Exp(2).
(b) Note that ˆ ˆ
∞ y
3
E(XY ) = 4xye−2y dxdy = .
0 0 4
1 1 1
E(X) = , Var(X) = , E(Y ) = 1, Var(Y ) = .
2 4 2
E(XY ) − E(X)E(Y ) 1
Corr(X, Y ) = =√ .
σX σY 2
1 (1 + v 2 )u2
|u| 6uv
= exp − − +9 , −∞ < u, v < ∞.
2π(1 + v)2 2 (1 + v)2 1+v
y
1
x
−1 0 1
−1
Solution:
(a) No. The range of X depends on Y .
(b) By definition,
ˆ √
1−x2
√
1 2 1 − x2
fX (x) = √ dy = , −1 ≤ x ≤ 1.
− 1−x2 π π
f (x, y) 1/π 1 p p
fY |X (y|x) = = √ = √ , − 1 − x2 < y < 1 − x2 .
fX (x) 2 1 − x2 /π 2 1 − x2
√ √
Hence, Y |X is uniformly distributed on − 1 − x2 , 1 − x2 .
(c) Note that E(XY ) = E [E(XY |X)] = E {X [E(Y |X)]} = E(X · 0) = 0.
Also, E(Y ) = E [E(Y |X)] = 0. Then, Cov(X, Y ) = E(XY ) − E(X)E(Y ) = 0.
f (t) 2t
The hazard rate function of R is λ(t) = = , 0 < t < 1.
S(t) 1 − t2
(f) Note that Pr(the point falls within the circle) = π4 .
Let X be the number of points accepted. Then X ∼ B(100, π4 ). We want to find Pr(X > 100
3 ).
We may use normal approximation.
100 1
Pr X > = Pr X > 33
3 3
= Pr (X > 33)
( )
33.5 − 100( π4 )
= Pr Z > p
100( π4 )(1 − π4 )
= Pr(Z > −10.97071551)
= Pr(Z < 10.97071551) ≈ 1.
∼ End of Tutorial 11 ∼