When we observe data consisting of the values of several random variables, we need to summarize the observed values in order to be able to focus on the information in the data. Summarizing consists of constructing one or a few functions of the random variables that capture the bulk of the information. In this section, we describe the techniques needed to determine the distribution of a function of two or more random variables.
3.9.1 Random Variables with a Discrete Joint Distribution¶
The general method for solving problems like those of Example 3.9.1 is a straightforward extension of thm-3-8-1.
The next result gives an important example of a function of discrete random variables.
Random Variables with a Continuous Joint Distribution¶
The transformation in Example 3.9.4 is an example of a brute-force method that is always available for finding the distribution of a function of several random variables, however, it might be difficult to apply in individual cases.
If the distribution of Y also is continuous, then the pdf of Y can be found by differentiating the CDF G(y).
A popular special case of Theorem 3.9.3 is the following.
The special case of Theorem 3.9.4 in which X1 and X2 are independent, a1 = a2 = 1,
and b = 0 is called convolution.
The pdf found in Example 3.9.4 is the special case of (3.9.5) with f1(x) = f2(x) =
for x >0 and 0 otherwise.
As another example of the brute-force method, we consider the largest and
smallest observations in a random sample.These functions give an idea of how spread
out the sample is. For example, meteorologists often report record high and low temperatures for specific days as well as record high and low rainfalls for months and years.
Figure 3.25:The region where the function in eq-3-9-7 is positive
Figure 3.26:The pdf of the uniform distribution on the
interval [0, 1] together with
the pdf’s of the minimum
and maximum of samples
of size n = 5. The pdf of
the range of a sample of size
n = 5 (see Example 3.9.7) is
also included.
Figure 3.26 shows the pdf of the uniform distribution on the interval [0, 1] together with the pdf’s of Y1 and Yn for the case n = 5. It also shows the pdf of Y5 − Y1, which will be derived in Example 3.9.7. Notice that the pdf of Y1 is highest near 0 and lowest near 1, while the opposite is true of the pdf of Yn, as one would expect.
Finally, we shall determine the joint distribution of Y1 and Yn. For every pair of values (y1, yn) such that −∞<y1<yn<∞, the event {Y1≤y1}∩{Yn≤yn} is the same as {Yn≤yn}∩{Y1>y1}c.
If G denotes the bivariate joint CDF of Y1 and Yn, then
The bivariate joint pdf g of Y1 and Yn can be found from the relation
Also, for all other values of y1 and yn, g(y1, yn) = 0.
A popular way to describe how spread out is a random sample is to use the distance from the minimum to the maximum, which is called the range of the random
sample. We can combine the result from the end of Example 3.9.6 with Theorem 3.9.4
to find the pdf of the range.
The joint pdf g(y1, yn) of Y1 and Yn was presented in eq-3-9-9.
We can now apply Theorem 3.9.4 with a1=−1, a2 = 1, and b = 0 to get the pdf h of W:
where, for the last equality, we have made the change of variable z = yn
Here is a special case in which the integral of Eq. 3.9.10 can be computed in closed form.
Next, we state without proof a generalization of Theorem 3.8.4 to the case of several
random variables. The proof of Theorem 3.9.5 is based on the theory of differentiable
one-to-one transformations in advanced calculus.
Thus, the joint pdf g(y1, . . . , yn) is obtained by starting with the joint pdf
f (x1, . . . , xn), replacing each value xi by its expression si(y1, . . . , yn) in terms of
y1, . . . , yn, and then multiplying the result by |J |. This determinant J is called the
Jacobian of the transformation specified by the equations in (3.9.12).
Note: The Jacobian Is a Generalization of the Derivative of the Inverse.¶
eq-3-8-3 and eq-3-9-13 are very similar. The former gives the pdf of a single function of a
single random variable. Indeed, if n = 1 in (3.9.13), J = ds1(y1)/dy1 and Eq. (3.9.13)
becomes the same as (3.8.3). The Jacobian merely generalizes the derivative of the
inverse of a single function of one variable to n functions of n variables.
Figure 3.27 The sets S and T in Example 3.9.9.
We shall now show how to find the set T . We know that (x1,x2)∈S if and only
if the following inequalities hold:
x1 > 0, x1 < 1, x2 > 0, and x2 < 1. (3.9.16)
We can substitute the formulas for x1 and x2 in terms of y1 and y2 from Eq. (3.9.15)
into the inequalities in (3.9.16) to obtain
The first inequality transforms to (y1> 0 and y2 > 0) or (y1< 0 and y2 < 0). However,
since y1 = x1/x2, we cannot have y1 < 0, so we get only y1 > 0 and y2 > 0. The third
inequality in (3.9.17) transforms to the same thing. The second inequality in (3.9.17)
becomes y2 < 1/y1. The fourth inequality becomes y2 < y1. The region T where
(y1, y2) satisfy these new inequalities is shown in the right panel of Fig. 3.27 with
the set S in the left panel.
For the functions in (3.9.15),
Since y1 > 0 throughout the set T , |J| = 1/(2y1).
The joint pdf g(y1, y2) can now be obtained directly from Eq. (3.9.13) in the
following way: In the expression for f (x1, x2), replace x1 with (y1y2)1/2, replace x2
with (y2/y1)1/2, and multiply the result by |J| = 1/(2y1).
Let Y have the pdf f2(y). The joint pdf of (X, Y ) is then g1(x|y)f2(y). Because
1/Y can be interpreted as the average service time, Z = XY measures how quickly,
compared to average, that the customer is served. For example, Z = 1 corresponds
to an average service time, while Z >1 means that this customer took longer than
average, and Z <1 means that this customer was served more quickly than the
average customer. If we want the distribution of Z, we could compute the joint pdf
of (Z, Y ) directly using the methods just illustrated.We could then integrate the joint
pdf over y to obtain the marginal pdf of Z. However, it is simpler to transform the
conditional distribution of X given Y = y into the conditional distribution of Z given
Y = y, since conditioning on Y = y allows us to treat Y as the constant y. Because
X = Z/Y, the inverse transformation is x = s(z), where s(z) = z/y. The derivative of
this is 1/y, and the conditional pdf of Z given Y = y is
Because Y is a rate, Y ≥ 0 and X = Z/Y > 0 if and only if Z >0. So,
Notice that h1 does not depend on y, so Z is independent of Y and h1 is the marginal
pdf of Z. The reader can verify all of this in Exercise 17.
The formula Z = XY in Example 3.9.10 makes it look as if Z should depend on Y . In reality, however, multiplying X by Y removes the
dependence thatX already has on Y and makes the result independent of Y . This type
of transformation that removes the dependence of one random variable on another
is a very powerful technique for finding marginal distributions of transformations of
random variables.
In Example 3.9.10, we mentioned that there was another, more straightforward
but more tedious, way to compute the distribution of Z. That method, which is useful
in many settings, is to transform (X, Y ) into (Z, W) for some uninteresting random
variable W and then integrate w out of the joint pdf All that matters in the choice
of W is that the transformation be one-to-one with differentiable inverse and that
the calculations are feasible. Here is a specific example.
There are other transformations that would have made the calculation of g1 simpler
if that had been all we wanted. See exr-3-9-21 for an example.
Theorem
3.9.6
Linear Transformations.
LetX = (X1, . . . , Xn) have a continuous joint distribution for
which the joint pdf is f . Define Y = (Y1, . . . , Yn) by
Y = AX, (3.9.19)
where A is a nonsingular n × n matrix. Then Y has a continuous joint distribution
with pdf
where A−1 is the inverse of A.
Proof Each Yi is a linear combination of X1, . . . , Xn. Because A is nonsingular, the
transformation in Eq. (3.9.19) is a one-to-one transformation of the entire space Rn
onto itself. At every point y ∈ Rn, the inverse transformation can be represented by
the equation
x = A−1y. (3.9.21)
The Jacobian J of the transformation that is defined by Eq. (3.9.21) is simply J =
det A−1. Also, it is known from the theory of determinants that
det A−1 = 1
det A
Therefore, at every point y ∈ Rn, the joint pdf g(y) can be evaluated in the following
way, according to Theorem 3.9.5: First, for i = 1, . . . , n, the component xi in
f (x1, . . . , xn) is replaced with the ith component of the vector A−1y. Then, the result
is divided by |det A|. This produces Eq. (3.9.20).
We extended the construction of the distribution of a function of a random variable to the case of several functions of several random variables. If one only wants the distribution of one function r1 of n random variables, the usual way to find this is to
first find n − 1additional functions r2, . . . , rn so that the n functions together compose
a one-to-one transformation. Then find the joint pdf of the n functions and finally
find the marginal pdf of the first function by integrating out the extra n − 1variables.
The method is illustrated for the cases of the sum and the range of several random
variables.
For the conditions of Exercise 1, find the pdf of the
average (X1 + X2)/2.
Suppose that three random variables X1, X2, and X3
have a continuous joint distribution for which the joint
pdf is as follows:
Suppose also that Y1 = X1, Y2 = X1X2, and Y3 = X1X2X3.
Find the joint pdf of Y1, Y2, and Y3.
Suppose that X1 and X2 have a continuous joint distribution
for which the joint pdf is as follows:
f (x1, x2) =
x1 + x2 for 0 < x1 < 1 and 0 < x2 < 1,
0 otherwise.
Find the pdf of Y = X1X2.
Suppose that the joint pdf of X1 and X2 is as given in
Exercise 4. Find the pdf of Z = X1/X2.
Let X and Y be random variables for which the joint
pdf is as follows:
Find the pdf of Z = X + Y .
Suppose that X1 and X2 are i.i.d. random variables and
that the pdf of each of them is as follows:
0 otherwise.
Find the pdf of Y = X1 − X2.
Suppose that X1, . . . ,Xn form a random sample of size
n from the uniform distribution on the interval [0, 1] and
that Yn
= max {X1, . . . , Xn
}. Find the smallest value of n
such that
Pr{Yn≥0.99}≥0.95.
Suppose that the n variables X1, . . . , Xn form a random
sample from the uniform distribution on the interval [0, 1]
and that the random variables Y1 and Yn are defined as
in Eq. (3.9.8). Determine the value of
Pr(Y1≤0.1 and Yn≤0.8).
For the conditions of Exercise 9, determine the value
of Pr(Y1 ≤ 0.1 and Yn
≥ 0.8).
For the conditions of Exercise 9, determine the probability
that the interval from Y1 to Yn will not contain the
point 1/3.
Let W denote the range of a random sample of n
observations from the uniform distribution on the interval
[0, 1]. Determine the value of Pr(W > 0.9).
Determine the pdf of the range of a random sample
of n observations from the uniform distribution on the
interval [−3, 5].
Suppose that X1, . . . , Xn form a random sample of n
observations from the uniform distribution on the interval
[0, 1], and let Y denote the second largest of the observations.
Determine the pdf of Y.
Hint: First determine the
CDF G of Y by noting that
G(y) = Pr(Y ≤ y)
= Pr(At least n − 1 observations ≤ y).
Show that if X1, X2, . . . , Xn are independent random
variables and if Y1 = r1(X1), Y2 = r2(X2), . . . , Yn
= rn(Xn),
then Y1, Y2, . . . , Yn are also independent random variables.
Suppose that X1, X2, . . . ,X5 are five random variables
for which the joint pdf can be factored in the following
form for all points (x1, x2, . . . , x5) ∈ R5:
f (x1, x2, . . . , x5) = g(x1, x2)h(x3, x4, x5),
where g and h are certain nonnegative functions. Show
that if Y1 = r1 (X1, X2) and Y2 = r2 (X3, X4, X5), then the
random variables Y1 and Y2 are independent.
In Example 3.9.10, use the Jacobian method (3.9.13)
to verify that Y and Z are independent and that eq-3-9-18 is the marginal pdf of Z.
Let the conditional pdf of X given Y be g1(x|y) =
3x2/y3 for 0 < x < y and 0 otherwise. Let the marginal
pdf of Y be f2(y), where f2(y) = 0 for y ≤ 0 but is otherwise
unspecified. Let Z = X/Y . Prove that Z and Y are
independent and find the marginal pdf of Z.
Let X1 and X2 be as in Exercise 7. Find the pdf of
Y = X1 + X2.
If a2 = 0 in Theorem 3.9.4, show that Eq. (3.9.2) becomes
the same as Eq. (3.8.1) with a = a1 and f = f1.
In Examples 3.9.9 and 3.9.11, find the marginal pdf
of Z1 = X1/X2 by first transforming to Z1 and Z2 = X1 and
then integrating z2 out of the joint pdf