[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

Julian Taylor report at bugs.python.org
Sat Jan 25 13:37:20 CET 2014


New submission from Julian Taylor:

the pvariance and variance functions take the argument mu and xbar to pass the population and sample mean to avoid some recomputation.

I assume the keyword arguments are different because the two means accepted are different, but the docstring does not indicate this directly.
It just says mu or xbar is the mean of the data. The module documentation is a little clearer but only in the grey box right at the end.

I would propose to change the docstring and module documentation to explicitly state that mu is the population mean and xbar is the population mean.
E.g.

- The optional argument mu, if given, should be the mean of
the data.
+ The optional argument mu, if given, should be the population mean of
the data.

etc.

----------
messages: 209192
nosy: jtaylor
priority: normal
severity: normal
status: open
title: clarify meaning of xbar and mu in pvariance/variance of statistics module
versions: Python 3.4

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


More information about the Python-bugs-list mailing list