Tutorials › CAS Exam 9 - Risk Management for Actuaries › Covariance and Pearson Correlation

CAS Exam 9 · Correlation and Tail Dependence · Tutorial 423 of 995

Covariance and Pearson Correlation

Calculate and interpret covariance and Pearson correlation for paired losses, with attention to units, assumptions, and calculation traps.

Advanced 10 min read

What You'll Learn

  • Define covariance and Pearson correlation for paired loss variables
  • Calculate expected values, variances, covariance, and correlation from joint outcome tables
  • Interpret covariance units and correlation’s dimensionless range
  • Recognize when correlation is undefined and what its value does and does not convey
  • Avoid confusing the expected product with covariance

Why Paired Losses Need Two Measures

When two hypothetical insurance loss amounts are considered together, their individual averages and variances do not describe how they tend to move as a pair. Covariance measures whether high values of one variable tend to occur alongside high or low values of the other. Pearson correlation expresses that linear co-movement on a standardized scale. Both are summaries of a joint probability model; neither, by itself, describes every feature of dependence.

Throughout this tutorial, \(X\) and \(Y\) denote hypothetical loss amounts measured over the same one-year period. Each example specifies a joint distribution: the listed pairs are the possible outcomes, with probabilities that sum to one. Assume finite second moments, so the means and variances used below exist. No interest or mortality assumptions are needed because the examples concern one-year loss amounts, not discounted or life-contingent payments.

Definition: For loss variables \(X\) and \(Y\) with finite means and variances, their covariance is $$ \operatorname{Cov}(X,Y)=E\left[(X-E[X])(Y-E[Y])\right] =E[XY]-E[X]E[Y]. $$ If both variances are positive, their Pearson correlation is $$ \rho_{X,Y}=\frac{\operatorname{Cov}(X,Y)} {\sqrt{\operatorname{Var}(X)}\sqrt{\operatorname{Var}(Y)}}. $$ Covariance measures joint co-movement in the units of the product of the two variables. Correlation is dimensionless and lies between \(-1\) and \(1\), inclusive.

How to Calculate from a Joint Distribution

For a discrete joint distribution with possible pairs \((x_j,y_j)\) and probabilities \(p_j\), calculate an expectation by weighting each outcome by its probability. In particular, \(E[X]=\sum_j p_jx_j\), \(E[Y]=\sum_j p_jy_j\), and \(E[XY]=\sum_j p_jx_jy_j\). The marginal variances can be found from \(E[X^2]-(E[X])^2\) and \(E[Y^2]-(E[Y])^2\). After finding the covariance, divide by both standard deviations to obtain correlation.

The identity for covariance follows by expanding the centered product and applying linearity of expectation:

$$ \begin{aligned} \operatorname{Cov}(X,Y) &=E[(X-E[X])(Y-E[Y])]\\ &=E[XY-XE[Y]-YE[X]+E[X]E[Y]]\\ &=E[XY]-E[X]E[Y]-E[Y]E[X]+E[X]E[Y]\\ &=E[XY]-E[X]E[Y]. \end{aligned} $$

Here \(E[X]\) and \(E[Y]\) are constants, which is why they can be taken outside expectations in the expansion. This identity is often computationally convenient, but it also exposes a frequent error: \(E[XY]\) alone is not covariance. The product of the means must be subtracted.

Worked Example: Calculating Both Measures from Unequal Loss Outcomes

A hypothetical insurer models two one-year losses in dollars. The joint outcomes are \((X,Y)=(0,0)\) with probability \(0.50\), \((40,20)\) with probability \(0.25\), and \((20,60)\) with probability \(0.25\). Find the covariance and Pearson correlation. The method is to calculate each required moment from the joint probabilities, then standardize the covariance.

Step 1: Check the probabilities and calculate the means. The probabilities sum to \(0.50+0.25+0.25=1.00\). Thus \(E[X]=0.50(0)+0.25(40)+0.25(20)=0+10+5=15\) dollars, while \(E[Y]=0.50(0)+0.25(20)+0.25(60)=0+5+15=20\) dollars.

Step 2: Calculate the product expectation and covariance. \(E[XY]=0.50(0\cdot0)+0.25(40\cdot20)+0.25(20\cdot60)=0+200+300=500\) dollars squared. Therefore, \(\operatorname{Cov}(X,Y)=500-(15)(20)=500-300=200\) dollars squared.

