Prove Linear Correlation: m/sqrt(m^2) = sgn(m)

  • Context: Graduate 
  • Thread starter Thread starter rwinston
  • Start date Start date
  • Tags Tags
    Correlation Linear
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 4K views
rwinston
Messages
36
Reaction score
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!
 
Physics news on Phys.org
Your approach is valid. Your arithmetic is wrong.

E(XY)-E(X)E(Y)=m(Var(X)). The b terms cancel when you do it right!

The denominator will be |m|Var(X).