Slide It, Stretch It, and the Correlation Does Not Move
A shift leaves every deviation from the mean untouched, and a stretch multiplies the covariance and one standard deviation by the same factor, so both cancel out of the ratio. The tempting answer of five times rho is worse than wrong: at rho = 0.40 it names 2.0, which Cauchy-Schwarz forbids any correlation from reaching. The article carries the general affine rule, the sign flip a negative factor produces, and the curved maps the invariance does not survive.
Two variables have correlation . Add five to the first one. Then, instead, multiply the first one by five. What happens to the correlation each time?
Nothing, twice. Both operations leave it at exactly, and the second answer is the one people get wrong: is the popular reply. It is not merely incorrect. For most values of it names a number no correlation can be.
The definition is a ratio, and that is the whole proof
, defined whenever both standard deviations are strictly positive. Everything below is a statement about what happens to the numerator and the denominator of that fraction, separately.
Both parts of the ratio are built out of deviations from the mean, and that is the only fact needed. Add a constant to and the mean moves by the same constant, so every deviation is untouched:
The covariance is an average of products of deviations, so it does not move. Neither standard deviation moves. The fraction is the same fraction. A shift is invisible to a correlation, and this is why: the quantity was never looking at where the cloud sits, only at how it is shaped.
Stretching multiplies both sides of the fraction
Scaling is the interesting case, because something really does change. Multiply by 5 and the deviations multiply by 5, so:
The numerator grew by a factor of five and the denominator grew by exactly the same factor of five. Writing for the covariance and for the product of the two standard deviations, the entire content of the result is:
Stating it that way is deliberate. The mechanism is a cancellation, and the cancellation has nothing to do with the number five or with the particular value of . Anyone who answers has scaled the top of the fraction and forgotten the bottom.
Why the wrong answer is worse than wrong
Take , which is the figure in the picture above. The tempting answer is . A correlation cannot be 2.0. It cannot exceed 1 for any pair of variables whatsoever, because the Cauchy-Schwarz inequality applied to the two centred variables gives:
So no multiplicative rule of the form can exist for any , because it would break the ceiling as soon as . This is a stronger objection than pointing at the correct answer, and it is available before any algebra: a proposed rule that can leave the range of the quantity it computes is dead on arrival.
The one factor that does change the answer
A negative multiplier is the exception, and it is the case the usual statement of this result forgets. The covariance takes the sign of the factor, since it is linear in each argument. The standard deviation takes its absolute value, since it comes out of a square root:
So the sign survives on top and not underneath, and flips. Putting all of it together gives the general rule for affine maps applied to each variable separately:
Magnitude untouched, sign given by whether the two stretches point the same way. On the cloud in Fig. 1, multiplying by takes the score to exactly and nowhere else.
What a correlation is not invariant under
Equation (6) is a complete description of the invariance, and reading it carefully tells you where it stops. The maps have to be affine, and they have to act on each variable on its own. A monotone but curved map is not covered, and it genuinely moves the number. Taking logarithms of the horizontal coordinate of the cloud in Fig. 1, after shifting it positive, moves the score from 0.4012 to 0.3944. Small here, and not small in general: correlation measures linear association, and a nonlinear change of variable changes what counts as linear.
If you want a coefficient that survives every increasing map, you have to give up on covariance and use the ranks instead, which is what Spearman's coefficient does. It is invariant under any strictly increasing transformation of either variable, and the price is that it no longer answers the question the covariance was answering.
One more thing equation (6) covers without comment: it holds for the sample coefficient computed from data as well as for the population one. The or in the sample covariance appears identically in both sample standard deviations, so it cancels along with everything else. That is why the check on the twenty-six points above returns a bit-identical number rather than a close one, and why an exact-arithmetic test is the right test for a claim of this kind.
Two degenerate cases are worth naming. If either variable is constant, its standard deviation is zero and the ratio in the definition is undefined, so there is no correlation to preserve. And multiplying by zero produces exactly that situation, which is the boundary case equation (6) excludes through being the wrong kind of answer: the correlation is not zero there, it does not exist.
Sources and further reading
- The coefficient itself, and its invariances — Pearson correlation coefficient
- The numerator, and its bilinearity — Covariance
- The inequality behind the ceiling of 1 — Cauchy-Schwarz inequality
- The rank-based alternative that survives curved maps — Spearman's rank correlation coefficient
Because this is an identity rather than a limit, the primary check was exact: a five-point dataset in rational arithmetic gives a bit-for-bit identical squared correlation under the shift, the positive stretch, both together, and a stretch of the other variable, with the sign tracked separately and negated under a factor of . A two-hundred-thousand-point sample at three target values agreed to within , which is the signature an exact invariance should leave, and a four-hundred-way sweep over five transformations never produced a value outside the band in Fig. 2.
Comments · 0
Be the first to comment.