Why Shifts and Scales Matter
Covariance is often calculated for measurements that are not recorded in their original units. A loss amount might be expressed in thousands of dollars rather than dollars, or a score might be shifted by subtracting a benchmark. These changes affect the numerical value of covariance in systematic ways. Knowing those rules lets you transform a covariance without returning to a joint probability table or density.
The central points are simple, but easy to misapply: adding a fixed constant to either variable has no effect on covariance, while multiplying either variable by a constant multiplies covariance by that constant. If a transformed variable contains more than one random variable, however, every random-variable term must be included. In particular, a covariance involving the same variable twice is its variance.
The covariance transformation rules below apply to discrete, continuous, and mixed distributions whenever the required moments exist. They do not require independence. The earlier material on covariance from joint distributions gives ways to calculate the original covariance; this tutorial focuses on how that covariance changes under shifts and scales.
The Affine Transformation Rule
Let \(a,b,c,d\) be fixed constants, and define \(U=aX+b\) and \(V=cY+d\). Then
The constants \(b\) and \(d\) do not appear in the result. The factors \(a\) and \(c\) do appear: each variable's scale factor contributes once. If either scale factor is zero, the corresponding transformed variable is constant and the covariance is zero. If a scale factor is negative, it reverses the direction of the covariance's sign; two negative factors reverse it twice.
Since \(E[aX+b]=aE[X]+b\), subtracting the mean gives \(U-E[U]=a(X-E[X])\). Similarly, \(V-E[V]=c(Y-E[Y])\).
Their product is \(ac(X-E[X])(Y-E[Y])\).
The constants \(a\) and \(c\) factor out of expectation, leaving \(ac\operatorname{Cov}(X,Y)\).
This derivation explains why shifts disappear: centering removes each fixed shift exactly. It also explains why the scale factors multiply covariance rather than adding to it: covariance is an expected product of two centered quantities.
| Transformation | Result | Effect |
|---|---|---|
| \(\operatorname{Cov}(X+b,Y)\) | \(\operatorname{Cov}(X,Y)\) | Shifting the first variable has no effect |
| \(\operatorname{Cov}(X,Y+d)\) | \(\operatorname{Cov}(X,Y)\) | Shifting the second variable has no effect |
| \(\operatorname{Cov}(aX,Y)\) | \(a\operatorname{Cov}(X,Y)\) | Scaling the first variable scales covariance |
| \(\operatorname{Cov}(X,cY)\) | \(c\operatorname{Cov}(X,Y)\) | Scaling the second variable scales covariance |
| \(\operatorname{Cov}(aX,bY)\) | \(ab\operatorname{Cov}(X,Y)\) | Both scale factors contribute |
Worked Example: Shifting and Scaling Two Measurements
In a hypothetical risk-monitoring model, \(X\) and \(Y\) are two measurements with finite second moments, and \(\operatorname{Cov}(X,Y)=-2.5\). No distributional family is assumed. Define \(U=3X+2\) and \(V=-4Y+7\). Find \(\operatorname{Cov}(U,V)\), and verify that the result is consistent with the given means if \(E[X]=12\) and \(E[Y]=5\).
Method. Apply the affine transformation rule. The scale factors are \(3\) and \(-4\); the shifts \(2\) and \(7\) do not affect covariance:
For a check using the expectation shortcut, first calculate \(E[XY]\):
The transformed means are \(E[U]=3(12)+2=38\) and \(E[V]=-4(5)+7=-13\). Expanding the product gives
Therefore, \(\operatorname{Cov}(U,V)=E[UV]-E[U]E[V]=-464-(38)(-13)=-464+494=30\), as required. The negative scale factor reverses the original negative covariance, and the additional positive scale factor changes its magnitude. The shifts do neither.
When Both Transformed Variables Contain the Same Random Variable
The affine rule applies directly when one transformed variable is a function of \(X\) alone and the other is a function of \(Y\) alone. A related calculation is needed when a transformed variable contains more than one random variable. Covariance is linear in each argument, so each term must be paired with every term in the other argument. The identity \(\operatorname{Cov}(X,X)=\operatorname{Var}(X)\) is especially important in these expansions.
To see the expansion, constants contribute zero, while the random terms give
Thus, the covariance with \(Y\) alone is not enough if the second transformed variable also contains \(X\). The variance term must be known as well.
Worked Example: A Shared Variable Requires Its Variance
Suppose \(X\) and \(Y\) have finite second moments, \(\operatorname{Cov}(X,Y)=4\), and \(\operatorname{Var}(X)=6\). Their joint distribution is otherwise unspecified. Let \(R=3X+2\) and \(S=Y-2X+9\). Calculate \(\operatorname{Cov}(R,S)\).
Method. Expand using linearity in both arguments. The constant shifts contribute zero:
The result is \(-24\). The term \(-6\operatorname{Var}(X)\) is essential because \(X\) occurs in both \(R\) and \(S\). The common mistake is to calculate only \(3\operatorname{Cov}(X,Y)=12\), as if \(S\) were just \(Y\) plus a constant. That omits the \(-2X\) term. If \(\operatorname{Var}(X)\) had not been supplied, the requested covariance could not be determined from \(\operatorname{Cov}(X,Y)\) alone.
Expanding More General Transformed Variables
The same approach handles two transformed variables that each contain both \(X\) and \(Y\). For constants \(a,b,c,d\) and shifts \(e,f\), write \(U=aX+bY+e\) and \(V=cX+dY+f\). By expanding term by term,
This is a covariance calculation, not a variance calculation: \(U\) and \(V\) need not be the same variable. The formula follows because the four random-variable pairings are \(ac\operatorname{Cov}(X,X)\), \(ad\operatorname{Cov}(X,Y)\), \(bc\operatorname{Cov}(Y,X)\), and \(bd\operatorname{Cov}(Y,Y)\). Since \(\operatorname{Cov}(Y,X)=\operatorname{Cov}(X,Y)\), the two cross terms combine.
Worked Example: Covariance of Two Linear Transformations
For a hypothetical pair of portfolio indicators \(X\) and \(Y\), assume finite second moments and the known values \(\operatorname{Var}(X)=5\), \(\operatorname{Var}(Y)=9\), and \(\operatorname{Cov}(X,Y)=-2\). No distributional family is specified or needed. Define \(U=2X-Y+6\) and \(V=-X+3Y-1\). Find \(\operatorname{Cov}(U,V)\).
Method. The coefficients of \(X,Y\) in \(U\) are \(2,-1\), and those in \(V\) are \(-1,3\). First expand by pairings:
As a check with the combined-coefficient formula,
Both expansions give \(-51\). This check confirms that the shifts \(6\) and \(-1\) have no effect, while both variances and the covariance are needed for the shared-variable terms.
Common Exam Traps and Practical Checks
These rules are aligned with the SOA VEE Mathematical Statistics syllabus. In a calculation, make the transformations explicit before substituting numbers. That helps distinguish a shift, which disappears after centering, from a scale factor, which remains. It also prevents an omitted term when the same underlying variable appears in both transformed quantities.
- Keeping a shift in the result. A term such as \(+7\) changes a mean but contributes nothing to covariance.
- Using only one scale factor. For \(\operatorname{Cov}(aX,cY)\), the multiplier is \(ac\), not just \(a\) or just \(c\).
- Losing a negative sign. If exactly one scale factor is negative, the covariance changes sign. If both are negative, the two sign reversals cancel.
- Ignoring a shared-variable term. If a variable appears in both arguments, its pairing with itself contributes its variance. Covariance with a different variable does not supply that variance.
- Assuming a numerical answer from incomplete information. When the expansion includes \(\operatorname{Var}(X)\), that variance must be known or derivable from additional stated information.
A useful final check is dimensional: covariance has the product of the units of its two variables. Changing the units of one variable by a factor \(a\) therefore changes covariance by that same factor; changing both units introduces both factors. This check does not determine the sign, so signs must still be tracked algebraically.
Check Your Understanding
For each problem, assume all stated variables have finite second moments. No distributional family is needed unless the problem specifies otherwise.
- If \(\operatorname{Cov}(X,Y)=-6\), find \(\operatorname{Cov}(2X+1,5Y-4)\). (Answer: \(-60\))
- Given \(\operatorname{Cov}(X,Y)=3\) and \(\operatorname{Var}(X)=4\), let \(R=2X+5\) and \(S=Y-3X+1\). Find \(\operatorname{Cov}(R,S)\). (Answer: \(-18\))
- Suppose \(\operatorname{Var}(X)=7\), \(\operatorname{Var}(Y)=2\), and \(\operatorname{Cov}(X,Y)=-1\). For \(U=-2X+3\) and \(V=4Y-5X+9\), calculate \(\operatorname{Cov}(U,V)\). (Answer: \(78\))
- Suppose \(\operatorname{Var}(X)=3\), \(\operatorname{Cov}(X,Y)=2\), and \(\operatorname{Cov}(X,Z)=-1\), \(\operatorname{Cov}(Y,Z)=4\). Find \(\operatorname{Cov}(X+2Y,3X-Z)\). (Answer: \(14\))
- If \(\operatorname{Cov}(X,Y)=-1.25\), calculate \(\operatorname{Cov}(7-X,2Y+3)\). State which shift and scale factors determine the result. (Answer: \(2.5\); the shifts have no effect, and the scale factors \(-1\) and \(2\) multiply the original covariance.)