# Correlation coefficient

A coefficient of correlation is a mathematical measure of how much one number (such as a share price) can expected to be influenced by changes in another (such as an index). It is closely related to covariance (see below).

A correlation coefficient of 1 means that the two numbers are perfectly correlated: if one grows so does the other, and the change in one is a multiple of the change in the other.

A correlation coefficient of -1 means that the numbers are perfectly inversely correlated. If one grows the other falls. The growth in one is a negative multiple of the growth in the other.

A correlation coefficient of zero means that the two numbers are not related.

A non-zero correlation coefficient means that the numbers are related, but unless the coefficient is either 1 or -1 there are other influences and the relationship between the two numbers is not fixed. So if you know one number you can estimate the other, but not with certainty. The closer the correlation coefficient is to zero the greater the uncertainty, and low correlation coefficients means that the relationship is not certain enough to be useful.

The description above is of is a relationship between two variables. It is also possible to calculate correlations between many variables. Adding more variables should increase the correlation; any variables that do not significantly improve the correlation should be excluded.

## Covariance

The covariance of two variables (numbers measuring something) is a measure of the relationship between them. It closely related to the correlation and calculated as an intermediate step in calculating the correlation.

The covariance of two numbers is the arithmetic mean, over all values of x1, and the corresponding values of x2, of:

(x1 - μ1)(x2 - μ2)/n

where x1 is the value of one variable,
x2 is the value of the other variable,
μ1 is the arithmetic mean of of x1,
μ2 is the arithmetic mean of of x2,
and n is the number of values being summed over (i.e. the size of the population or sample).

The correlation of x1 and x2 is:

(cov(x1,x2))/(σ1σ2)

where cov(x1,x2) is the covariance of x1 and x2
σ1 is the standard deviation of x1 and
σ2 is the standard deviation of x2.