Spearman's rank correlation coefficient
Spearman's rank correlation coefficient is denoted as ϱs for a population parameter and as rs for a sample statistic. It is appropriate when one or both variables are skewed or ordinal1 and is robust when extreme values are present. For a correlation between variables x and y, the formula for calculating the sample Spearman's correlation coefficient is given by
rs=1−6∑i=1nd2in(n2−1) where di is the difference in ranks for x and y
The distinction between Pearson's and Spearman's correlation coefficients in applications will be discussed using examples below.