Actuarial Notes

Correlation

Study guides: Exam MAS-I, Exam 9, Exam ACIA-CAPSTONE, Exam F2PC, Exam F3PC, Exam F1ILA, Exam F3ILA, Exam F3FIE, Exam F3BNK

Correlation is a measure of the strength and direction of the linear relationship between two random variables X and Y. The correlation coefficient is

\rho(X, Y) = \frac{\text{Cov}(X, Y)}{\sqrt{\text{Var}(X)\,\text{Var}(Y)}}

  • \text{Cov}(X, Y) = E[XY] - E[X]E[Y] is the covariance of X and Y.

The correlation lies between -1 and 1. It is 1 or -1 only when Y is an exact linear function of X with positive or negative slope, and 0 when there is no linear association. Unlike the covariance, it has no units, so it can be compared across variables measured on different scales.

Random variables X and Y have \text(X) = 25, \text(Y) = 36 and \text(X, Y) = -18. What is their correlation?

  • The product of the standard deviations is \sqrt{25 \times 36} = 30.
  • The correlation is \rho(X, Y) = -18/30 = -0.6, a moderate negative linear relationship.

Sample correlation coefficient

From n pairs of observations (x_i, y_i), the sample (Pearson) correlation coefficient is

r = \frac{\sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n} (x_i - \bar{x})^2 \sum_{i=1}^{n} (y_i - \bar{y})^2}}

  • \bar{x} and \bar{y} are the sample means.

Dividing the top and the bottom by n gives the same value as (\overline{xy} - \bar{x}\,\bar{y})/(s_x s_y), where \overline{xy} is the mean of the products and s_x and s_y are the standard deviations computed with divisor n. In simple linear regression, the R^2 of the fitted line is r^2.

What is the sample correlation of the pairs (1, 2), (2, 4), (3, 5), (4, 4) and (5, 5)?

  • The means are \bar{x} = 3 and \bar{y} = 4.
  • The sum of products of deviations is (-2)(-2) + (-1)(0) + 0 + (1)(0) + (2)(1) = 6.
  • The sums of squared deviations are 10 for x and 4 + 0 + 1 + 0 + 1 = 6 for y.
  • r = 6/\sqrt{10 \times 6} = 0.7746, and a regression line through these points has R^2 = 0.7746^2 = 0.60.

Correlation and independence

If X and Y are independent, their covariance is zero, so their correlation is zero. The converse does not hold: two variables can be strongly dependent, one even a function of the other, and still have zero correlation, because correlation measures only linear association.

X is uniform on [-1, 1] and Y = X^2. What is their correlation?

  • E[X] = 0, and E[XY] = E[X^3] = 0 because X^3 is symmetric about zero.
  • \text{Cov}(X, Y) = E[XY] - E[X]E[Y] = 0, so \rho(X, Y) = 0.
  • Y is completely determined by X, so the two are dependent even though they are uncorrelated.

Limitations of the Pearson correlation coefficient

  1. It measures only linear association. A tight curved pattern can have r near zero, and |r| is near 1 only when the points lie close to a straight line.
  2. It summarizes the dependence over the whole data set in one number, so it hides how the dependence differs between the tails and the middle of the distribution.
  3. It uses the values of the observations, not their ranks, so a single outlier or high-leverage point can drive it. Rank correlations such as Spearman's are less affected.
  4. It is not unchanged by a nonlinear increasing transformation of a variable, such as taking logs.
  5. A strong correlation does not show that one variable causes the other.

The pairs (1, 3), (2, 1), (3, 4) and (4, 2) are joined by (10, 10). What is the sample correlation with and without the last pair?

  • With all five pairs, r = 0.90.
  • Without (10, 10), r = 0.
  • The single point far from the others creates the whole correlation, so r should be read together with a scatter plot of the data.

Practice questions

Actuarial Notes