[SciPy-Dev] doc inconsistency at http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.lognorm.html
josef.pktd@gmai...
josef.pktd@gmai...
Mon Mar 5 11:47:02 CST 2012
On Mon, Mar 5, 2012 at 10:57 AM, <keith.briggs@bt.com> wrote:
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.lognorm.html defines lognorm as having a location parameter and a scale parameter, but later on it says:
>
> "... shape paramter [sic] sigma and scale parameter exp(mu)."
>
> The same name should be used throughout.
lognormal is always a bit tricky
the ... in your quote refer to sigma and mu for the normal
distribution or log(x), while scale and shape in the second half refer
to the parameters of the log-normal (conditional statement)
except for the typo it looks correct to me
>>> stats.norm.cdf(np.log(5.5), loc=5, scale=2) #mu=5 sigma=2
0.049714725582938914
>>> stats.lognorm.cdf(5.5, 2, scale=np.exp(5))
0.049714725582938914
>>> stats.lognorm.cdf(5.5, 2, loc=0, scale=np.exp(5)) #shape=sigma=2, scale=exp(mu)=exp(5)
0.049714725582938914
We should add an example like this to the docstring
Josef
>
> Keith
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
More information about the SciPy-Dev
mailing list