I am trying to create random numbers from a lognormal distribution using numpy/scipy.
The mean is given as 2000 and sigma as 800.
If I create my random valus using numpy.random.lognormal(mean=2000, sigma=800, size=10000)
all I get is very high or inf numbers.
Is there a way to work around this?
Be careful: the
meanandsigmaarguments correspond to the distribution of the log of thelognormaldistribution; the actual arithmetic mean of the distribution isexp(mean + sigma**2/2), which evaluates toinfin standard double precision floating point whenmean=2000andsigma=800.See
http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.lognormal.html#numpy.random.lognormal
and
http://en.wikipedia.org/wiki/Log-normal_distribution
for more details.