Years ago I found this identity through experimentation playing with data and transformations. After explaining it to my statistics professor he came in the next class with a one-page proof using vector and matrix notation. Unfortunately I lost the paper he gave me. (This was back in 2007)

Is anyone able to reconstruct a proof?

Let $(x_i,y_i)$ be your original data points. Define a new set of data points by rotating the original set by angle $\theta$; call these points $(x'_i,y'_i)$.

The R squared value of the original set of points is equal to the negative product of the derivative with respect to $\theta$ of the natural log of the standard deviation for each coordinate of the new set of points, each evaluated at $\theta=0$

$r^2= - \left(\left.\frac{d}{d\theta}\ln(\sigma_{x'})\right|_{\theta=0} \right) \left(\left.\frac{d}{d\theta}\ln(\sigma_{y'})\right|_{\theta=0} \right)$


Derivation is not particularly interesting exercise of symbolic manipulation. Since, \begin{align} \left.\frac{dx'}{d\theta}\right|_{\theta=0}&=-y,\\ \left.\frac{dy'}{d\theta}\right|_{\theta=0}&=x, \end{align} and $s_x^2=\frac{1}{n}\sum_{i=1}^{n}(x_i-\bar{x})^2$ $$ \left.\frac{ds_{x'}^2}{d\theta}\right|_{\theta=0}=-2s_{xy}$$ $$ \left.\frac{ds_{y'}^2}{d\theta}\right|_{\theta=0}=2s_{xy}$$

$$\left.\frac{d}{d\theta}\ln(s_{x'})\right|_{\theta=0} = -\frac{s_{xy}}{s_x^2},\quad \left.\frac{d}{d\theta}\ln(s_{y'})\right|_{\theta=0} = \frac{s_{xy}}{s_y^2}$$ and the result follows.

I am curious to know how you came up with such equation, especially what particular experiment revealed such identity.

| cite | improve this answer | |
  • 3
    $\begingroup$ Thanks! This is actually much simpler than his proof that I remember. The identity came about by just playing with data years prior; for kicks I just doing rotations, standard deviations, derivatives, logarithms, adding, multiplying, etc. I had the original r^2 be a horizontal line, and graphing whatever function created as a function of theta. Sometimes they crossed, but at 'odd' angles; sometimes never crossed. Then somehow they crossed at theta=zero. Thought that was interesting. Tested it with other random data and it still held. I didn't see how it worked, but thought neat identity. $\endgroup$ – sheppa28 Dec 28 '14 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.