# Obtain z test statistic for testing Spearman rho with z-score formula

I know the approach using student t-test to derive p-value from spearman rho coefficient. I also saw permutation test for this operation, but I am somehow confused and prefer to stick to the z-score formula $\frac{x-\mu}\sigma$.

In other words, how can I convert Spearman rho coefficient to the normal approximation z statistic with formula z-score formula $\frac{x-\mu}\sigma$?

• Please let me know in comment if I am missing something. – Woeitg Feb 12 '17 at 15:20
• Link to related unanswered question: stats.stackexchange.com/questions/217422/… – Woeitg Feb 12 '17 at 15:23
• I don't think you can use $\frac{x-\mu}{\sigma}$ to convert Spearman's $\rho$ to z-score here. You need Fisher transformation as the linked wikipedia page on the question in your comment shows. Check this question and Nick Cox's answer: stats.stackexchange.com/questions/59714/… . I don't think it is hard to use Fisher transformation to obtain z-score. – T.E.G. - Reinstate Monica Feb 12 '17 at 15:46
• The problem is I get different p-value using fisher transformation and t-distribution. For example in the wikipedia xample, rho=-0.1757 and p-value=0.62. Using Fisher transformation. I get F(r)=Arctan(-0.1757)=-0.1775 and z-score=SQRT((10-3)/1.06)*-0.1775=-0.456. Using normal distribution table, pvalue==2*(1-NORMSDIST(ABS(-0.456)))=0.648 which is different from wikipedia example – Woeitg Feb 12 '17 at 16:19
• I see and I am sorry if I misled you, but don't get confused with Glen_b's answer. That question is about comparing two separate correlations ("running separate Spearman's analyses for each group"). I sent it to show that using Fisher transformation for Spearman's $\rho$ is admissible. – T.E.G. - Reinstate Monica Feb 12 '17 at 16:54

Let $R^x_1, R^x_2,\ldots, R^x_{n_x}$ be the ranks of $x$ and $R^y_1, R^y_2,\ldots,R^y_{n_y}$ be the ranks of $y$. Spearman correlation is determined as $$r_s = 1 - \frac{6D}{n^3-n}$$ where $$D = \sum_{i=1}^n d_i^2 = \sum_{i=1}^n (R^x_{(i)}-R^y_{(i)})^2$$
Significance testing of $r_s$ is based on the standard normal distribution. Using the expected value of $D$ as $$E(D) = \frac{n^3-n}{6} = \frac{n(n-1)(n+1)}{6}$$ $$V(D) = \frac{n^2(n+1)^2(n-1)}{36}$$ $$Z = \frac{D - E(D)}{\sqrt{V(D)}} \Longrightarrow \frac{x-\mu}{\sigma}$$