- #1
rwinston
- 36
- 0
I am going through some of the problems in a statistical physics book. I am stuck on the following question:
If we have two random variables X and Y, related by Y=mX + b => y(i) = mx(i) + b, where b and m are deterministic, prove that corr(X,Y) = m/sqrt(m^2) = sgn(m), where sgn(m) is the sign function of m.
I can see that this is perfect linear correlation, but I am not sure as to what is the obvious proof...I know that corr(X,Y) = (E(XY) - E(X)E(Y))/sd(X)*sd(Y)...
Is the following derivation even logically valid?
E(XY)-E(X)E(Y)
= E(X(mX+b)) - E(X)E(mX+b)
=E(mX^2 + bX)-E(X)E(mX+b)
=mE(X^2)+bE(X)-mE(X)E(X)+b
=m(E(X^2)-E(X)E(X))+bE(X)+b
=m(Var(X))+bE(X) +b
Thanks!
If we have two random variables X and Y, related by Y=mX + b => y(i) = mx(i) + b, where b and m are deterministic, prove that corr(X,Y) = m/sqrt(m^2) = sgn(m), where sgn(m) is the sign function of m.
I can see that this is perfect linear correlation, but I am not sure as to what is the obvious proof...I know that corr(X,Y) = (E(XY) - E(X)E(Y))/sd(X)*sd(Y)...
Is the following derivation even logically valid?
E(XY)-E(X)E(Y)
= E(X(mX+b)) - E(X)E(mX+b)
=E(mX^2 + bX)-E(X)E(mX+b)
=mE(X^2)+bE(X)-mE(X)E(X)+b
=m(E(X^2)-E(X)E(X))+bE(X)+b
=m(Var(X))+bE(X) +b
Thanks!