| |
1 to 1 Transformation of Random Vector
|
| |
Motivation: Generate complex random variable
from simpler one.
Most software language support functions that are able to
create uniform distributed pseudorandom number. This number can be use to
generate other random variable with different distribution or density, by
evaluating the inverse function of the distribution function of the random
variable we wish to generate. However for some density functions, like Gaussian,
this approach is limited, since the distribution function can’t be easily
evaluate, or would require high computational effort. For these cases the 1 to 1
transformation provides an alternative that is simpler and requires less
computational stress.
To illustrate the value of the 1 to 1 transformation, we are providing an
experimental and a mathematical prove, which will show how two Gaussian R.V. can
be generated from one uniform R.V. and one Rayleigh R.V. using a some variable
transformation.
Let θ be a uniform Random (U[0,2π]) Variable and R be a Rayleigh Random Variable
And consider the following Variable Transformation
h1=X=Rcos(θ), h2= Y=Rsin(θ)
Where X and Y are going to be to independent Gaussian R.V. generated from the
Uniform and Rayleigh R.V.s |
| Experimental Prove: |
| Samples |
|
Range |
|
|
|
|
|
|
|
| |
For our experiment we have written in html and java script a code
that generate our random variable and plot the histogram to verify they have the
correct density. JavaScript provides a random function under the library Math
(Math.ramdom()) that generates a pseudorandom random number with a uniform
distribution from 0 to 1 with double precision.
On the above interface, we can use Uniform, Rayleigh and Gaussian buttons, to generate a plot
for the histogram of the
respective random variable. The histogram uses a sample of
10,000 to 500,000 numbers, and a integer range of 20 to 200 points representing
numbers from 0 to 2 π.
To generate the density U[0,2π] we can use the code 2*π*Math.random().
For the Rayleigh density we evaluate a uniform density random variable in
the inverse of the distribution function of the Rayleigh.

So we can use the code Math.squrt(-2*Math.log(Math.random())) to get a Rayleigh
random value
Finaly, we generate the two Gaussian random variables by valuating two previous
in X=Rcos(θ), Y=Rsin(θ) transform functions. Where R is the U[0,2π], θ is the
Rayleigh, and X and Y are the Gaussian random variable. |
| Mathematical Prove: |
Let θ be a uniform Random (U[0,2π]) Variable and R be a Rayleigh Random
Variable
with join density:

And consider the following Variable Transformation h1=X=Rcos(θ), h2= Y=Rsin(θ)
To know the density function for the new variables, we can use the following join density variable transform:

Where is
the Jacobian matrix of the variable exchange:

Inverse functions for h1 and h2:

As we can see the final result are two independent Gaussian random variables. |