[issue40855] statistics.stdev ignore xbar argument

Matti report at bugs.python.org
Thu Jun 4 04:59:42 EDT 2020


Matti <matti.jansson at fysik.su.se> added the comment:

If we estimate the mean using a sample we loose one degree of freedom so it will be divided by N-1, while if we have the mean independent of the sample it should be divided by N to be unbiased. 

i.e. 
example 1 
sqrt(((1-1.5)²+(2-1.5)²)/(2-1)) = 0.7...
example 3
sqrt(((1-1.5)²+(2-1.5)²)/(2)) = 0.5

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40855>
_______________________________________


More information about the Python-bugs-list mailing list