Lognormal Random Numbers Centered around a high value

后端 未结 1 1489
轮回少年
轮回少年 2021-01-14 14:56

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

1条回答
  •  终归单人心
    2021-01-14 15:15

    Be careful: the mean and sigma arguments correspond to the distribution of the log of the lognormal distribution; the actual arithmetic mean of the distribution is exp(mean + sigma**2/2), which evaluates to inf in standard double precision floating point when mean=2000 and sigma=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.

    0 讨论(0)
提交回复
热议问题