[SciPy-user] Possible bug in stats.describe
Christopher Mutel
cmutel at gmail.com
Thu Jun 8 23:13:40 EDT 2006
Hello.
I am using the Ubuntu pre-packaged version of SciPy (0.3.2-3ubuntu2).
In my version, as best as I can tell, the stats.describe function is
incorrect. It gives the variance of a sample, not the standard
deviation. Could someone confirm that I am reading this right?
>From my stats.py:
def describe(a,axis=-1):
"""Returns several descriptive statistics of the passed array. Axis
can equal None (ravel array first), or an integer (the axis over
which to operate)
Returns: n, (min,max), mean, standard deviation, skew, kurtosis
"""
a, axis = _chk_asarray(a, axis)
n = a.shape[axis]
mm = (minimum.reduce(a),maximum.reduce(a))
m = mean(a,axis)
v = var(a,axis)
sk = skew(a,axis)
kurt = kurtosis(a,axis)
return n, mm, m, v, sk, kurt
This is the first time I have ever suspected a bug, so maybe I am
doing this all wrong. Or has this been noticed already and fixed?
-Chris Mutel
More information about the SciPy-User
mailing list