Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
707ce10
Add covariance and Pearson's correlation
Oct 15, 2019
fab1dab
Fix doctest
Oct 15, 2019
c06839b
Bugfixes
Oct 15, 2019
485f55f
Bugfix in doctest
Oct 15, 2019
3707299
Fix doctest
Oct 15, 2019
5097509
Improve documentation
Oct 16, 2019
2dbabdb
📜🤖 Added by blurb_it.
blurb-it[bot] Oct 16, 2019
411f2c0
Update docstring
Oct 16, 2019
09b0dab
Merge branch 'fix-issue-38490' of github.com:twolodzko/cpython into f…
Oct 16, 2019
4ed02eb
Improved exceptions handling
Oct 16, 2019
917f9af
Updated Misc/ACKS
Oct 16, 2019
30c2842
Fix exception handling
Oct 16, 2019
1b9c385
Update __all__
Oct 16, 2019
b3afc63
Add linear_regression
Oct 16, 2019
e29e9d1
Improve docstrings
Oct 16, 2019
b3c726e
Better naming of arguments in linear_regression
Oct 17, 2019
256de8d
Fix docstring
Oct 17, 2019
f44c468
Improve code formatting
Oct 17, 2019
117f567
Documentation for the new functionalities
Oct 17, 2019
3ad902a
Update Doc/library/statistics.rst
twolodzko Nov 13, 2019
5ed2846
Fixed documentation after code review
Nov 15, 2019
5979dba
Initial fixes after code review
Nov 15, 2019
4bd459d
Fix documentation, typos, add new unit tests after review
Nov 16, 2019
be1cfb8
patchcheck fix
twolodzko Nov 16, 2019
eeeac98
In linear_regression use positional arguments & return namedtuple
Oct 6, 2020
a3e1ba0
Correct documentation
Oct 6, 2020
7784565
Merge branch 'master' into fix-issue-38490
Nov 2, 2020
9bf170d
Update version information
Nov 2, 2020
48a2bea
Update Doc/whatsnew/3.10.rst
twolodzko Nov 2, 2020
37b742e
Fixed markup in linear regression description
Nov 3, 2020
aa4805f
Merge branch 'master' into fix-issue-38490
twolodzko Nov 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve docstrings
  • Loading branch information
Tymoteusz Wołodźko committed Oct 16, 2019
commit e29e9d130e605210399a6c29a07b9c55256455cc
5 changes: 5 additions & 0 deletions Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,11 @@ def covariance(x, y, /):
def correlation(x, y, /):
"""Pearson's correlation coefficient

Return the Pearson's correlation coefficient for two variables. Pearson's correlation coefficient *r*
takes values between +1 and -1. It measures the strength and direction of the linear relationship between
two variables, where +1 means very strong, positive linear relationship, -1 very strong, negative linear
relationship, and 0 no linear relationship.

>>> x = [1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> y = list(reversed(x))
>>> correlation(x, x)
Expand Down