[SciPy-user] S.stats broken?
Robert Kern
rkern at ucsd.edu
Mon Jun 20 16:41:55 EDT 2005
Stephen Walton wrote:
> In the below, I've done "import scipy as S" and "import scipy.special as
> special"
>
> In [272]:S.stats.norm.cdf(0,-4.)
> Out[272]:0.999999713348
In [5]: stats.norm.cdf(-4.)
Out[5]: 3.16712418331e-05
The value you want to evaluate at comes first. Location and scale or any
other such parameters come after.
> In [273]:special.ndtr(-4.)
> Out[273]:3.1671241833119884e-05
>
> If I'm reading the code correctly, S.stats.norm.cdf(0,-4) should be
> equal to special.ndtr(-4). It is not. Why?
>
> lognorm.cdf is even worse. S.stats.lognorm.cdf(1,x) returns 0.5 for any
> value of x from a small value up to and including inf.
Same here. You want scipy.stats.lognorm(x, 1).
> What am I missing here? This package can't possibly be this badly
> broken. scipy.__version__ is 0.3.3_309.4624.
--
Robert Kern
rkern at ucsd.edu
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the SciPy-User
mailing list