[issue21046] Document formulas used in statistics

Alextp report at bugs.python.org
Mon Mar 24 19:23:53 CET 2014


Alextp added the comment:

5) pvariance.
Calculates "population variance" of iterable by such formula:

pvariance([x1, x2, ..., xN], M) = ((x1 - M)**2 + ... + (xN - M)**2) / N

M is optional argument which should be value of mean([x1, ... xN]) calculated before. If M parameter is missed in call, it's calculated automatically:
M = (x1 + ... + xN) / N

6) variance.
(NOTE: pls check this.)
Calculates "sample variance" from iterable. It's given by the same formula as pvariance, but not for entire iterable value set. Only subset of iterable is used for calculation. .......... (write here how this subset is taken, randomly or what..... i didn't get it from Wikipedia.)

Ok?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21046>
_______________________________________


More information about the Python-bugs-list mailing list