Wednesday, August 17, 2011

Generating Lévy random variables from Gaussian (Updated)

Update August 17, 2011: Corrected a typo in the distribution.

Sometimes when I learn a neat mathematical trick, I write a blog post so I don't forget it.  This is one of those times.

If a random variable x has the Lévy distribution with parameters c and μ, then the pdf of x is given by



This distribution has applications in economics, finance, and physics. A famous statistical application is the first passage time of a Brownian motion: if w(t) is given by the Wiener process (with initial condition w(0) = 0), and x is the first time that w(x) = d, then x is Lévy distributed with c = d^2 and μ = 0.

Here's the trick, which is hard to find in the literature: let z represent a Gaussian-distributed random variable with mean 0 and variance v. Then 1/z^2 is distributed Lévy with c = 1/(2v^2) and μ = 0. In other words, if you have a good Gaussian random number generator, you can use it to quickly generate Lévy-distributed random variables!

This property is very briefly mentioned in the following paper (I had to do a bit more digging to verify it and get the right parameter values):

J. M. Chambers, C. L. Mallows, and B. W. Stuck, "A method for simulating stable random variables," J. Am. Stat. Soc., vol. 71, no. 354, pp. 340-344, Jun. 1976.

1 comment:

Unknown said...

Dear Andrew, I have found this property to be very useful, but the problem I am facing is that if the mean of the Gaussian is at zero, 1/z^2 would diverge. I would be interested to know how you overcame this problem. If the mean of the Gaussian is moved to a, then the mean of the Levy is moved to 1/a^2, but I don't see how the variance is changed.

Best
Hoda Hossein-Nejad
University of Toronto