Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pearson correlation coefficient
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Software implementations== * [[R (programming language)|R]]'s statistics base-package implements the correlation coefficient with <code>cor(x, y)</code>, or (with the P value also) with [http://stat.ethz.ch/R-manual/R-patched/library/stats/html/cor.test.html <code>cor.test(x, y)</code>]. * The [[SciPy]] [[Python (programming language)|Python]] library via [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html <code>pearsonr(x, y)</code>]. * The [[Pandas (software)|Pandas]] and Polars Python libraries implement the Pearson correlation coefficient calculation as the default option for the methods [https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html <code>pandas.DataFrame.corr</code>] and [https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.corr.html <code>polars.corr</code>], respectively. * [[Wolfram Mathematica]] via the [https://reference.wolfram.com/language/ref/Correlation.html <code>Correlation</code>] function, or (with the P value) with [https://reference.wolfram.com/language/ref/CorrelationTest.html <code>CorrelationTest</code>]. * The [[Boost (C++ libraries)|Boost]] [[C++]] library via the [https://www.boost.org/doc/libs/1_76_0/libs/math/doc/html/math_toolkit/bivariate_statistics.html <code>correlation_coefficient</code>] function. * [[Excel]] has an in-built [https://support.microsoft.com/en-us/office/correl-function-995dcef7-0c0a-4bed-a3fb-239d7b68ca92 <code>correl(array1, array2)</code>] function for calculating the Pearson's correlation coefficient.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)