In the file sage/stats/basic_stats.py, we have the following code for
the std() function (calculates standard deviation):

200         if bias:
201             # population standard deviation
202             if isinstance(x, (int,long)):
203                 return sqrt(x/ZZ(len(v)))
204             return sqrt(x/len(v))
205         else:
206             # sample standard deviation
207             if isinstance(x, (int,long)):
208                 return sqrt(x/ZZ(len(v)))
209             return sqrt(x/(len(v)-1))

In line 208, when the "bias" argument is False, the denominator is
len(v) instead of len(v) - 1. The docstring says it should be dividing
by len(v) - 1.

Is this a bug?

-- Tianwei

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to