If we normalize (scale and center) x and y, then the slope from y_norm ~ x_norm is equal to cor(x, y). Why?
Asked
Active
Viewed 823 times
0
Alireza
- 91
2 Answers
2
Because, by definition y_norm and x_norm are unit-variance random variables whose covariance is related to the covariance of $X$ and $Y$ by $$\operatorname{cov}\left(\frac{X-\mu_X}{\sigma_X},\frac{Y-\mu_Y}{\sigma_Y}\right) = \frac{\operatorname{cov}(X,Y)}{\sigma_X\sigma_Y}.$$
Now apply the definition of cor(x,y).
Dilip Sarwate
- 46,658
0
cor(x, y)=Cov(x,y)/Sd(x)sd(y) when you standardize.... your standard deviation of x and y will equal to 1 and therefore you will have 1 on your denominator and your cor(x,y) = cov(x,y)
RomRom
- 363
-
I understand this, but my whole question is why cov(x, y) is the same as slope of y ~ x. – Alireza Oct 28 '16 at 22:07
y_norm ~ x_normandx_norm ~ y_norm, and to my surprise, the slope were the same. – Alireza Oct 25 '16 at 05:13