1
$\begingroup$

The exercise consists on proving that if a vector x=-y, then its Spearman correlation is -1. I have tried using the direct formula for the Spearman correlation. However I do not know if all n ranks are distinct integers. Therefore I must employ that $r_s = \frac{cov(rg_X,rg_Y)}{\sigma_(rg_x)\sigma_(rg_y)}$.

I do not know how to proceed

$\endgroup$

1 Answer 1

1
$\begingroup$

Expand the covariance by using its definition:

$$ \begin{align} \mathrm{cov}(X, Y) &= \mathrm{E}\left[(X-E[X])(Y-E[Y])\right]\\ & = \mathrm{E}\left[\left\{(-Y)-E[-Y])\right\}(Y-E[Y])\right]\\ & = -1 \cdot \mathrm{E}[(Y-E[Y])(Y-E[Y])]\\ & = -1 \cdot \mathrm{E}[(Y-E[Y])^2]\\ & = -1 \cdot \mathrm{Var}[Y] \end{align} $$

Also, notice that

$$ \mathrm{Var}[Y] = \mathrm{Var}[X] $$

Put these relationships back to your correlation formula, and you get your result.

$\endgroup$
4
  • $\begingroup$ How would that change if we were to use the rg(x) and the rg(y) $\endgroup$
    – Fer Stein
    Commented Jun 30, 2020 at 12:33
  • $\begingroup$ @FerStein The Spearman's correlation uses the same formula as Pearson's. The difference is that the random variable is transformed into the rank which you can consider as the other random variable. So the same logic applies. $\endgroup$ Commented Jun 30, 2020 at 12:35
  • $\begingroup$ But what is the relation between rg(x) and the rg(-x) $\endgroup$
    – Fer Stein
    Commented Jun 30, 2020 at 13:01
  • 1
    $\begingroup$ @FerStein You can consider the rank is inverted. Remember that the correlation is invariant in terms of constant shift. So you can make the rank negative by subtracting max rank + 1. $\endgroup$ Commented Jun 30, 2020 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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