Books Probability and Statistical Inference
Functions of One Random Variable
Let be a random variable of continuous type. If we consider a function defined on the support of , then we can define a new random variable . If we can find its CDF via
then its PDF is given by
This method is called distribution function techniquedistribution function technique.
A spinner is fixed at in the -plane and determines a ray from that point. Let be the angle from the downward vertical (the direction of decreasing ) to the ray, with when the ray tilts toward the positive -axis, and assume is uniformly distributed on . Let be the -coordinate of the point where the ray meets the -axis.
We have
The CDF of is
We are interested in the distribution of . The CDF of is
Since , applying the second case of yields
Differentiating, we get the PDF of :
The spinner geometry and the Cauchy density in (5.1) are illustrated in Figure 5.1.
Random variables with PDF of the form of (5.1) are said to have a Cauchy distributionCauchy distribution.
Proof
Consider the improper integral
For it to exist, a necessary condition is that
exists as a finite number. We will show that the integral above diverges by comparison test. When is large enough (in fact, ), we have
Since
we conclude that
This means that the improper integral is undefined, and hence the mean of a Cauchy random variable is undefined.
Sometimes when the function has certain properties, we can shortcut the distribution function technique by using the so-called change of variable techniquechange of variable technique. Let be a random variable of continuous type with PDF on the support . Let where is a strictly increasing and differentiable function on . Then has an inverse function (that is also strictly increasing and differentiable). The support is mapped to by . Here, and . Then, the CDF of is
On the support , we have
Differentiating, we get the PDF of :
An analogous result holds for the case when is decreasing. In that case, we have
Since when is increasing, and when is decreasing, we can summarize the result for both cases as
(5.2) tells us that we can simply plug into the PDF of and multiply by to get the PDF of , bypassing the determination of the CDF of .
Let have the PDF
Find the PDF of .
Solution
is strictly decreasing and differentiable in . Its inverse is
Differentiate,
Therefore, the PDF of is
This implies that has a uniform distribution on , i.e., .
Formula (5.2) requires a one-to-one transformation. When is not injectiveβfor example, sends both and to the same valueβwe must account for every preimage, not just one branch.
Let , where may be . Let have support and PDF . Let have support (when , read this as ). Suppose that and have the same distribution and that . Show that
Here , so . Applying (5.2) would give
which cannot hold for all when is symmetric about . The transformation is two-to-one on : each arises from both and .
Proof
Symmetry of gives and for all . Because , probabilities for involve values of on both sides of . We treat and separately; in each case , so is defined.
When , we have if and only if , so by symmetry
Therefore,
It follows that
Differentiating gives, for ,
When , we have
By symmetry,
Splitting at ,
Since , the case already gives . Hence
Differentiating gives, for ,
Combining the two cases,
The following theorem provides a way to generate any continuous type random variable from a uniform random variable and the CDF of .
Proof
The CDF of is given by
Since the inverse is well-defined, the following two events are the same:
Thus,
where is the CDF of , and it is given by
Since , we have
That is, the CDF of is .
In practice, simulation via Theorem 5.1 is less straightforward than the theorem makes it look: the recipe is simple on paper, but the bottleneck is evaluating the inverse CDF . Closed forms are rare, so one usually resorts to numerical methods for quantiles.
Consider drawing a standard normal random variable. Neither nor is available in closed elementary form. Later we use the BoxβMuller transformation for that purpose.
To illustrate Theorem 5.1 with a transparent inverse, we take the Cauchy distribution, whose quantile map is an elementary trigonometric function (after a linear change of variables, it is ).
Letβs return to Example 5.1. Suppose and define
Now suppose . The CDF of is for , so we may write . Then as a function of is
In Example 5.1 we showed that has PDF
and CDF
The inverse is
Therefore, by Theorem 5.1,
which matches (5.3).
Figure 5.2 illustrates the quantile construction: independent draws are mapped through to obtain draws of , with a histogram of the simulated values compared to the Cauchy density.
The following theorem is the converse of Theorem 5.1.
Proof
Consider the CDF of . We have
Because is strictly increasing, the event is equivalent to . It then follows that
This is exactly the CDF of . Therefore, .
Exercises
Proof
Let . We have . Applying the change-of-variable technique, we get the PDF of :
Therefore, .