Professional Documents
Culture Documents
7.1 Introduction
This chapter contains a broad spectrum of material. Chapters 5 and 6 deal with
specific types of distributions, both discrete and continuous. These are distribu-
tions that find use in many subject matter applications, including reliability, quality
control, and acceptance sampling. In the present chapter, we begin with a more
general topic, that of distributions of functions of random variables. General tech-
niques are introduced and illustrated by examples. This discussion is followed by
coverage of a related concept, moment-generating functions, which can be helpful
in learning about distributions of linear functions of random variables.
In standard statistical methods, the result of statistical hypothesis testing, es-
timation, or even statistical graphics does not involve a single random variable
but, rather, functions of one or more random variables. As a result, statistical
inference requires the distributions of these functions. For example, the use of
averages of random variables is common. In addition, sums and more general
linear combinations are important. We are often interested in the distribution of
sums of squares of random variables, particularly in the use of analysis of variance
techniques discussed in Chapters 11–14.
211
212 Chapter 7 Functions of Random Variables (Optional)
Theorem 7.1: Suppose that X is a discrete random variable with probability distribution f (x).
Let Y = u(X) define a one-to-one transformation between the values of X and
Y so that the equation y = u(x) can be uniquely solved for x in terms of y, say
x = w(y). Then the probability distribution of Y is
g(y) = f [w(y)].
Theorem 7.2: Suppose that X1 and X2 are discrete random variables with joint probability
distribution f (x1 , x2 ). Let Y1 = u1 (X1 , X2 ) and Y2 = u2 (X1 , X2 ) define a one-to-
one transformation between the points (x1 , x2 ) and (y1 , y2 ) so that the equations
Theorem 7.2 is extremely useful for finding the distribution of some random
variable Y1 = u1 (X1 , X2 ), where X1 and X2 are discrete random variables with
joint probability distribution f (x1 , x2 ). We simply define a second function, say
Y2 = u2 (X1 , X2 ), maintaining a one-to-one correspondence between the points
(x1 , x2 ) and (y1 , y2 ), and obtain the joint probability distribution g(y1 , y2 ). The
distribution of Y1 is just the marginal distribution of g(y1 , y2 ), found by summing
over the y2 values. Denoting the distribution of Y1 by h(y1 ), we can then write
h(y1 ) = g(y1 , y2 ).
y2
7.2 Transformations of Variables 213
Example 7.2: Let X1 and X2 be two independent random variables having Poisson distributions
with parameters μ1 and μ2 , respectively. Find the distribution of the random
variable Y1 = X1 + X2 .
Solution : Since X1 and X2 are independent, we can write
e−μ1 μx1 1 e−μ2 μx2 2 e−(μ1 +μ2 ) μx1 1 μx2 2
f (x1 , x2 ) = f (x1 )f (x2 ) = = ,
x1 ! x2 ! x1 !x2 !
where x1 = 0, 1, 2, . . . and x2 = 0, 1, 2, . . . . Let us now define a second random
variable, say Y2 = X2 . The inverse functions are given by x1 = y1 −y2 and x2 = y2 .
Using Theorem 7.2, we find the joint probability distribution of Y1 and Y2 to be
e−(μ1 +μ2 ) μy11 −y2 μy22
g(y1 , y2 ) = ,
(y1 − y2 )!y2 !
where y1 = 0, 1, 2, . . . and y2 = 0, 1, 2, . . . , y1 . Note that since x1 > 0, the trans-
formation x1 = y1 − x2 implies that y2 and hence x2 must always be less than or
equal to y1 . Consequently, the marginal probability distribution of Y1 is
y1
y1
μy11 −y2 μy22
h(y1 ) = g(y1 , y2 ) = e−(μ1 +μ2 )
y2 =0 y =0
(y1 − y2 )!y2 !
2
−(μ1 +μ2 ) y1
e y1 !
= μy11 −y2 μy22
y1 ! y2 =0
y 2 !(y1 − y2 )!
y1
e−(μ1 +μ2 ) y1 y1 −y2 y2
= μ μ2 .
y1 ! y =0
y2 1
2
Theorem 7.3: Suppose that X is a continuous random variable with probability distribution
f (x). Let Y = u(X) define a one-to-one correspondence between the values of X
and Y so that the equation y = u(x) can be uniquely solved for x in terms of y,
say x = w(y). Then the probability distribution of Y is
g(y) = f [w(y)]|J|,
Theorem 7.4: Suppose that X1 and X2 are continuous random variables with joint probability
distribution f (x1 , x2 ). Let Y1 = u1 (X1 , X2 ) and Y2 = u2 (X1 , X2 ) define a one-to-
one transformation between the points (x1 , x2 ) and (y1 , y2 ) so that the equations
y1 = u1 (x1 , x2 ) and y2 = u2 (x1 , x2 ) may be uniquely solved for x1 and x2 in terms
of y1 and y2 , say x1 = w1 (yl , y2 ) and x2 = w2 (y1 , y2 ). Then the joint probability
distribution of Y1 and Y2 is
and ∂x 1
∂y1 is simply the derivative of x1 = w1 (y1 , y2 ) with respect to y1 with y2 held
constant, referred to in calculus as the partial derivative of x1 with respect to y1 .
The other partial derivatives are defined in a similar manner.
Example 7.4: Let X1 and X2 be two continuous random variables with joint probability distri-
bution
4x1 x2 , 0 < x1 < 1, 0 < x2 < 1,
f (x1 , x2 ) =
0, elsewhere.
Find the joint probability distribution of Y1 = X12 and Y2 = X1 X2 .
√ √
Solution : The inverse solutions of y1 = x21 and y2 = x1 x2 are x1 = y1 and x2 = y2 / y1 ,
from which we obtain
1/(2√y1 ) 0 1
J = √ = .
1/ y1 2y1
3/2
−y2 /2y 1
7.2 Transformations of Variables 215
To determine the set B of points in the y1 y2 plane into which the set A of points
in the x1 x2 plane is mapped, we write
√ √
x1 = y1 and x2 = y 2 / y 1 .
x2 y2
x2 = 1
1 1
=y
1
2
y2
x1 = 0
x1 = 1
y1 = 0
y1 = 1
A B
x1 y1
0 x2 = 0 1 0 y2 = 0 1
However, when 0 < y < 1, we may partition the interval −1 < x < 1 to obtain the
two inverse functions
√ √
x = − y, −1 < x < 0, and x= y, 0 < x < 1.
216 Chapter 7 Functions of Random Variables (Optional)
Then to every y value there corresponds a single x value for each partition. From
Figure 7.2 we see that
√ √ √ √
P (a < Y < b) = P (− b < X < − a) + P ( a < X < b)
−√a √b
= √ f (x) dx + √ f (x) dx.
− b a
y x2
x
1 b a a b 1
where
√
d(− y) −1
J1 = = √ = −|J1 |
dy 2 y
and
√
d( y) 1
J2 = = √ = |J2 |.
dy 2 y
and then
√ √
√ √ f (− y) + f ( y)
g(y) = f (− y)|J1 | + f ( y)|J2 | = √ , 0 < y < 1.
2 y
7.2 Transformations of Variables 217
Theorem 7.5: Suppose that X is a continuous random variable with probability distribution
f (x). Let Y = u(X) define a transformation between the values of X and Y that
is not one-to-one. If the interval over which X is defined can be partitioned into
k mutually disjoint sets such that each of the inverse functions
x1 = w1 (y), x2 = w2 (y), ..., xk = wk (y)
Example 7.5: Show that Y = (X −μ)2 /σ 2 has a chi-squared distribution with 1 degree of freedom
when X has a normal distribution with mean μ and variance σ 2 .
Solution : Let Z = (X − μ)/σ, where the random variable Z has the standard normal distri-
bution
1 2
f (z) = √ e−z /2 , −∞ < z < ∞.
2π
We shall now find the distribution of the random variable Y = Z 2 . The inverse
√ √ √
solutions of y = z 2 are z = ± y. If we designate z1 = − y and z2 = y, then
√ √
J1 = −1/2 y and J2 = 1/2 y. Hence, by Theorem 7.5, we have
1 −y/2 −1 1 −y/2 1 1
g(y) = √ e √ + √ e √ = √ y 1/2−1 e−y/2 , y > 0.
2π 2 y 2π 2 y 2π
Since g(y) is a density function, it follows that
∞
1 Γ(1/2) ∞ y 1/2−1 e−y/2 Γ(1/2)
1= √ y 1/2−1 e−y/2 dy = √ √ dy = √ ,
2π 0 π 0 2Γ(1/2) π
the integral being the area√under a gamma probability curve with parameters
α = 1/2 and β = 2. Hence, π = Γ(1/2) and the density of Y is given by
√ 1 y 1/2−1 e−y/2 , y > 0,
g(y) = 2Γ(1/2)
0, elsewhere,
which is seen to be a chi-squared distribution with 1 degree of freedom.
218 Chapter 7 Functions of Random Variables (Optional)
Definition 7.1: The rth moment about the origin of the random variable X is given by
⎧
⎨ xr f (x), if X is discrete,
μr = E(X r ) = x∞
⎩ xr f (x) dx, if X is continuous.
−∞
Since the first and second moments about the origin are given by μ1 = E(X) and
μ2 = E(X 2 ), we can write the mean and variance of a random variable as
Definition 7.2: The moment-generating function of the random variable X is given by E(etX )
and is denoted by MX (t). Hence,
⎧
⎨ etx f (x), if X is discrete,
tX
MX (t) = E(e ) = x∞
⎩ etx f (x) dx, if X is continuous.
−∞
Theorem 7.6: Let X be a random variable with moment-generating function MX (t). Then
dr MX (t)
= μr .
dtr t=0
Example 7.6: Find the moment-generating function of the binomial random variable X and then
use it to verify that μ = np and σ 2 = npq.
Solution : From Definition 7.2 we have
n n
n x n−x n
MX (t) = etx p q = (pet )x q n−x .
x=0
x x=0
x
7.3 Moments and Moment-Generating Functions 219
Recognizing this last sum as the binomial expansion of (pet + q)n , we obtain
Now
dMX (t)
= n(pet + q)n−1 pet
dt
and
d2 MX (t)
= np[et (n − 1)(pet + q)n−2 pet + (pet + q)n−1 et ].
dt2
Setting t = 0, we get
Therefore,
Example 7.7: Show that the moment-generating function of the random variable X having a
normal probability distribution with mean μ and variance σ 2 is given by
1 2 2
MX (t) = exp μt + σ t .
2
Solution : From Definition 7.2 the moment-generating function of the normal random variable
X is
∞ 2
tx 1 1 x−μ
MX (t) = e √ exp − dx
−∞ 2πσ 2 σ
∞ 2
1 x − 2(μ + tσ 2 )x + μ2
= √ exp − dx.
−∞ 2πσ 2σ 2
Completing the square in the exponent, we can write
and then
∞
1 [x − (μ + tσ 2 )]2 − 2μtσ 2 − t2 σ 4
MX (t) = √ exp − dx
−∞ 2πσ 2σ 2
∞
2μt + σ 2 t2 1 [x − (μ + tσ 2 )]2
= exp √ exp − dx.
2 −∞ 2πσ 2σ 2
since the last integral represents the area under a standard normal density curve
and hence equals 1.
Although the method of transforming variables provides an effective way of
finding the distribution of a function of several variables, there is an alternative
and often preferred procedure when the function in question is a linear combination
of independent random variables. This procedure utilizes the properties of moment-
generating functions discussed in the following four theorems. In keeping with the
mathematical scope of this book, we state Theorem 7.7 without proof.
Theorem 7.7: (Uniqueness Theorem) Let X and Y be two random variables with moment-
generating functions MX (t) and MY (t), respectively. If MX (t) = MY (t) for all
values of t, then X and Y have the same probability distribution.
and variance
σY2 = a21 σ12 + a22 σ22 + · · · + a2n σn2 .
It is now evident that the Poisson distribution and the normal distribution
possess a reproductive property in that the sum of independent random variables
having either of these distributions is a random variable that also has the same type
of distribution. The chi-squared distribution also has this reproductive property.
Theorem 7.12: If X1 , X2 , . . . , Xn are mutually independent random variables that have, respec-
tively, chi-squared distributions with v1 , v2 , . . . , vn degrees of freedom, then the
random variable
Y = X1 + X2 + · · · + Xn
Therefore,
Corollary 7.1: If X1 , X2 , . . . , Xn are independent random variables having identical normal dis-
tributions with mean μ and variance σ 2 , then the random variable
n 2
Xi − μ
Y =
i=1
σ
has a chi-squared distribution with v = n degrees of freedom.
Corollary 7.2: If X1 , X2 , . . . , Xn are independent random variables and Xi follows a normal dis-
tribution with mean μi and variance σi2 for i = 1, 2, . . . , n, then the random
variable
n 2
X i − μi
Y =
i=1
σi
has a chi-squared distribution with v = n degrees of freedom.
Exercises
7.1 Let X be a random variable with probability the joint multinomial distribution
1
, x = 1, 2, 3, f (x1 , x2 )
f (x) = 3
0, elsewhere. x x 2−x1 −x2
2 1 1 1 2 5
=
x1 , x 2 , 2 − x1 − x 2 4 3 12
Find the probability distribution of the random vari-
able Y = 2X − 1. for x1 = 0, 1, 2; x2 = 0, 1, 2; x1 + x2 ≤ 2; and zero
elsewhere. Find the joint probability distribution of
7.2 Let X be a binomial random variable with prob- Y1 = X1 + X2 and Y2 = X1 − X2 .
ability distribution
7.4 Let X1 and X2 be discrete random variables with
joint probability distribution
3 2 x 3 3−x
, x = 0, 1, 2, 3,
f (x) = x 5 5 x1 x2
0, elsewhere. 18
, x1 = 1, 2; x2 = 1, 2, 3,
f (x1 , x2 ) =
0, elsewhere.
Find the probability distribution of the random vari-
Find the probability distribution of the random vari-
able Y = X 2 .
able Y = X1 X2 .
7.3 Let X1 and X2 be discrete random variables with
/ /
Exercises 223
7.5 Let X have the probability distribution 7.10 The random variables X and Y , representing
the weights of creams and toffees, respectively, in 1-
1, 0 < x < 1, kilogram boxes of chocolates containing a mixture of
f (x) = creams, toffees, and cordials, have the joint density
0, elsewhere.
function
Show that the random variable Y = −2 ln X has a chi- 24xy, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, x + y ≤ 1,
squared distribution with 2 degrees of freedom. f (x, y) =
0, elsewhere.
7.6 Given the random variable X with probability (a) Find the probability density function of the random
distribution variable Z = X + Y .
(b) Using the density function of Z, find the probabil-
2x, 0 < x < 1, ity that, in a given box, the sum of the weights of
f (x) =
0, elsewhere, creams and toffees accounts for at least 1/2 but less
than 3/4 of the total weight.
find the probability distribution of Y = 8X 3 .
7.11 The amount of kerosene, in thousands of liters,
7.7 The speed of a molecule in a uniform gas at equi- in a tank at the beginning of any day is a random
librium is a random variable V whose probability dis- amount Y from which a random amount X is sold dur-
tribution is given by ing that day. Assume that the joint density function
2
of these variables is given by
kv 2 e−bv , v > 0,
f (v) = 2, 0 < x < y, 0 < y < 1,
0, elsewhere, f (x, y) =
0, elsewhere.
where k is an appropriate constant and b depends on Find the probability density function for the amount
the absolute temperature and mass of the molecule. of kerosene left in the tank at the end of the day.
Find the probability distribution of the kinetic energy
of the molecule W , where W = mV 2 /2. 7.12 Let X1 and X2 be independent random variables
each having the probability distribution
7.8 A dealer’s profit, in units of $5000, on a new au- −x
e , x > 0,
tomobile is given by Y = X 2 , where X is a random f (x) =
variable having the density function 0, elsewhere.
Show that the random variables Y1 and Y2 are inde-
2(1 − x), 0 < x < 1, pendent when Y1 = X1 + X2 and Y2 = X1 /(X1 + X2 ).
f (x) =
0, elsewhere.
7.13 A current of I amperes flowing through a resis-
(a) Find the probability density function of the random tance of R ohms varies according to the probability
variable Y . distribution
(b) Using the density function of Y , find the probabil- 6i(1 − i), 0 < i < 1,
ity that the profit on the next new automobile sold f (i) =
0, elsewhere.
by this dealership will be less than $500.
If the resistance varies independently of the current ac-
7.9 The hospital period, in days, for patients follow- cording to the probability distribution
ing treatment for a certain type of kidney disorder is a
2r, 0 < r < 1,
random variable Y = X + 4, where X has the density g(r) =
0, elsewhere,
function
find the probability distribution for the power W =
32
3, x > 0, I 2 R watts.
f (x) = (x+4)
0, elsewhere.
7.14 Let X be a random variable with probability
distribution
(a) Find the probability density function of the random 1+x
variable Y . 2
, −1 < x < 1,
f (x) =
(b) Using the density function of Y , find the probabil- 0, elsewhere.
ity that the hospital period for a patient following Find the probability distribution of the random vari-
this treatment will exceed 8 days. able Y = X 2 .
224 Chapter 7 Functions of Random Variables (Optional)
7.15 Let X have the probability distribution 7.19 A random variable X has the Poisson distribu-
tion p(x; μ) = e−μ μx /x! for x = 0, 1, 2, . . . . Show that
2(x+1)
, −1 < x < 2, the moment-generating function of X is
f (x) = 9
0, elsewhere. t
MX (t) = eμ(e −1)
.
Find the probability distribution of the random vari- Using MX (t), find the mean and variance of the Pois-
able Y = X 2 . son distribution.
7.16 Show that the rth moment about the origin of 7.20 The moment-generating function of a certain
the gamma distribution is Poisson random variable X is given by