[SciPy-User] specify lognormal distribution with mu and sigma using scipy.stats
Mark Bakker
markbak@gmail....
Wed Oct 14 03:22:21 CDT 2009
Hello list,
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
(x-loc)/scale
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.
Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091014/d5d3cfa4/attachment.html
More information about the SciPy-User
mailing list