Tutorials › CAS Exam 9 - Risk Management for Actuaries › Affine Transformations of Correlation

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

Affine Transformations of Correlation

Learn when affine changes leave correlation unchanged, when they reverse its sign, and how to calculate the transformed covariance and variances.

Advanced 10 min read

What You'll Learn

  • Derive the covariance formula for affine transformations of two random variables
  • Determine how the signs of the scale factors affect Pearson correlation
  • Distinguish changes of units from reversed loss or profit conventions
  • Calculate transformed covariance, variances, and correlation from a joint distribution
  • Identify when Pearson correlation is undefined after a transformation
  • Avoid common errors involving shifts, negative scale factors, and zero variance

Why Affine Transformations Matter

Risk data can be reported in different units or under different sign conventions. A loss might be expressed in dollars or thousands of dollars; a financial measure might be reported as a loss or as the corresponding gain. These changes can alter the numerical values, means, and covariance of the reported variables. Knowing what happens to correlation helps distinguish a genuine change in dependence from a change in representation.

An affine transformation of a random variable has the form \(aX+b\), where \(a\) is a scale factor and \(b\) is a constant shift. For two variables, the key questions are whether either scale factor is negative and whether either transformed variable has zero variance. The answers determine whether the correlation keeps its sign, reverses its sign, or is undefined.

Definition: Let \(X\) and \(Y\) be random variables with finite, positive variances. Their Pearson correlation is \(\operatorname{Corr}(X,Y)=\operatorname{Cov}(X,Y)/(\sqrt{\operatorname{Var}(X)}\sqrt{\operatorname{Var}(Y)})\). An affine transformation replaces \(X\) by \(aX+b\), or \(Y\) by \(cY+d\), for constants \(a,b,c,d\). Pearson correlation is defined only when both transformed variables have positive variance.

The Transformation Rules

Suppose \(X\) and \(Y\) have finite second moments and positive variances, and let \(X'=aX+b\) and \(Y'=cY+d\). The shifts affect the means but not the variation around those means. The scale factors multiply deviations from the means, so their signs determine whether those deviations point in the same or opposite directions.

Theorem: For \(X'=aX+b\) and \(Y'=cY+d\), \(\operatorname{Cov}(X',Y')=ac\operatorname{Cov}(X,Y)\), \(\operatorname{Var}(X')=a^2\operatorname{Var}(X)\), and \(\operatorname{Var}(Y')=c^2\operatorname{Var}(Y)\). If \(a\ne 0\) and \(c\ne 0\), then \(\operatorname{Corr}(X',Y')=\operatorname{sgn}(ac)\operatorname{Corr}(X,Y)\). Thus correlation is unchanged if the two scale factors have the same sign and reverses sign if they have opposite signs. The shifts \(b\) and \(d\) do not affect covariance or correlation.

If \(a=0\), then \(X'=b\) is constant and has zero variance; the correlation of \(X'\) with \(Y'\) is undefined. The same applies if \(c=0\). This is not a correlation of zero: the correlation formula has a zero standard deviation in its denominator.

Why the Rules Hold

The covariance measures the expected product of deviations from the means. This centred form makes the effects of shifts and scale factors explicit.

$$ E[X']=aE[X]+b,\qquad E[Y']=cE[Y]+d $$

Subtracting these means from the transformed variables gives \(X'-E[X']=a(X-E[X])\) and \(Y'-E[Y']=c(Y-E[Y])\). Taking the expected product of the centred variables therefore gives the covariance rule:

$$ \begin{aligned} \operatorname{Cov}(X',Y') &=E[(X'-E[X'])(Y'-E[Y'])]\\ &=E[ac(X-E[X])(Y-E[Y])]\\ &=ac\operatorname{Cov}(X,Y). \end{aligned} $$

Using the same centred-variable definition for variance gives \(\operatorname{Var}(X')=a^2\operatorname{Var}(X)\) and \(\operatorname{Var}(Y')=c^2\operatorname{Var}(Y)\). When both scale factors are nonzero, the transformed standard deviations are \(|a|\sqrt{\operatorname{Var}(X)}\) and \(|c|\sqrt{\operatorname{Var}(Y)}\). Dividing covariance by their product yields \(\operatorname{Corr}(X',Y')=(ac/|ac|)\operatorname{Corr}(X,Y)\), which is the stated sign rule.

Worked Examples

Worked Example: Converting Two Loss Measures to Dollars

A hypothetical insurer records two paired loss measures \(X\) and \(Y\), each in thousands of dollars. The four equally likely scenarios have \((X,Y)\) values \((10,20)\), \((20,40)\), \((30,30)\), and \((40,50)\). Convert both measures to dollars, adding a fixed \$2,500 reporting adjustment to \(X\) and a fixed \$4,000 adjustment to \(Y\). Find the covariance and correlation after conversion. Use this four-point discrete joint distribution, with probability \(1/4\) for each scenario.

