[Numpy-discussion] non-standard standard deviation

Dr. Phillip M. Feldman pfeldman at verizon.net
Sun Nov 29 17:10:14 EST 2009


All of the statistical packages that I am currently using and have used in
the past (Matlab, Minitab, R, S-plus) calculate standard deviation using the
sqrt(1/(n-1)) normalization, which gives a result that is unbiased when
sampling from a normally-distributed population.  NumPy uses the sqrt(1/n)
normalization.  I'm currently using the following code to calculate standard
deviations, but would much prefer if this could be fixed in NumPy itself:

def mystd(x=numpy.array([]), axis=None):
   """This function calculates the standard deviation of the input using the
   definition of standard deviation that gives an unbiased result for
samples
   from a normally-distributed population."""
-- 
View this message in context: http://old.nabble.com/non-standard-standard-deviation-tp26566808p26566808.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.




More information about the NumPy-Discussion mailing list