Spearman's rank correlation coefficient is a method of seeing how close two sets of data are together, giving a number between -1 and 1 showing if the data is related or not, this script simply shows you the result without the hastle of going through the forumula;
First enter the difference squared, if you don't already know how this works: http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient Wiki is god :P then enter the amount of data you have and it'll display the result
I tried to keep the code as short as possible using the $iif idents so dont bitch :P hope this helps some students out slaving away at their geography/math coursework :P
alias sr {
var %d2 = $$input(Enter Sum of Difference^2,eq,Spearman's Rank - Input), %n = $$input(Enter number of rows of data you have,eq,Spearman's Rank - Input), %res = $calc(1 - (6 * %d2) / ((%n ^ 3) - %n))
noop $input($iif(%res isnum -1 - 1,Correlation: %res ( $+ $calc($remove(%res,-) * 100) $+ % match $+ ),An Error Occured; your data is incorrect),oi,Spearman's Rank - Result)
}