Adapted from Wikipedia:
In probability theory and statistics, correlation, (often measured as a correlation coefficient), indicates the strength and direction of a linear relationship between two random variables.
In general statistical usage, correlation or co-relation refers to the departure of two variables from independence. In this broad sense there are several coefficients, measuring the degree of correlation, adapted to the nature of data.
The most used is the Pearson product-moment correlation coefficient:
If the data comes from a statistical sample then
(1)
where
and 
are the standard score, sample mean, and sample standard deviation.
If the data comes from a statistical population, then
(2)
where
and 
are the standard score, population mean, and population standard deviation.





