I have two vectors (arrays) of values. One vector represents a variable whose values are between 0 and 1 (ratio-type variable). The other vector represents a variable whose values are continuous float numbers. So, I have the following questions:

1) To calculate the correlation coefficient between these two variables (either Pearson or Spearman) do I need to normalize (scale) them? 2) Which kind of normalization method is suitable/recommended for each of them? (mapping to 0-mean and 1 standard deviation, or mapping between 0 and 1, or L2 norm or what)?

  • 4
    $\begingroup$ Correlations of any kind automatically adjust for differing location and scale of variables, so any kind of linear scaling is unnecessary, but harmless. But if you are asking this then more study of standard text or internet sources to be clear on what correlations are seems indicated! $\endgroup$
    – Nick Cox
    Nov 24, 2014 at 13:34

1 Answer 1


The answer depends on what exactly you're interested in. If you're only interested in whether there is a monotonic relationship between the two variables, use Spearman's rank correlation coefficient. Moreover, as Nick Cox says in his comment, any kind of linear scaling is unnecessary.

  • 1
    $\begingroup$ The phrasing of your answer implies that some other correlation does require normalization. Was that the intent, or not? $\endgroup$
    – Glen_b
    Nov 25, 2014 at 7:35
  • $\begingroup$ It wasn't, thanks for pointing that out. I've rephrased it. $\endgroup$
    – John Manak
    Nov 25, 2014 at 8:28
  • 1
    $\begingroup$ My statement was informal but I had in mind that some linear rescalings reverse ranks and so can change the sign of correlations. That was why I chose the word "harmless" as presumably that should not be surprising to the user, but I didn't say "did not affect". $\endgroup$
    – Nick Cox
    Nov 25, 2014 at 10:18

Your Answer

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

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