[Numpy-discussion] non-standard standard deviation
Dr. Phillip M. Feldman
Fri Dec 11 21:13:31 CST 2009
Anne Archibald wrote:
> 2009/11/29 Dr. Phillip M. Feldman <email@example.com>:
>> All of the statistical packages that I am currently using and have used
>> the past (Matlab, Minitab, R, S-plus) calculate standard deviation using
>> sqrt(1/(n-1)) normalization, which gives a result that is unbiased when
>> sampling from a normally-distributed population. NumPy uses the
>> normalization. I'm currently using the following code to calculate
>> deviations, but would much prefer if this could be fixed in NumPy itself:
> This issue was the subject of lengthy discussions on the mailing list,
> the upshot of which is that in current versions of scipy, std and var
> take an optional argument "ddof", into which you can supply 1 to get
> the normalization you want.
You are right that I can get the result that I want by setting ddof.
I still feel that the default value for ddof should be 1 rather than 0; new
users are unlikely to read the documentation for a command like std, because
it is reasonable to expect standard behavior across all statistical
View this message in context: http://old.nabble.com/non-standard-standard-deviation-tp26566808p26753999.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
More information about the NumPy-Discussion