Practice Problems on Transformations of Random Variables
Math 262
x+1
1. Let X have pdf given by fX (x) = 2 for −1 ≤ x ≤ 1. Find the density of Y = X 2 .
Note that 0 ≤ Y ≤ 1. Fix y ∈ [0, 1]. Then:
√ √
FY (y) = P (Y ≤ y) = P (X 2 ≤ y) = P (− y ≤ X ≤ y)
This probability is equal to the shaded area below:
1 fX (x)
√ √ x
−1 − y y 1
√ √ √ √
The shaded region is a trapezoid with area y, so FY (y) = P (− y ≤ X ≤ y) = y. Differentiating, we
d 1
find fY (y) = FY (y) = √ for 0 ≤ y ≤ 1.
dy 2 y
2. Let Y have pdf given by fY (y) = 2(1 − y) for 0 ≤ y ≤ 1.
(a) Find the density of U1 = 2Y − 1.
U1 = g1 (Y ), where g1 (y) = 2y − 1. Since g1 is monotonic, we can apply the Transformation Theorem.
The inverse of g1 is h1 (u1 ) = u12+1 for −1 ≤ u1 ≤ 1. The density of U1 is then:
u1 + 1 1 1 − u1
fU1 (u1 ) = fY (h1 (u1 )) h01 (u1 ) = 2 1 −
2 = for − 1 ≤ u1 ≤ 1.
2 2
(b) Find the density of U2 = 1 − 2Y .
U2 = g2 (Y ), where g2 (y) = 1 − 2y. Since g2 is monotonic, we can apply the Transformation Theorem.
The inverse of g2 is h2 (u2 ) = 1−u2
2
, for −1 ≤ u2 ≤ 1. The density of U2 is then:
1 − u2 1 1 + u2
fU2 (u2 ) = fY (h2 (u2 )) h02 (u2 ) = 2 1 −
2 = for − 1 ≤ u2 ≤ 1.
2 2
(c) Find the density of U3 = Y 2 .
U3 = g3 (Y ), where g3 (y) = y 2 , which is monotonic on the interval 0 ≤ y ≤ 1, so we can apply the
√
Transformation Theorem. The inverse of g3 is h3 (u3 ) = u3 , for 0 ≤ u3 ≤ 1. The density of U3 is then:
0 √ 1 1
fU3 (u3 ) = fY (h3 (u3 )) h3 (u3 ) = 2 (1 − u3 ) √ = √ − 1
for 0 ≤ u3 ≤ 1.
2 u3 u3
√
3. Let X ∼ Unif[0, 1]. Find the density of U = X.
√
First, fX (x) = 1 for 0 ≤ x ≤ 1. Since U = g(X), where g(x) = x, which is monotonic, we can apply the
Transformation Theorem. The inverse of g is h(u) = u2 for 0 ≤ u ≤ 1. The density of U is then:
fU (u) = fX (h(u)) h0 (u) = 1 |2u| = 2u
for 0 ≤ u ≤ 1.
4. Two sentries are sent to patrol a road that is 1 mile long. The sentries are sent to points
chosen independently and uniformly along the road. Find the probability that the sentries
will be less than 12 mile apart when they reach their assigned posts.
Let X1 and X2 be the posts of the sentries along the road; X1 and X2 are iid Unif[0, 1]. Thus, their joint
density is f (x1 , x2 ) = 1 for 0 ≤ x1 ≤ 1 and 0 ≤ x2 ≤ 1.
Let Y = X1 − X2 . We want P − 21 < Y < 21 . Note that we don’t need the density of Y to answer the
question: since the joint density of X1 and X2 is constant on the unit square, the probability P − 21 < Y < 12
is equal to the area of the shaded region R in the following figure.
x2
1
1
2 R
1 1 x1
2
Thus, P − 12 < Y < 1
= 34 .
2
5. The joint distribution for the lifetimes of two different types of components operating in a
system is given by (
1
y1 e−(y1 +y2 )/2 if y1 > 0, y2 > 0,
f (y1 , y2 ) = 8
0 otherwise.
Y2
Find the density function for the ratio U = Y1 .
Using the (bivariate) distribution function method, first note that U can be any positive number. Fix u > 0,
and note that the set of where U = YY12 = u in the y1 y2 -plane is the line y2 = uy1 .
y2
y2 = uy1
y1
The region where U = YY21 ≤ u is the region in the first quadrant where y2 ≤ uy1 , which is the shaded region
in the figure above.
Z ∞ Z uy1
u2 + 2u
Y2 1
Then, P (U ≤ u) = P ≤u = y1 e−(y1 +y2 )/2 dy2 dy1 = .
Y1 0 0 8 (1 + u)2
2
d u + 2u 2
Thus, the density of U is fU (u) = = , for u > 0.
du (1 + u)2 (1 + u)3
6. Suppose X and Y are independent exponential rvs with parameter λ. Find the joint density
of V = X
Y and W = X + Y . Use the joint density to find the marginal distributions.
We will use the bivariate tranformation theorem. Note that the joint density of X and Y is given by f (x, y) =
λ2 e−λ(x+y) for x > 0 and y > 0.
We must solve for X and Y in terms of V and W . Since V = X Y
, it follows that X = V Y , and then
W = X + Y = V Y + Y , which we solve for Y to obtain Y = VW+1
. Similarly, we find X = VV +1
W
. Thus, we have
vw w
X = φ(V, W ) where φ(v, w) = v+1 , and Y = ψ(V, W ) where ψ(v, w) = v+1 .
The Jacobian determinant is then:
∂φ ∂φ w v
∂v ∂w (v+1)2 v+1
w −vw w
|M | = = = − = .
∂ψ ∂ψ −w 1 (v + 1)3 (v + 1)3 (v + 1)2
∂v ∂w
(v+1)2 v+1
Therefore, the joint density of V and W is given by
2
vw + w
2 −λ( v+1 v+1 )
w = λ w e−λw
g(v, w) = f (φ(v, w), ψ(v, w))|M | = λ e
(v + 1)2 (v + 1)2
for v > 0 and w > 0. Integrate to find the marginal densities:
Z ∞
1
gV (v) = g(v, w) dw =
0 (1 + v)2
and Z ∞
gW (w) = g(v, w) dv = λ2 we−λw .
0
7. Let X and Y have joint density f (x, y). Let (R, Θ) be the polar coordinates of (X, Y ).
(a) Give a general expression for the joint density of R and Θ.
√ Y
Note that R = X 2 + Y 2 , Θ = arctan X , X = R cos Θ, and Y = R sin Θ.
The Jacobian determinant is then:
∂ ∂
∂r r cos θ ∂θ r cos θ cos θ −r sin θ
|M | = = = r cos2 θ + r sin2 θ = r.
∂ ∂
∂r r sin θ ∂θ r sin θ sin θ r cos θ
The joint density of R and Θ is given by:
g(r, θ) = f (r cos θ, r sin θ)|M | = f (r cos θ, r sin θ)r.
(b) Suppose X and Y are independent with f (x) = 2x for 0 < x < 1 and f (y) = 2y for
0 < y < 1. Use your result to find the probability that (X, Y ) lies inside the circle of
radius 1 centered at the origin.
The joint density of X and Y is given by f (x, y) = 4xy for 0 < x < 1 and 0 < y < 1.
By the previous result, the joint density of R and Θ is given by
g(r, θ) = f (r cos θ, r sin θ)r = 4(r cos θ)(r sin θ)r = 4r3 cos θ sin θ.
The point (X, Y ) lies within the unit circle if and only if R < 1. Since both X and Y are positive,
0 < Θ < π2 , so the probability that R < 1 is given by
Z π/2 Z 1
1
P (R < 1) = 4r3 cos θ sin θ drdθ = .
0 0 2
8. Let X1 , X2 , . . . , Xn denote a random sample from the uniform distribution on [0, 1]. Let Y1
and Yn be the smallest and largest, respectively, among the Xi . Find the pdf for the range
R = Yn − Y1 .
Hint: The joint pdf for Y1 and Yn is g(y1 , yn ) = n(n − 1)(yn − y1 )n−2 for 0 ≤ y1 ≤ yn ≤ 1.
(See exercise 141 in Chapter 4 of Carlton and Devore.)
Since 0 ≤ R ≤ 1, fix r ∈ [0, 1]. Then R = Yn −Y1 = r along the line yn = y1 +r in the y1 yn -plane. Furthermore,
R ≤ r in the region below this line, which is the shaded region in the following diagram.
yn
1
1 y1
Thus, the cdf of R is:
Z 1 Z yn −r
FR (r) = P (R ≤ r) = 1 − n(n − 1)(yn − y1 )n−2 dy1 dyn = (1 − n)rn + nrn−1 .
r 0
Differentiate to find the pdf of R:
d d
(1 − n)rn + nrn−1 = n(n − 1) rn−2 − rn−1
fR (r) = FR (r) = for 0 ≤ r ≤ 1.
dr dr