[SciPy-User] specify lognormal distribution with mu and sigma using scipy.stats
Wed Oct 14 03:22:21 CDT 2009
I am having trouble creating a lognormal distribution with known mean mu and
standard deviation sigma using scipy.stats
According to the docs, the programmed function is:
lognorm.pdf(x,s) = 1/(s*x*sqrt(2*pi)) * exp(-1/2*(log(x)/s)**2)
So s is the standard deviation. But how do I specify the mean? I found some
information that when you specify loc and scale, you replace x by
But in the lognormal distribution, you want to replace log(x) by log(x)-loc
where loc is mu. How do I do that? In addition, would it be a good idea to
create some convenience functions that allow you to simply create lognormal
(and maybe normal) distributions by specifying the more common mu and sigma?
That would surely make things more userfriendly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User