Discrete Random Variables and Their Distributions
5.8 Functions of a Discrete Random Variable
Basic Exercises 5.131
a) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are −6, −3, 0, 3, 6, and 9. Here g(x) = 3x. We note that g is one-to-one and, solving the equation y = 3x for x, we find that g−1(y)= y/3. Hence, from Equation (5.54) on page 248, we have
pY(y)= p3X(y)= pX(y/3).
Then, for instance,
pY(6) = pX(6/3) = pX(2) = 0.15.
Proceeding similarly, we obtain the following table for the PMF of Y .
y −6 −3 0 3 6 9
pY(y ) 0.10 0.20 0.20 0.15 0.15 0.20
b) The transformation results in a change of scale. That is, if the units in which X is measured are changed by a multiple of b, then bX will have the same relative value (in new units) as X does in old units.
c) Yes, Corollary 5.1 applies to a change of scale%
i.e., a function of the form g(x) = bx&
because such a function is one-to-one on all of R.
5.132
a) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are −4, −3, −2, −1, 0, and 1. Here g(x) = x − 2. We note that g is one-to-one and, solving the equation y = x − 2 for x, we find that g−1(y)= y + 2. Hence, from Equation (5.54) on page 248, we have
pY(y)= pX−2(y)= pX(y+ 2).
Then, for instance,
pY(−1) = pX(−1 + 2) = pX(1) = 0.15.
Proceeding similarly, we obtain the following table for the PMF of Y .
y −4 −3 −2 −1 0 1
pY(y ) 0.10 0.20 0.20 0.15 0.15 0.20
b) The transformation results in a change of location. That is, if the units in which X is measured are changed by an addition of a, then a + X will have the same relative value (in the new units) as X does in the old units.
c) Yes, Corollary 5.1 applies to a change of location%
i.e., a function of the form g(x) = a + x&
because such a function is one-to-one on all of R.
5.133
a) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are −8, −5, −2, 1, 4, and 7. Here g(x) = 3x − 2. We note that g is one-to-one and, solving the equation y = 3x − 2 for x, we find that g−1(y)= (y + 2)/3. Hence, from Equation (5.54) on page 248, we have
pY(y)= p3X−2(y)= pX%
(y+ 2)/3&
. Then, for instance,
pY(4) = pX
%(4 + 2)/3&
= pX(2) = 0.15.
Proceeding similarly, we obtain the following table for the PMF of Y .
y −8 −5 −2 1 4 7
pY(y ) 0.10 0.20 0.20 0.15 0.15 0.20
b) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are a − 2b, a − b, a, a + b, a + 2b, and a + 3b. Here g(x) = a + bx. We note that g is one-to-one and, solving the equation y = a + bx for x, we find that g−1(y)= (y − a)/b. Hence, from Equation (5.54) on page 248, we have
pY(y)= pa+bX(y)= pX%
(y− a)/b&
. Then, for instance,
pY(a+ 2b) = pX8%
(a+ 2b) − a&
/b9
= pX(2) = 0.15.
Proceeding similarly, we obtain the following table for the PMF of Y .
y a− 2b a − b a a+ b a + 2b a + 3b
pY(y ) 0.10 0.20 0.20 0.15 0.15 0.20
c) Yes, Corollary 5.1 applies to a simultaneous location and scale change %
i.e., a function of the form g(x) = a + bx&
because such a function is one-to-one on all of R.
5.134
a) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are −33, −5, −1, 3, 31, and 107. Here g(x) = 4x3− 1. We note that g is one-to-one and, solving the equation y = 4x3− 1 for x, we find that g−1(y)=%
(y+ 1)/4&1/3
. Hence, from Equation (5.54) on page 248, we have pY(y)= p4X3−1(y)= pX8%
(y+ 1)/4&1/39 . Then, for instance,
pY(31) = pX8%
(31 + 1)/4&1/39
= pX(2) = 0.15.
Proceeding similarly, we obtain the following table for the PMF of Y .
y −33 −5 −1 3 31 107
pY(y ) 0.10 0.20 0.20 0.15 0.15 0.20
b) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are 0, 1, 16, and 81.
Here g(x) = x4, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14 on page 247. For instance,
pY(16) = /
x∈g−1({16})
pX(x)= /
{ x:x4=16 }
pX(x)= /
x∈{−2,2}
pX(x)
= pX(−2) + pX(2) = 0.10 + 0.15 = 0.25.
Proceeding similarly, we obtain the following table for the PMF of Y .
y 0 1 16 81
pY(y ) 0.20 0.35 0.25 0.20
c) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are 0, 1, 2, and 3.
Here g(x) = |x|, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14. For instance,
pY(2) = /
x∈g−1({2})
pX(x)= /
{ x:|x|=2 }
pX(x)= /
x∈{−2,2}
pX(x)
= pX(−2) + pX(2) = 0.10 + 0.15 = 0.25.
Proceeding similarly, we obtain the following table for the PMF of Y .
y 0 1 2 3
pY(y ) 0.20 0.35 0.25 0.20
d) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are 4, 6, 8, and 10.
Here g(x) = 2|x| + 4, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14. For instance,
pY(8) = /
x∈g−1({8})
pX(x)= /
{ x:2|x|+4=8 }
pX(x)= /
x∈{−2,2}
pX(x)
= pX(−2) + pX(2) = 0.10 + 0.15 = 0.25.
Proceeding similarly, we obtain the following table for the PMF of Y .
y 4 6 8 10
pY(y ) 0.20 0.35 0.25 0.20
e) As the possible values of X are −2, −1, 0, 1, 2, and 3, the possible values of Y are√ 5, √
8,√ 17, and√
32. Here g(x) =√
3x2+ 5, which is not one-to-one on the range of X. Hence, to find the PDF
of Y , we apply Proposition 5.14. For instance, pY%√
17&
= /
x∈g−1%#√
17$&pX(x)= /
#x:√
3x2+5=√ 17$
pX(x)= /
x∈{−2,2}
pX(x)
= pX(−2) + pX(2) = 0.10 + 0.15 = 0.25.
Proceeding similarly, we obtain the following table for the PMF of Y .
y √
5 √8 √17 √32 pY(y ) 0.20 0.35 0.25 0.20
5.135
a) Because the range of X is N , the range of Y is RY = { n/(n + 1) : n ∈ N }.
b) Here g(x) = x/(x + 1), which is one-to-one on the range of X. Solving the equation y = x/(x + 1) for x, we find that g−1(y)= y/(1 − y). Hence, from Equation (5.54) on page 248, we have
pY(y)= pX/(X+1)(y)= pX%
y/(1 − y)&
if y ∈ RY, and pY(y)= 0 otherwise.
c) Because the range of X is N , the range of Z is RZ= { (n + 1)/n : n ∈ N }. Here g(x) = (x + 1)/x, which is one-to-one on the range of X. Solving the equation z = (x + 1)/x for x, we determine that g−1(z)= 1/(z − 1). Hence, from Equation (5.54), we have
pZ(z)= p(X+1)/X(z)= pX%
1/(z − 1)&
if z ∈ RZ, and pZ(z)= 0 otherwise.
5.136 We know that pX(x)= p(1 − p)x−1if x ∈ N , and pX(x)= 0 otherwise.
a) Let Y = min{X, m}. We note that, because the range of X is N , the range of Y is {1, 2, . . . , m}.
Here g(x) = min{x, m}, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14 on page 247. For y = 1, 2, . . . , m − 1,
pY(y)= /
x∈g−1({y})
pX(x)= /
#x:min{x,m}=y$pX(x)= /
x∈{y}
pX(x)= pX(y)= p(1 − p)y−1.
Also,
pY(m)= /
x∈g−1({m})
pX(x)= /
#x:min{x,m}=m$pX(x)=/
x≥m
pX(x)
= /∞ k=m
p(1 − p)k−1= (1 − p)m−1. Hence,
pY(y)=
⎧⎨
⎩
p(1 − p)y−1, if y = 1, 2, . . . , m − 1;
(1 − p)m−1, if y = m;
0, otherwise.
b) Let Z = max{X, m}. We note that, because the range of X is N , the range of Z is {m, m + 1, . . .}.
Here g(x) = max{x, m}, which is not one-to-one on the range of X. Hence, to find the PDF of Z, we apply Proposition 5.14. For z = m + 1, m + 2, . . . ,
pZ(z)= /
x∈g−1({z})
pX(x)= /
#x:max{x,m}=z$pX(x)= /
x∈{z}
pX(x)= pX(z)= p(1 − p)z−1.
Also,
pZ(m)= /
x∈g−1({m})
pX(x)= /
#x:max{x,m}=m$pX(x)= /
x≤m
pX(x)
= /m k=1
p(1 − p)k−1 = 1 − (1 − p)m. Hence,
pZ(z)=" 1 − (1 − p)m, if z = m;
p(1 − p)z−1, if z = m + 1, m + 2, . . . ;
0, otherwise.
5.137 We know that pX(x)= e−33x/x! if x = 0, 1, . . . , and pX(x) = 0 otherwise. Because the range of X is {0, 1, . . .}, the range of Y is also {0, 1, . . .}. Here g(x) = |x − 3|, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14 on page 247. For y = 1, 2, and 3,
pY(y)= /
x∈g−1({y})
pX(x)= /
{ x:|x−3|=y }
pX(x)= /
x∈{3−y,3+y}
pX(x)
= pX(3 − y) + pX(3 + y) = e−3 33−y
(3 − y)! + e−3 33+y (3 + y)!
= 27e−3' 3−y
(3 − y)!+ 3y (3 + y)!
( . Also, for y = 0, 4, 5, . . . ,
pY(y)= /
x∈g−1({y})
pX(x)= /
{ x:|x−3|=y }
pX(x)= /
x∈{3+y}
pX(x)
= pX(3 + y) = e−3 33+y
(3 + y)! = 27e−3 3y (3 + y)!. Hence,
pY(y)=
⎧⎪
⎪⎪
⎪⎪
⎨
⎪⎪
⎪⎪
⎪⎩
27e−3 3y
(3 + y)!, if y = 0, 4, 5, . . . ; 27e−3' 3−y
(3 − y)! + 3y (3 + y)!
(
, if y = 1, 2, 3;
0, otherwise.
5.138 We know that pX(x)= 1/9 if x = 0, π/4, 2π/4, . . . , 2π, and pX(x)= 0 otherwise.
a) Let Y = sin X. Here g(x) = sin x, which is not one-to-one on the range of X. Hence, to find the PDF of Y , we apply Proposition 5.14 on page 247. To that end, we first construct the following table:
x 0 π/4 2π/4 3π/4 4π/4 5π/4 6π/4 7π/4 8π/4
sin x 0 1/√
2 1 1/√
2 0 −1/√
2 −1 −1/√
2 0
From the table, we see that the PDF of Y is as follows:
y −1 −1/√
2 0 1/√
2 1
pY(y ) 1/9 2/9 3/9 2/9 1/9
b) Let Z = cos X. Here g(x) = cos x, which is not one-to-one on the range of X. Hence, to find the PDF of Z, we apply Proposition 5.14. To that end, we first construct the following table:
x 0 π/4 2π/4 3π/4 4π/4 5π/4 6π/4 7π/4 8π/4
cos x 1 1/√
2 0 −1/√
2 −1 −1/√
2 0 1/√
2 1
From the table, we see that the PDF of Z is as follows:
z −1 −1/√2 0 1/√2 1
pZ(z) 1/9 2/9 2/9 2/9 2/9
c) No, tan X is not a random variable, because it is not a real-valued function on the sample space. For instance, we know that P (X = π/2) = 1/9 > 0, which implies that {X = π/2} ̸= ∅. Now, let ω be such that X(ω) = π/2. Then tan X(ω) = tan(π/2) = ∞.
5.139 We know that X ∼ N B(3, p) and, hence, that pX(x)=
'x− 1 2
(
p3(1 − p)x−3, x = 3, 4, . . . , and pX(x)= 0 otherwise.
a) As X denotes the number of trials until the third success, the number of failures by the third success is X − 3. Thus, the proportion of failures by the third success is (X − 3)/X = 1 − 3/X.
b) Because the range of X is {3, 4, . . .}, the range of Y is RY = { 1 − 3/n : n = 3, 4, . . . }. Here we have g(x) = 1 − 3/x, which is one-to-one on the range of X. Solving the equation y = 1 − 3/x for x, we find that g−1(y)= 3/(1 − y). Hence, from Equation (5.54) on page 248,
pY(y)= p1−3/X(y)= pX%
3/(1 − y)&
='3/(1 − y) − 1 2
(
p3(1 − p)3/(1−y)−3
=
'(2 + y)/(1 − y) 2
(
p3(1 − p)3y/(1−y) if y ∈ RY, and pY(y)= 0 otherwise.
5.140 Let X denote the number of trials until the fifth success and let Y = min{X, 17}. We want to
and
Applying Proposition 5.14, we get pY(0) = /
Solving for pY(0) yields
pY(0) = 1 − 2p + p2
3 − 3p + p2 = (1 − p)2 3 − 3p + p2.
Consequently, we also have
pY(1) = p + (1 − p)pY(0) = p + (1 − p) (1 − p)2 3 − 3p + p2
=
%3p − 3p2+ p3&
+ (1 − p)3
3 − 3p + p2 = 1
3 − 3p + p2 and
pY(2) = p(1 − p) + (1 − p)2pY(0) = p(1 − p) + (1 − p)2 (1 − p)2 3 − 3p + p2
= p(1 − p)%
3 − 3p + p2&
+ (1 − p)4
3 − 3p + p2 =
(1 − p)8%
3p − 3p2+ p3&
+ (1 − p)39 3 − 3p + p2
= 1 − p
3 − 3p + p2. Hence,
pY(y)=
⎧⎪
⎪⎪
⎨
⎪⎪
⎪⎩
(1 − p)2/(3 − 3p + p2), if y = 0;
1/(3 − 3p + p2), if y = 1;
(1 − p)/(3 − 3p + p2), if y = 2;
0, otherwise.