Step 3: Calculate the variances. \(E[X^2]=0.50(0^2)+0.25(40^2)+0.25(20^2)=0+400+100=500\) dollars squared, so \(\operatorname{Var}(X)=500-15^2=500-225=275\) dollars squared. Similarly, \(E[Y^2]=0.50(0^2)+0.25(20^2)+0.25(60^2)=0+100+900=1{,}000\) dollars squared, so \(\operatorname{Var}(Y)=1{,}000-20^2=1{,}000-400=600\) dollars squared.

Step 4: Standardize and check. The standard deviations are \(\sqrt{275}\) and \(\sqrt{600}\), so \(\rho_{X,Y}=200/(\sqrt{275}\sqrt{600})=200/\sqrt{165{,}000}\approx0.4924\), rounded to four decimal places. The positive covariance and correlation agree with a tendency for larger losses to occur together in this model. The result is within the required range \([-1,1]\). The common mistake is to report \(E[XY]=500\) as covariance; the correction is to subtract \(E[X]E[Y]=300\), giving \(200\).

Units, Sign, and Range

If \(X\) and \(Y\) are both measured in dollars, covariance is measured in dollars squared. If they use different units, covariance has the product of those units. This makes its magnitude difficult to interpret in isolation: a value such as \(200\) dollars squared depends on the scales of both losses. Correlation removes those scales by dividing by the product of the standard deviations, so it has no units.

A positive covariance means that deviations from the two means tend, in expectation, to have the same sign: above-average values of one tend to accompany above-average values of the other, and below-average values tend to accompany below-average values. A negative covariance means opposite-signed deviations tend to contribute more heavily. Covariance equal to zero means the expected centered product is zero; it does not generally establish independence.

Pearson correlation is the covariance of the variables after each is centered and divided by its standard deviation. Its sign indicates the direction of linear co-movement, and its magnitude describes the strength of that standardized linear association. Correlation is not a probability, does not establish causation, and does not summarize every possible pattern in a joint distribution. In particular, it should not be read as a direct measure of how often both losses exceed particular thresholds.

Theorem: If both variables have finite, positive variances, then \(-1\leq\rho_{X,Y}\leq1\). Correlation is undefined if either variance is zero, because its denominator is then zero. A constant loss variable has no variation to standardize.

The range follows from the Cauchy–Schwarz inequality applied to the centered variables \(X-E[X]\) and \(Y-E[Y]\):

$$ \begin{aligned} |\operatorname{Cov}(X,Y)| &=\left|E[(X-E[X])(Y-E[Y])]\right|\\ &\leq \sqrt{E[(X-E[X])^2]E[(Y-E[Y])^2]}\\ &=\sqrt{\operatorname{Var}(X)\operatorname{Var}(Y)}. \end{aligned} $$

Dividing both sides by the positive product of standard deviations gives \(|\rho_{X,Y}|\leq1\). Equality requires an exact linear relationship between the centered variables, apart from probability-zero outcomes. This bound is a useful arithmetic check, not a claim that every value in the interval has the same practical meaning.

Worked Example: Negative Correlation from Equally Weighted Pairs

A hypothetical portfolio model gives four equally likely paired losses, in dollars: \((0,30)\), \((0,20)\), \((40,20)\), and \((40,10)\). Calculate covariance and correlation. Treat each listed pair as having probability \(1/4\), and use the moment definitions rather than a sample-correlation convention.

Step 1: Calculate means. \(E[X]=(0+0+40+40)/4=80/4=20\) dollars, and \(E[Y]=(30+20+20+10)/4=80/4=20\) dollars.

Step 2: Calculate the covariance. The four products \(x_jy_j\) are \(0,0,800,400\). Hence \(E[XY]=(0+0+800+400)/4=300\) dollars squared, and \(\operatorname{Cov}(X,Y)=300-(20)(20)=-100\) dollars squared.

Step 3: Calculate the marginal variances. \(E[X^2]=(0+0+1{,}600+1{,}600)/4=800\), so \(\operatorname{Var}(X)=800-20^2=400\) dollars squared. Also, \(E[Y^2]=(900+400+400+100)/4=1{,}800/4=450\), so \(\operatorname{Var}(Y)=450-20^2=50\) dollars squared.

Step 4: Calculate and check correlation. \(\rho_{X,Y}=-100/(\sqrt{400}\sqrt{50})=-100/(20\sqrt{50})\approx-0.7071\), rounded to four decimal places. Its negative sign matches the negative covariance. Its magnitude is below one, consistent with the range bound. The mistake to avoid is interpreting the negative value as a probability; it is a dimensionless measure of linear association, not a chance of a loss event.

Worked Example: Using a Joint Probability Table

