]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149244 Document statistics functions that require sequence inputs. (gh-149264)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Sat, 2 May 2026 03:58:23 +0000 (22:58 -0500)
committerGitHub <noreply@github.com>
Sat, 2 May 2026 03:58:23 +0000 (22:58 -0500)
Doc/library/statistics.rst

index cbb131855dc664b048a6e69cccffc69b12ba05e6..dba0e26787d951653f66aa5e3329815cecb2baca 100644 (file)
@@ -713,7 +713,7 @@ However, for reading convenience, most of the examples show sorted sequences.
 
 .. function:: covariance(x, y, /)
 
-   Return the sample covariance of two inputs *x* and *y*. Covariance
+   Return the sample covariance of two sequence inputs *x* and *y*. Covariance
    is a measure of the joint variability of two inputs.
 
    Both inputs must be of the same length (no less than two), otherwise
@@ -739,7 +739,7 @@ However, for reading convenience, most of the examples show sorted sequences.
 
    Return the `Pearson's correlation coefficient
    <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_
-   for two inputs. Pearson's correlation coefficient *r* takes values
+   for two sequence inputs. Pearson's correlation coefficient *r* takes values
    between -1 and +1. It measures the strength and direction of a linear
    relationship.
 
@@ -802,7 +802,7 @@ However, for reading convenience, most of the examples show sorted sequences.
    (it is equal to the difference between predicted and actual values
    of the dependent variable).
 
-   Both inputs must be of the same length (no less than two), and
+   Both inputs must be sequences of the same length (no less than two), and
    the independent variable *x* cannot be constant;
    otherwise a :exc:`StatisticsError` is raised.