How do I produce a Spearman correlation coefficient table?

23 Views Asked by At

I am writing a calculator for statistical tables and I have been unable to write the one for the Spearman Rank Correlation Coefficient. Which function produces it or can it be derived from another statistical table?

For example, the Pearson Product Moment Correlation Coefficient (with degrees of freedom $n$) is related to a t-statistic via \begin{equation} t = r\sqrt{\frac{n-2}{1-r^2}}, \end{equation} with degrees of freedom $n-2$. This means I can set my p-value and my degrees of freedom, look at a t-distribution table (or use my calculator :)), find a critical value and then convert that critical value using the above formula to find that for the PPMCC.

The PPMCC and Spearman coincide at large dimensions but differ for low values. How do I produce the latter?

EDIT: I have seen the relation \begin{equation} z = \sqrt{\frac{n-3}{1.06}}\operatorname{arctanh} r \end{equation} on wikipedia to relate it to a z-statistic. Putting in $p=0.9$ provides $z = 1.2816$ from a cumulative standard normal table. Setting $n=10$ should provide $r = 0.4611$ but I can't find this on the Spearman table.