Spearman's rho formula

what is the formula used for computation of Spearman’s rho in knime
when I compared the value with the value obtained from the statistics formula, it is not matching.

Rank Correlation node,

Spearman’s rho.

Can you please me know the formula used by knime to compute the spearnans rho?. I found that it does not tally with the value obtained from formula given in a statistics text book.

Found the node in the meanwhile as well… On it, I keep you posted.

So the node computes the Pearson Correlation on the ranks which is the definition of the Spearman rho: https://en.wikipedia.org/wiki/Spearman's_rank_correlation_coefficient

If you’re further interested, you can have a look at the underlying code here: https://bitbucket.org/KNIME/knime-stats/src/6881a52b094610acf81daa24d1f765ca8372a39f/org.knime.stats/src/org/knime/base/node/stats/correlation/rank2/SortedCorrelationComputer2.java#lines-295:318

Which was the formula that you found in your text book? Do you have an example data table that you used?

1 Like