To my understanding multiplying all x (or all y) values in a constant will not change |r|.

I'm looking for formal proof.

  • $\begingroup$ It depends on how you define $r$. (In my definition, which is a common and well-known one, $|r|$ is automatically invariant under affine transformations. It is defined in terms of the standardized values of $x$ and $y$: it is the average of their products.) What is your definition? $\endgroup$
    – whuber
    Sep 23, 2015 at 16:58
  • $\begingroup$ I'm talking about Pearson's r $\endgroup$
    – lior_
    Sep 23, 2015 at 17:16
  • $\begingroup$ So am I. Exactly what is your definition of it? $\endgroup$
    – whuber
    Sep 23, 2015 at 17:55
  • $\begingroup$ I don't think that there's more than 1 definition to Pearson's r. There's a formula, right? $\endgroup$
    – lior_
    Sep 23, 2015 at 18:24
  • 1
    $\begingroup$ Sure there's more than one! The one I am quoting is from a popular elementary statistics book (Freedman, Pisani, and Purves, Statistics, any edition). Their definition is "Convert each variable to standard units. The average of the products gives the correlation coefficient." It is mathematically equivalent to any other formula for the correlation coefficient. One advantage it has is that it shows immediately that the correlation is unchanged by any transformation of the variables that does not change their standardized values. This includes positive rescaling as well as shifting. $\endgroup$
    – whuber
    Sep 23, 2015 at 18:40

1 Answer 1


You can prove it yourself by considering how the sample means and variances change under affine transformations. For instance if $X_i \mapsto aX_i +b$, then the new sample mean is just $a \bar{X}+b$. Do the same for the sample variance now and put everything into the usual quotient for the (sample) product moment correlation coefficient:

$$r=\frac{\sum_{i=1}^n \left( X_i -\bar{X} \right) \left(Y_i -\bar{Y} \right)}{\sqrt{\sum_{i=1}^n \left(X_i-\bar{X} \right)^2 \sum_{i=1}^n \left( Y_i -\bar{Y} \right)^2}}$$

After you substitute the new variables along with their location and dispersion measures, what is the relation between the old variable coefficient and the new one? You will see that unless you consider the absolute magnitude, the direction is reversed for multiples of different sign. A similar argument would work for the population correlation coefficient.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.