Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose that we have two vectors $x=(x_1,\ldots,x_n),y=(y_1,\ldots,y_n)$ is the following correct about their Pearson correlation coefficient?

$\operatorname{corr}(x,y)=\operatorname{corr}(x+a,y+b)$ where $a$ and $b$ are non-zero real numbers.

share|cite|improve this question
See e.g. here. – Stefan Hansen Oct 8 '13 at 18:14
up vote 2 down vote accepted

Yes. This is because if $\mu_x$ is the mean of $x$, then $\mu_x^*=\mu_x+a$ is the mean of $x+a$. In the calculation of the correlation you subtract the mean. So if you define $x^*=x+a$ and $y^*=y+b$, then it can easily be seen:

$$ \begin{align} \frac{E[(x-\mu_x)(y-\mu_y)]}{\sigma_x\sigma_y}=\frac{E[((x+a)-(\mu_x+a))((y+b)-(\mu_y+b))]}{\sigma_x\sigma_y}=\frac{E[(x^*-\mu^*_x)(y^*-\mu^*_y)]}{\sigma_x\sigma_y} \end{align} $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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