Method. First calculate the original means, variances, and covariance. Then apply the affine transformation rules; this avoids recalculating all four transformed deviations and makes clear which quantities change.

The means in thousands are \(E[X]=(10+20+30+40)/4=25\) and \(E[Y]=(20+40+30+50)/4=35\). The deviations are \((-15,-5,5,15)\) for \(X\) and \((-15,5,-5,15)\) for \(Y\). Thus \(\operatorname{Var}(X)=(225+25+25+225)/4=125\) and \(\operatorname{Var}(Y)=(225+25+25+225)/4=125\), in squared thousands of dollars.

The four products of paired deviations are \(225,-25,-25,225\), so \(\operatorname{Cov}(X,Y)=(225-25-25+225)/4=100\), also in squared thousands of dollars. Therefore the original correlation is \(100/(\sqrt{125}\sqrt{125})=100/125=0.8\).

The dollar-valued transformed variables are \(X'=1000X+2500\) and \(Y'=1000Y+4000\). The shifts do not affect covariance or variance. The two positive scale factors multiply covariance by \(1000^2\), and each variance by \(1000^2\): \(\operatorname{Cov}(X',Y')=100(1000)(1000)=100{,}000{,}000\) dollars squared, and \(\operatorname{Var}(X')=\operatorname{Var}(Y')=125(1000^2)=125{,}000{,}000\) dollars squared.

It follows that \(\operatorname{Corr}(X',Y')=100{,}000{,}000/125{,}000{,}000=0.8\). Check: both transformations use positive scale factors, so the correlation must retain its original positive sign and magnitude. The computed result agrees.

Common mistake avoided: Adding the reporting adjustments to the covariance or correlation. Constant shifts change the means, but they cancel when deviations from the means are calculated.

Worked Example: Reversing One Loss Convention

In a hypothetical portfolio, paired loss measures \(X\) and \(Y\), in thousands of dollars, have a four-scenario discrete joint distribution. Each scenario has probability \(1/4\), with values \((0,1)\), \((1,0)\), \((2,3)\), and \((3,2)\). A reporting system replaces \(X\) with a margin measure \(M=120-2X\), while it reports \(Y\) as \(R=5Y+10\). Find the correlation of \(M\) and \(R\).

Method. Calculate the original correlation from the four equally likely outcomes, then use the signs of the two scale factors. The constant offsets do not determine the correlation sign.

The means are \(E[X]=(0+1+2+3)/4=1.5\) and \(E[Y]=(1+0+3+2)/4=1.5\). Their deviations, in scenario order, are \((-1.5,-0.5,0.5,1.5)\) and \((-0.5,-1.5,1.5,0.5)\). Each variance is \((2.25+0.25+0.25+2.25)/4=1.25\).

The paired deviation products are \(0.75,0.75,0.75,0.75\), giving \(\operatorname{Cov}(X,Y)=0.75\). Hence \(\operatorname{Corr}(X,Y)=0.75/1.25=0.6\).

For the transformed variables, \(a=-2\) and \(c=5\), so \(ac=-10\). The shifts 120 and 10 do not affect the covariance. Therefore \(\operatorname{Cov}(M,R)=(-10)(0.75)=-7.5\). The variances are \(\operatorname{Var}(M)=(-2)^2(1.25)=5\) and \(\operatorname{Var}(R)=5^2(1.25)=31.25\).

Thus \(\operatorname{Corr}(M,R)=-7.5/(\sqrt{5}\sqrt{31.25})=-7.5/12.5=-0.6\). Check: exactly one scale factor is negative, so the correlation should reverse sign without changing magnitude. The result is consistent.

Common mistake avoided: Treating \(M=120-2X\) as a simple shift. It includes a negative scale factor, which reverses the direction of \(X\)'s deviations and therefore reverses the correlation sign with \(R\).

Worked Example: Reversing Both Variables

A hypothetical four-scenario model assigns probability \(1/4\) to each paired outcome \((X,Y)\), in thousands of dollars: \((28,13.8)\), \((28,26.6)\), \((52,23.4)\), and \((52,36.2)\). Define two new reporting measures \(U=0.8X-6\) and \(V=200-1.5Y\). Find the transformed means, covariance, variances, and correlation. All probabilities and values are part of this discrete joint distribution.

Method. Establish the original moments from the scenario distribution, then transform each moment using the affine rules. This separates the effect of the negative scale factor from the effect of the offsets.

