Wolfgang Maier added the comment: I do not think this is a bug in the module, but rather incorrect usage.
>From your own docs: data should be an iterable of Real-valued numbers, with at least one value. The optional argument mu, if given, should be the mean of the data. If it is missing or None, the mean is automatically calculated. Nowhere does it say that mu should be the known population mean, and rightly so! The definition of p_variance is that it is the variance of the data assuming that data *is* the whole population (so the correct mean can be calculated from it) s_variance on the other hand should give an estimate of the population variance under the assumption that data is a random sample of the population, but its formula _ss/(n-1) is derived under the assumption that mu is the sample mean, not the population mean. So everything's fine and there is nothing to fix really! ---------- nosy: +wolma _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21184> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com