For another hypothetical one-year model, two losses \(X\) and \(Y\) are in dollars. The joint outcomes are \((0,0)\) with probability \(0.40\), \((0,30)\) with probability \(0.10\), \((50,0)\) with probability \(0.10\), and \((50,30)\) with probability \(0.40\). Find the covariance and correlation. The four probabilities sum to \(1.00\), so they define a valid discrete distribution.

Step 1: Find the means. \(X=50\) in outcomes with total probability \(0.10+0.40=0.50\), so \(E[X]=0.50(50)=25\) dollars. Similarly, \(Y=30\) with probability \(0.10+0.40=0.50\), so \(E[Y]=0.50(30)=15\) dollars.

Step 2: Find the covariance. Only the \((50,30)\) outcome contributes a nonzero product, giving \(E[XY]=0.40(50\cdot30)=600\) dollars squared. Therefore, \(\operatorname{Cov}(X,Y)=600-(25)(15)=600-375=225\) dollars squared.

Step 3: Find the variances. \(E[X^2]=0.50(50^2)=1{,}250\), so \(\operatorname{Var}(X)=1{,}250-25^2=1{,}250-625=625\). Also, \(E[Y^2]=0.50(30^2)=450\), so \(\operatorname{Var}(Y)=450-15^2=450-225=225\). Both variances are in dollars squared.

Step 4: Standardize and verify. The standard deviations are \(25\) and \(15\) dollars. Thus \(\rho_{X,Y}=225/(25\cdot15)=225/375=0.6000\), to four decimal places. The result lies within \([-1,1]\), and its positive sign is consistent with the covariance. A common error is to calculate only the product \(E[X]E[Y]=375\) and call it covariance; that is the term to subtract from \(E[XY]=600\), not the answer itself.

Practical Interpretation and Exam Traps

For a specified joint model, covariance and correlation compress information about paired outcomes into a single number each. They can help compare models or provide inputs to aggregate-risk calculations, but the model’s assumptions and the loss units must remain visible when interpreting the results. A correlation of \(0.6\), for example, is not a statement that 60 percent of outcomes have both losses above their means.

  • Do not omit the centering term. Covariance is \(E[XY]-E[X]E[Y]\), not \(E[XY]\).
  • Do not confuse units. Covariance is in product units; correlation has no units.
  • Check for zero variance. If either loss is constant, correlation is undefined rather than zero.
  • Check signs and bounds. Correlation must lie between \(-1\) and \(1\), and its sign must match covariance when both standard deviations are positive.
  • Keep the model interpretation narrow. A correlation summarizes linear co-movement, not every aspect of dependence or tail behavior.

When the given pairs are observed data rather than outcomes and probabilities from a specified model, the distinction between a distributional quantity and a sample estimate matters. Here, equal weighting was explicitly treated as a discrete probability distribution. The sample-correlation calculation and its sampling interpretation are separate matters.

Key takeaway: Calculate both marginal means, calculate \(E[XY]\), subtract the product of the means to obtain covariance, and divide by both standard deviations to obtain Pearson correlation. State covariance units, interpret the correlation’s sign and scale cautiously, and verify that the correlation is defined and within its theoretical range.

Check Your Understanding

For each hypothetical paired-loss model, calculate the requested quantities from the stated probabilities. Answers are given for checking.

  1. A model has equally likely outcomes \((X,Y)=(0,10)\) and \((20,30)\), with losses in dollars. Find covariance and correlation. (Answer: covariance \(=100\) dollars squared; correlation \(=1.0000\).)
  2. A model assigns probability \(1/3\) to each pair \((0,30)\), \((30,0)\), and \((30,30)\). Find covariance and correlation. (Answer: covariance \(=-100\) dollars squared; correlation \(=-0.5000\).)
  3. A model assigns probabilities \(0.50,0.25,0.25\) to \((0,0),(20,20),(60,60)\), respectively. Find both means, covariance, and correlation. (Answer: \(E[X]=E[Y]=20\) dollars; covariance \(=600\) dollars squared; correlation \(=1.0000\).)
  4. A model assigns probabilities \(0.20,0.30,0.50\) to \((0,0),(10,20),(30,10)\), respectively. Find both means, both variances, covariance, and correlation. (Answer: \(E[X]=18\), \(E[Y]=11\); \(\operatorname{Var}(X)=156\), \(\operatorname{Var}(Y)=49\); covariance \(=12\), all moments in the corresponding dollar or dollar-squared units; correlation \(=0.1373\).)
Clinical Biostats