# [SciPy-User] log normal distribution random number array generation Classic List Threaded 4 messages Open this post in threaded view
|

## [SciPy-User] log normal distribution random number array generation

 Hi experts!I wanna generate a random number array of size=N using a log normal distribution. From http://en.wikipedia.org/wiki/Log-normal_distribution i wanna use the parameters mu and sigma.I know that I must do:form scipy.stats import lognormnew_array = lognorm.rvs(......, size=N)What must I set like parameters (loc, s, scale, etc.) for use mu and sigma distribution parameters.In the same way: what must I do in   new_array = norm.rvs(......, size=N) for generate a array of random numbers using a gaussian distribution with parameters mu and sigma?Waitign for your answers.Thanks a lot!_______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user
Open this post in threaded view
|

## Re: log normal distribution random number array generation

 Jose,For lognorm.rvs, mu and sigma translate to loc and scale, respectively. The same is true for norm.rvs-paul On Fri, Nov 1, 2013 at 8:17 AM, Josè Luis Mietta wrote: Hi experts! I wanna generate a random number array of size=N using a log normal distribution. From http://en.wikipedia.org/wiki/Log-normal_distribution i wanna use the parameters mu and sigma. I know that I must do: form scipy.stats import lognorm new_array = lognorm.rvs(......, size=N) What must I set like parameters (loc, s, scale, etc.) for use mu and sigma distribution parameters. In the same way: what must I do in   new_array = norm.rvs(......, size=N) for generate a array of random numbers using a gaussian distribution with parameters mu and sigma? Waitign for your answers. Thanks a lot! _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user