gh-64588: Clarify the difference between mu and xbar in statistics docs (#117333)

Thanks Davin Potts for the clarification idea.
This commit is contained in:
Mariusz Felisiak 2024-04-19 07:36:24 +02:00 committed by GitHub
parent 6099fdf733
commit fefd5d9711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 7 deletions

View File

@ -501,9 +501,9 @@ However, for reading convenience, most of the examples show sorted sequences.
variance indicates that the data is spread out; a small variance indicates variance indicates that the data is spread out; a small variance indicates
it is clustered closely around the mean. it is clustered closely around the mean.
If the optional second argument *mu* is given, it is typically the mean of If the optional second argument *mu* is given, it should be the *population*
the *data*. It can also be used to compute the second moment around a mean of the *data*. It can also be used to compute the second moment around
point that is not the mean. If it is missing or ``None`` (the default), a point that is not the mean. If it is missing or ``None`` (the default),
the arithmetic mean is automatically calculated. the arithmetic mean is automatically calculated.
Use this function to calculate the variance from the entire population. To Use this function to calculate the variance from the entire population. To
@ -573,8 +573,8 @@ However, for reading convenience, most of the examples show sorted sequences.
the data is spread out; a small variance indicates it is clustered closely the data is spread out; a small variance indicates it is clustered closely
around the mean. around the mean.
If the optional second argument *xbar* is given, it should be the mean of If the optional second argument *xbar* is given, it should be the *sample*
*data*. If it is missing or ``None`` (the default), the mean is mean of *data*. If it is missing or ``None`` (the default), the mean is
automatically calculated. automatically calculated.
Use this function when your data is a sample from a population. To calculate Use this function when your data is a sample from a population. To calculate
@ -590,8 +590,8 @@ However, for reading convenience, most of the examples show sorted sequences.
>>> variance(data) >>> variance(data)
1.3720238095238095 1.3720238095238095
If you have already calculated the mean of your data, you can pass it as the If you have already calculated the sample mean of your data, you can pass it
optional second argument *xbar* to avoid recalculation: as the optional second argument *xbar* to avoid recalculation:
.. doctest:: .. doctest::