Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fefd5d9

Browse filesBrowse files
authored
gh-64588: Clarify the difference between mu and xbar in statistics docs (#117333)
Thanks Davin Potts for the clarification idea.
1 parent 6099fdf commit fefd5d9
Copy full SHA for fefd5d9

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎Doc/library/statistics.rst

Copy file name to clipboardExpand all lines: Doc/library/statistics.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,9 @@ However, for reading convenience, most of the examples show sorted sequences.
501501
variance indicates that the data is spread out; a small variance indicates
502502
it is clustered closely around the mean.
503503

504-
If the optional second argument *mu* is given, it is typically the mean of
505-
the *data*. It can also be used to compute the second moment around a
506-
point that is not the mean. If it is missing or ``None`` (the default),
504+
If the optional second argument *mu* is given, it should be the *population*
505+
mean of the *data*. It can also be used to compute the second moment around
506+
a point that is not the mean. If it is missing or ``None`` (the default),
507507
the arithmetic mean is automatically calculated.
508508

509509
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.
573573
the data is spread out; a small variance indicates it is clustered closely
574574
around the mean.
575575

576-
If the optional second argument *xbar* is given, it should be the mean of
577-
*data*. If it is missing or ``None`` (the default), the mean is
576+
If the optional second argument *xbar* is given, it should be the *sample*
577+
mean of *data*. If it is missing or ``None`` (the default), the mean is
578578
automatically calculated.
579579

580580
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.
590590
>>> variance(data)
591591
1.3720238095238095
592592

593-
If you have already calculated the mean of your data, you can pass it as the
594-
optional second argument *xbar* to avoid recalculation:
593+
If you have already calculated the sample mean of your data, you can pass it
594+
as the optional second argument *xbar* to avoid recalculation:
595595

596596
.. doctest::
597597

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.