invariance of correlation to linear transformation: corr(aX+b,cY+d)=corr(X,Y)corr(aX+b,cY+d)=corr(X,Y)

机器算法验证 self-study correlation linear-algebra mathematical-statistics
2022-03-09 18:26:48

This is actually one of the problems in Gujarati's Basic Econometrics 4th edition (Q3.11) and says that the correlation coefficient is invariant with respect to the change of origin and scale, that is

corr(aX+b,cY+d)=corr(X,Y)
where a,b,c,d are arbitrary constants.

But my main question is the following: Let X and Y be paired observations and suppose X and Y are positively correlated, i.e. corr(X,Y)>0. I know that corr(X,Y) would be negative based on intuition. However if we take a=1,b=0,c=1,d=0, it follows that

corr(X,Y)=corr(X,Y)>0
which does not make sense.

I would appreciate if someone can point out the gap. Thanks.

1个回答

Since

corr(X,Y)=cov(X,Y)var(X)1/2var(Y)1/2
and
cov(aX+b,cY+d)=accov(X,Y)
the equality
corr(aX+b,cY+d)=corr(X,Y)
only holds when a and c are both positive or both negative, i.e. ac>0.