1

I had thought a property of correlation is that it is invariant to scaling and offsets $\hat{y} = x\hat{\beta}_1 + \hat{\beta}_0$, so $\hat{y}$ is just a scaled and offset version of $x$.

So shouldn't $corr(y, \hat{y}) = corr(y, x)$? Where does the absolute value come from?

1 Answers1

2

Correlation is invariant to offsets and positive scaling. Negative scaling flips the sign.

If the correlation between $y$ and $x$ is negative, then $\hat\beta_1<0$, so $$\mathrm{corr}[x\hat\beta_1,y]=-\mathrm{corr}[x,y]=\left|\mathrm{corr}[x,y]\right|$$

Thomas Lumley
  • 38,062