This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wolma
Recipients steven.daprano, wolma
Date 2014-04-09.08:20:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397031642.37.0.525075881124.issue21184@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
Date User Action Args
2014-04-09 08:20:42wolmasetrecipients: + wolma, steven.daprano
2014-04-09 08:20:42wolmasetmessageid: <1397031642.37.0.525075881124.issue21184@psf.upfronthosting.co.za>
2014-04-09 08:20:42wolmalinkissue21184 messages
2014-04-09 08:20:41wolmacreate