该系数（斯皮尔曼等级相关系数）是一种技术，能够被用于总结两个变量之间关系的强度和方向（负相关或正相关）。计算出来的数值在-1到1之间。

1. 计算该系数的方法：

- Create a table from your data.

Convenience Store | Distance from CAM (m) | Rank distance | Price of 50cl bottle (€) | Rank price | Difference between ranks (d) | d^{2} |

1 | 50 | 10 | 1.8 | 2 | 8 | 64 |

2 | 175 | 9 | 1.2 | 3.5 | 5.5 | 30.25 |

3 | 270 | 8 | 2 | 1 | 7 | 49 |

4 | 375 | 7 | 1 | 6 | 1 | 1 |

5 | 425 | 6 | 1 | 6 | 0 | 0 |

6 | 580 | 5 | 1.2 | 3.5 | 1.5 | 2.25 |

7 | 710 | 4 | 0.8 | 9 | -5 | 25 |

8 | 790 | 3 | 0.6 | 10 | -7 | 49 |

9 | 890 | 2 | 1 | 6 | -4 | 16 |

10 | 980 | 1 | 0.85 | 8 | -7 | 49 |

∑d^{2} = 285.5 |

- Rank the two data sets. Ranking is achieved by giving the ranking ‘1’ to the biggest number in a column, ‘2’ to the second biggest value and so on. The smallest value in the column will get the lowest ranking. This should be done for both sets of measurements.
- Tied scores are given the mean (average) rank. For example, the three tied scores of 1 euro in the example below are ranked fifth in order of price, but occupy three positions (fifth, sixth and seventh) in a ranking hierarchy of ten. The mean rank in this case is calculated as (5+6+7)/3 = 6.
- Find the difference in the ranks (d): This is the difference between the ranks of the two values on each row of the table. The rank of the second value (price) is subtracted from the rank of the first (distance from the museum).
- Square the differences (d
^{2}) To remove negative values and then sum them (d^{2}). - Calculate the coefficient (Rs) using the formula below. The answer will always be between 1.0 (a perfect positive correlation) and -1.0 (a perfect negative correlation).

Now to put all these values into the formula.

- Find the value of all the d
^{2}values by adding up all the values in the Difference column. In our example this is**285.5**. Multiplying this by**6**gives**1713**. - Now for the bottom line of the equation. The value
*n*is the number of sites at which you took measurements. This, in our example is**10**. Substituting these values into*n*^{3}*– n*we get**1000 – 10** - We now have the formula:
= 1 – (1713/990) which gives a value for*R*_{s}:*R*_{s}

**1 – 1.73 = -0.73**

2. 检验该关联的显著性

这里网页上直接提供了，计算好的各个显著性的r值，让我们用自己算出来的r值与之对比。没有提供计算方法。

维基百科（https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient#Determining_significance）提供了三种算法。

更多信息参考网页：https://geographyfieldwork.com/SpearmansRank.htm (谷歌搜索推荐位为1)