mirror of
https://github.com/python/cpython.git
synced 2026-05-06 04:37:33 -04:00
gh-149244 Document statistics functions that require sequence inputs. (gh-149264)
This commit is contained in:
committed by
GitHub
parent
0f5cd57f80
commit
bb5e41efdb
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user