Professional Documents
Culture Documents
Hugo Hernandez
ForsChem Research, 050030 Medellin, Colombia
hugo.hernandez@forschem.org
doi: 10.13140/RG.2.2.28214.60481
Abstract
Many random variables can be described as arbitrary functions of one or more independent
random variables with arbitrary probability distributions. The resulting probability density
function of any dependent continuous random variable can be mathematically described in
terms of the probability density functions of the independent variables, as long as the function
can be expressed explicitly in terms of at least one independent variable. Such theory of
random variable transformation has been very well established but it is not widely known.
Thus, the sole purpose of the present report is to provide an illustrative reference by means of
several examples, of the calculation of probability density functions for nonlinear and
multivariate random functions. One of the most relevant examples shows that the norm of a
three-dimensional vector of identical zero-mean normal random variables is a Maxwell-
Boltzmann distribution, whereas its direction corresponds to a vector of uniform distributions.
In another relevant example, the validity of the Central Limit Theorem is illustrated for the
average of several independent exponential random variables.
Keywords
1. Introduction
Random variables are ubiquitous in Nature. For example, all variables that are measured
experimentally present fluctuation and therefore, they are random. Also, the lack of
information about a certain process or system leads to uncertainty and randomness.[1]
Certain random variables may depend on the behavior of one or more independent random
variables, and such dependency can be described by means of mathematical functions. The
purpose of the present report is to illustrate, by means of various examples, the determination
of the probability density function of a dependent random variable which is an arbitrary
function of one or more independent random variables, given that the probability density
functions of the independent variables are known, and that the random function can be solved
explicitly for at least one independent random variable.
In Section 2, the general expression for the calculation of the probability density function of a
random variable which is an arbitrary non-linear function of a single random variable is
presented and illustrated. An additional degree of difficulty is found in Section 3, when the
probability density function of a random variable depending on two independent random
variables is considered. Finally, the more general case of functions of several independent
random variables is explained in Section 4, where some relevant examples of application are
also discussed. In one example, the probability distribution functions of the norm and the
direction vector of any three-dimensional vector of identical zero-mean normal random
variables are obtained, indicating that the norm behaves as a Maxwell-Boltzmann distribution,
whereas the direction is a uniform random vector. In another example, the probability density
function for the average value of several independent exponential random variables is derived,
showing that for a large number of variables, the normal distribution is obtained, in agreement
with the Central Limit Theorem.
Let us first consider a general non-linear transformation of random variable with any
arbitrary probability density distribution , where denotes any particular realization of .
Its probability density function can be formally defined as:
(2.1)
(2.2)
Because the non-linear transformation of a random variable is also a random variable, it is then
possible to define the random variable as:
(2.3)
This random variable can also be described by its own probability density function , such
that:
(2.4)
(2.5)
(2.6)
Since the inverse function may lead to multiple values if it turns out to be a multivalued
function, then Eq. (2.5) should be more generally expressed as:
(2.7)
where denotes the -th value, and is the total number of different possible values of
.
( )
(2.8)
( )| | ( )| |
(2.9)
The absolute value of the derivative is required because the probability density function is non-
negative by definition.
Eq. (2.9) is usually known as the change of variables theorem or the variable transformation
theorem.[2]
Let us first consider a uniform random variable with the following probability density
function:
(2.10)
Let us also consider in this example that ; and make the following transformation:
(2.11)
(2.12)
which is a one-to-one function, and therefore there is only one single value for each value .
The resulting probability density function of will then be (from Eq. 2.9):
( )| | ( )| | {
(2.13)
Figure 1 shows the probability density functions of random variables and , considering
and .
Figure 1. Probability density function of uniform random variable (Eq. 2.10) defined in the
range from 2 to 10 (left) and the corresponding probability density function (Eq. 2.13) of its
reciprocal random variable (right).
As the second example, let us consider the normal random variable with mean 0 and
standard deviation 1, with the following probability density function:
(2.14)
| |
(2.15)
(2.16)
which clearly results in two possible values of for each value . Thus, the probability density
function of will be (from Eq. 2.9):
( )| ( )| ( )| ( )|
( ) ( )
| | | |
(2.17)
Figure 2 shows the probability density functions of random variables (Eq. 2.14) and (Eq.
2.17).
Figure 2. Probability density function of the standard normal random variable given by Eq.
(2.14) (blue line) and the corresponding probability density function (Eq. 2.17) of its absolute
value (green line).
Let us now consider the case when a random variable is a function of two independent
random variables and , with arbitrary probability distributions given by and
. The function is:
(3.1)
Since and are independent, then the probability of taking any arbitrary value is:
(3.2)
where the function given in Eq. (3.1) is solved explicitly for (with possible solutions) as:
(3.3)
(3.4)
Thus, as long as one of the independent variables can be expressed explicitly as a function of
and the other independent variable, then it will be possible to obtain the probability density
function of :
( )| |
( )| |
(3.5)
Again, let us consider some examples. First, assume the following function:
(3.6)
where and are independent uniform random variables defined between 0 and 1, and
therefore:
{
(3.7)
{
(3.8)
(3.9)
(3.10)
( )| |
(3.11)
{
(3.12)
So there are two conditions on for having a non-zero probability density function:
and . Since both conditions are necessary, then it is possible to use
the following integrated condition:
(3.13)
(3.14)
And therefore:
(3.15)
Figure 3 shows the probability density function obtained, according to Eq. (3.15).
Figure 3. Probability density function of the sum of two independent uniform random variables
(both defined in the range [0,1]), , calculated from Eq. (3.15).
In another example, let us consider two independent random variables and , both
described by the standard normal distribution:
(3.16)
(3.17)
(3.18)
(3.19)
| |
(3.20)
( ) ( )
( ) ( )
( )
(3.21)
( )|
[ ] [ ( )]
(3.22)
Figure 4. Probability density function of the positive square root of the sum of squares of two
independent standard normal random variables, , calculated from Eq. (3.22).
The results obtained in the previous sections can be extended to a more general random
multivariate function of independent random variables with arbitrary probability
distributions:
(4.1)
If such function can be expressed explicitly in terms of any of the independent variables (e.g.
) as:
(4.2)
with possible solutions, then, the probability density function of will be:
( ( ) )
( )| |
(4.3)
(4.4)
where are independent standard normal random variables, and the realizations of
are non-negative.
(4.5)
with
| |
(4.6)
( ) ( )
( )
(4.7)
Figure 5. Probability density function of the positive square root of the sum of squares of three
independent standard normal random variables, , calculated from Eq. (4.7)
(blue line), compared to the probability density functions for one (green line) and two
dimensions (red line).
Please notice that the average value of the 3-dimensional function is:
[ | ]
[ | ]
(4.8)
(4.9)
then, the standard Maxwell-Boltzmann distribution is obtained.[4] Please notice that the
expected value of the standard Maxwell-Boltzmann random variable is .
( )
( )| | ( )
(4.10)
On the other hand, let us consider the following direction random function for the same three
independent standard normal random variables in the:
(4.11)
(4.12)
This is a one-to-one function valid only for realizations of in the range , and with
partial derivative:
| | ( )
(4.13)
( )
( )
( )
( )
(4.14)
(4.15)
(4.16)
resulting in:
( )
(4.17)
( ( ) ( ))
( )
( ( ) ( ) )
(4.18)
[ ]
(4.19)
Eq. (4.19) corresponds to the probability density function of a uniform distribution in the range
[ ]. The expected value and the variance for this distribution are, respectively:
(4.20)
( ) |
(4.21)
As an interpretation of these results, let us consider the vector random variable , defined as:
[ ] [ ]
(4.22)
where are zero-mean normal random variables with standard deviation . The norm of this
random vector will be:
(4.23)
(4.24)
[ ]
[ ]
(4.25)
This means that the direction vector of a 3-dimensional vector of identical normal random
variables with mean zero is a vector composed of uniform random variables, each one
described by the probability density function given in Eq. (4.19).
( ) [ ] [ ]
(4.26)
and its variance is:
( ) ( ) ( ) ( )
(4.27)
Combining Eq. (4.24) and (4.25) yields:
(4.28)
Therefore, the vector of zero-mean normal random variables can be expressed in terms of the
standard Maxwell-Boltzmann variable and the uniform unit vector .
As a final example, let us now consider the average of a large number of independent
exponential random variables with a probability distribution given by:
(4.29)
and where .
(4.30)
(4.31)
with partial derivative:
| |
(4.32)
Thus, from Eq. (4.3) and given that can only take positive values:
( )
( )
( )
(4.33)
Thus, Eq. (4.33) can be solved recursively yielding:
( )
( )
( )
(4.34)
Figure 6 shows the behavior of the probability density function of the average value as the
number of independent exponential random variables increases.
(4.35)
Thus, Eq. (4.34) becomes:
(4.36)
Figure 6. Evolution of the probability density function of the average function for
independent exponential random variables calculated from Eq. (4.34) for different values of .
Now, let us consider the following approximation for based on the first two terms of a
series expansion:
(4.37)
( )
( )
( )
(4.38)
which corresponds to the probability density function of a normal distribution with mean and
variance , which is in agreement with the Central Limit Theorem.[6]
Acknowledgments
This research did not receive any specific grant from funding agencies in the public,
commercial, or not-for-profit sectors.
References
[2] Casella, G., & Berger, R. L. (2002). Statistical Inference. 2nd Ed. Pacific Grove: Duxbury.
[3] Hernandez, H. (2017). On the generalized validity of the Maxwell-Boltzmann distribution and
the zeroth Law of Thermodynamics. ForsChem Research Reports 2017-4. doi:
10.13140/RG.2.2.26937.16480.
[5] Marsaglia, G., & Marsaglia, J. C. (1990). A new derivation of Stirling's approximation to n!.
American Mathematical Monthly, 826-829.
[6] Canavos, G. C. (1984). Applied probability and statistical methods. Englewood Cliffs:
Prentice Hall.