Overview
In statistics, correlation is a type of statistical relationship between two random variables or bivariate data. It usually refers to the extent to which a pair of quantities are linearly related. More generally, an arbitrary relationship between variables is called an association, meaning the degree to which the variability in one can be accounted for by the other.
The presence of a correlation is not sufficient to infer the presence of a causal relationship, and this is often stated as "correlation does not imply causation". Furthermore, the concept of correlation is not the same as dependence: if two variables are independent, then they are uncorrelated, but the opposite is not necessarily true – even if two variables are uncorrelated, they might be dependent on each other.
Correlations are useful because they can indicate a predictive relationship that can be exploited in practice. For example, an electrical utility may produce less power on a mild day based on the correlation between electricity demand and weather. In this example, there is a causal relationship, because extreme weather causes people to use more electricity for heating or cooling.
Pearson's product-moment coefficient
The most familiar measure of dependence between two quantities is the Pearson product-moment correlation coefficient, most commonly called 'Pearson's correlation coefficient' or simply 'the correlation coefficient' (as it is the most common variant). It is obtained by taking the ratio of the covariance between two variables of a numerical dataset normalized to the square root of their variances. Equivalently, Pearson's correlation coefficient can be calculated by dividing the covariance of the two variables by the product of their standard deviations.
Karl Pearson developed the coefficient from a similar idea by Francis Galton.
A Pearson product-moment correlation coefficient attempts to establish a line of best fit through a dataset of two variables by essentially laying out the expected values and the resulting Pearson's correlation coefficient indicates how far away the actual dataset is from the expected values. Depending on the sign of the Pearson's correlation coefficient, the result can be either a negative or positive correlation if there is any sort of relationship between the variables in the data set.
Correlation and independence
If the variables are independent, Pearson's correlation coefficient is 0. However, because the correlation coefficient detects only linear dependencies between two variables, the converse is not necessarily true. A correlation coefficient of 0 does not imply that the variables are independent.
Even though uncorrelated data do not necessarily imply independence, one can check if random variables are independent if their mutual information is 0.
1 source for this section
Rank correlation coefficients
Rank correlation coefficients, such as Spearman's rank correlation coefficient and Kendall's rank correlation coefficient (τ) measure the extent to which, as one variable increases, the other variable tends to increase, without requiring that increase to be represented by a linear relationship. If, as the one variable increases, the other decreases, the rank correlation coefficients will be negative.
It is common to regard these rank correlation coefficients as alternatives to Pearson's coefficient, used either to reduce the amount of calculation or to make the coefficient less sensitive to non-normality in distributions. However, this view has little mathematical basis, as rank correlation coefficients measure a different type of relationship than the Pearson product-moment correlation coefficient, and are best seen as measures of a different type of association, rather than as an alternative measure of the population correlation coefficient.
1 source for this section
The source notesEvidence & further reading3 sources
- Correlation — Wikipedia, revision 1374919803 Wikipedia contributors · Reference source · accessed 2026-09-22
- "Glossary of Statistical Terms". SticiGui. 2019-09-02. Retrieved 2025-12-18. stat.berkeley.edu · Reference source · link imported 2026-09-22
- Rodgers, J. L.; Nicewander, W. A. (1988). "Thirteen ways to look at the correlation coefficient". The American Statistician. 42 (1): 59–66. doi:10.1080/00031305.1988.10475524. JSTOR 2685263. jstor.org · Reference source · link imported 2026-09-22
Selected and reformatted from Correlation, by its contributors, under CC BY-SA 4.0. Revision 1374919803. Sections and formatting have been shortened; the linked revision provides the full context and contributor history. This reference text remains under the same license. Its additional citation links are imported from that revision and have not been independently checked here.