Pearson correlation coefficient
Covariance
This is a measure of how two random variables change together, or the strength of their correlation.
Consider two random variables, \(X\) and \(Y\), each with \(n\) values (i.e., \(x_1\), \(x_2\), \(...\), \(x_n\) and \(y_1\), \(y_2\), \(...\), \(y_n\)). The covariance of \(X\) and \(Y\) can be found using either of the following equivalent formulas:
or
where, \(\bar{x}\) is the mean of \(X\) (or \(\mu_X\)) and \(\bar{y}\) is the mean of \(Y\) (or \(\mu_Y\))
Pearson correlation coefficient
The pearson correlation coefficient, \(\rho_{X,Y}\), is given by :
Here, \(\sigma_X\) is the standard deviation of \(X\) and \(\sigma_Y\) is the standard deviation of \(Y\). You may also see \(\rho_{X,Y}\) written as \(r_{X,Y}\).
The pearson correlation coefficient is a measure of the linear correlation between two variables X and Y.