The means are \(E[X]=(28+28+52+52)/4=40\) and \(E[Y]=(13.8+26.6+23.4+36.2)/4=25\). The deviations for \(X\) are \((-12,-12,12,12)\), and those for \(Y\) are \((-11.2,1.6,-1.6,11.2)\). The variances are \(\operatorname{Var}(X)=(144+144+144+144)/4=144\) and \(\operatorname{Var}(Y)=(125.44+2.56+2.56+125.44)/4=64\).

The products of the paired deviations are \(134.4,-19.2,-19.2,134.4\). Their mean is \(57.6\), so \(\operatorname{Cov}(X,Y)=57.6\) and the original correlation is \(57.6/(\sqrt{144}\sqrt{64})=57.6/(12\cdot8)=0.6\).

The transformed means are \(E[U]=0.8(40)-6=26\) and \(E[V]=200-1.5(25)=162.5\). The scale factors are \(a=0.8\) and \(c=-1.5\), so \(\operatorname{Cov}(U,V)=(0.8)(-1.5)(57.6)=-69.12\). The transformed variances are \(\operatorname{Var}(U)=0.8^2(144)=92.16\) and \(\operatorname{Var}(V)=(-1.5)^2(64)=144\).

The standard deviations are \(\sqrt{92.16}=9.6\) and \(\sqrt{144}=12\). Therefore \(\operatorname{Corr}(U,V)=-69.12/(9.6\cdot12)=-69.12/115.2=-0.6\). Check: exactly one factor is negative, so correlation reverses sign; the positive offsets do not affect it. The transformed correlation has the expected sign and magnitude.

Common mistake avoided: Assuming two transformations both described as “rescaling” must preserve correlation. Here one scale factor is positive and the other is negative, so their product is negative.

Practical Interpretation and Exam Traps

Affine transformations often represent changes in units, accounting conventions, or the direction in which a quantity is reported. A conversion from dollars to thousands of dollars has a positive scale factor and preserves correlation. Re-expressing a loss as its negative, or defining a surplus measure that decreases as losses increase, introduces a negative scale factor and can reverse correlation. Whether a constant is added or subtracted does not change that conclusion.

A useful check is to separate the three questions: what happens to covariance, what happens to each variance, and what happens to correlation? Covariance is multiplied by \(ac\); variances are multiplied by the squared scale factors; correlation changes only by the sign of \(ac\), provided both factors are nonzero. This distinction matters because covariance changes with units, whereas correlation is unchanged by nonzero changes of units with positive scale factors.

  • Ignoring a negative scale factor. A minus sign reverses the ordering of a variable's deviations from its mean. Track the sign of each scale factor, not just its magnitude.
  • Changing the correlation for a shift. Adding a fixed amount changes the mean but not the centred values, so it does not change covariance or correlation.
  • Confusing zero correlation with undefined correlation. If a scale factor is zero, the transformed variable is constant. Its variance is zero, and its Pearson correlation is undefined.
  • Applying the rule to nonlinear changes. The stated result is for affine transformations. It does not assert that a nonlinear transformation preserves Pearson correlation.
Key takeaway: For nonconstant affine transformations \(X'=aX+b\) and \(Y'=cY+d\), shifts have no effect on Pearson correlation, and the sign of the correlation is multiplied by the sign of \(ac\). Positive unit conversions preserve correlation; reversing exactly one variable's direction reverses it.

Check Your Understanding

For each problem, identify the scale factors before deciding how the correlation or covariance changes.

  1. Two hypothetical loss measures have correlation \(0.35\). They are reported as \(X'=4X+8\) and \(Y'=2Y-3\). Find the new correlation. (Answer: \(0.35\))
  2. Two nonconstant variables have correlation \(-0.4\). A reporting change gives \(X'=-3X+2\) and \(Y'=5Y+1\). Find the transformed correlation and explain the sign. (Answer: \(0.4\); exactly one scale factor is negative.)
  3. For variables with standard deviations 3 and 4 and covariance 6, define \(X'=2X-7\) and \(Y'=-0.5Y+4\). Find the original and transformed correlations. (Answer: Original \(0.5\); transformed \(-0.5\).)
  4. Two hypothetical loss variables have correlation \(0.25\). A convention change reports both as the negatives of their original values, with fixed constants also added to each. Find the new correlation. (Answer: \(0.25\); both scale factors are negative, so their product is positive.)
  5. Two variables have variances 9 and 16 and covariance \(-3\). Let \(X'=3X+4\) and \(Y'=-2Y+1\). Find the transformed covariance, transformed variances, and transformed correlation. (Answer: Covariance \(18\); variances \(81\) and \(64\); correlation \(0.25\).)
Clinical Biostats