In statistics, a rank correlation is any of several statistics that measure an ordinal association—the relationship between rankings of different ordinal variables or different rankings of the same variable, where a "ranking" is the assignment of the ordering labels "first", "second", "third", etc. to different observations of a particular variable. A rank correlation coefficient measures the degree of similarity between two rankings, and can be used to assess the significance of the relation between them. For example, two common nonparametric methods of significance that use rank correlation are the Mann–Whitney U test and the Wilcoxon signed-rank test.
If, for example, one variable is the identity of a college basketball program and another variable is the identity of a college football program, one could test for a relationship between the poll rankings of the two types of program: do colleges with a higher-ranked basketball program tend to have a higher-ranked football program? A rank correlation coefficient can measure that relationship, and the measure of significance of the rank correlation coefficient can show whether the measured relationship is small enough to likely be a coincidence.
If there is only one variable, the identity of a college football program, but it is subject to two different poll rankings (say, one by coaches and one by sportswriters), then the similarity of the two different polls' rankings can be measured with a rank correlation coefficient.
As another example, in a contingency table with low income, medium income, and high income in the row variable and educational level—no high school, high school, university—in the column variable),[1] a rank correlation measures the relationship between income and educational level.
Some of the more popular rank correlation statistics include
An increasing rank correlation coefficient implies increasing agreement between rankings. The coefficient is inside the interval [−1, 1] and assumes the value:
Following, a ranking can be seen as a permutation of a set of objects. Thus we can look at observed rankings as data obtained when the sample space is (identified with) a symmetric group. We can then introduce a metric, making the symmetric group into a metric space. Different metrics will correspond to different rank correlations.
Kendall 1970[2] showed that his
\tau
\rho
Suppose we have a set of
n
x
y
\{xi\}i\le
\{yi\}i\le
i
j
x
aij
y
bij
aij=-aji
bij=-bji
aij=bij=0
i=j
\Gamma
\Gamma=
| |||||||||||||||||||||||||||
|
Equivalently, if all coefficients are collected into matrices
A=(aij)
B=(bij)
AsfT=-A
BsfT=-B
\Gamma=
\langleA,B\rangle\rm | |
\|A\|\rm\|B\|\rm |
where
\langleA,B\rangle\rm
\|A\|\rm=\sqrt{\langleA,A\rangle\rm
A
B
If
ri
si
i
x
y
aij=sgn(rj-ri), bij=sgn(sj-si).
The sum
\sumaijbij
\sum
2 | |
a | |
ij |
n(n-1)/2
aij
\sum
2 | |
b | |
ij |
\Gamma=
2((numberofconcordantpairs)-(numberofdiscordantpairs)) | |
n(n-1) |
=Kendall's\tau
If
ri
si
i
x
y
a,b\inM(n x n;R)
aij:=rj-ri
bij:=sj-si
The sums
\sum
2 | |
a | |
ij |
\sum
2 | |
b | |
ij |
ri
si
1
n
\Gamma=
\sum(rj-ri)(sj-si) | ||||||||||||
|
To simplify this expression,let
di:=ri-si
i
U
\{1,2,\ldots,n\}
r,s
1,2,\ldots,n
U
U
E[U]=
|
E[U2
]=
|
Var(U)=
|
-
|
=
|
\Gamma
\begin{align} | 1 |
n2 |
n | |
\sum | |
i,j=1 |
(rj-ri)(sj-si) &=2\left(
1 | |
n2 |
⋅
n | |
n\sum | |
i=1 |
risi-(
1 | |
n |
n | |
\sum | |
i=1 |
ri)(
1 | |
n |
n | |
\sum | |
j=1 |
sj) \right)\\ &=
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
(r | |
i |
+
2 | |
s | |
i |
-
2 | |
d | |
i |
) -2(E[U])2\\ &=
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
r | |
i |
+
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
s | |
i |
-
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
d | |
i |
-2(E[U])2\\ &=2(E[U2]-(E[U])2) -
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
d | |
i |
\\ \end{align}
and
\begin{align}
1 | |
n2 |
n | |
\sum | |
i,j=1 |
(rj-ri)2&=
1 | |
n2 |
⋅ n
n | |
\sum | |
i,j=1 |
(
2 | |
r | |
i |
+
2 | |
r | |
j |
-2rirj)\\ &=2
1 | |
n |
n | |
\sum | |
i=1 |
2 | |
r | |
i |
-2(
1 | |
n |
n | |
\sum | |
i=1 |
ri)(
1 | |
n |
n | |
\sum | |
j=1 |
rj)\\ &=2(E[U2]-(E[U])2)\\ \end{align}
Hence
\Gamma=1-
| ||||||||||||||||
2nVar(U) |
=1-
| ||||||||||||||||
n(n2-1) |
where
di=ri-si
\rho
Gene Glass (1965) noted that the rank-biserial can be derived from Spearman's
\rho
Dave Kerby (2014) recommended the rank-biserial as the measure to introduce students to rank correlation, because the general logic can be explained at an introductory level. The rank-biserial is the correlation used with the Mann–Whitney U test, a method commonly covered in introductory college courses on statistics. The data for this test consists of two groups; and for each member of the groups, the outcome is ranked for the study as a whole.
Kerby showed that this rank correlation can be expressed in terms of two concepts: the percent of data that support a stated hypothesis, and the percent of data that do not support it. The Kerby simple difference formula states that the rank correlation can be expressed as the difference between the proportion of favorable evidence (f) minus the proportion of unfavorable evidence (u).
r=f-u
To illustrate the computation, suppose a coach trains long-distance runners for one month using two methods. Group A has 5 runners, and Group B has 4 runners. The stated hypothesis is that method A produces faster runners. The race to assess the results finds that the runners from Group A do indeed run faster, with the following ranks: 1, 2, 3, 4, and 6. The slower runners from Group B thus have ranks of 5, 7, 8, and 9.
The analysis is conducted on pairs, defined as a member of one group compared to a member of the other group. For example, the fastest runner in the study is a member of four pairs: (1,5), (1,7), (1,8), and (1,9). All four of these pairs support the hypothesis, because in each pair the runner from Group A is faster than the runner from Group B. There are a total of 20 pairs, and 19 pairs support the hypothesis. The only pair that does not support the hypothesis are the two runners with ranks 5 and 6, because in this pair, the runner from Group B had the faster time. By the Kerby simple difference formula, 95% of the data support the hypothesis (19 of 20 pairs), and 5% do not support (1 of 20 pairs), so the rank correlation is r = .95 - .05 = .90.
The maximum value for the correlation is r = 1, which means that 100% of the pairs favor the hypothesis. A correlation of r = 0 indicates that half the pairs favor the hypothesis and half do not; in other words, the sample groups do not differ in ranks, so there is no evidence that they come from two different populations. An effect size of r = 0 can be said to describe no relationship between group membership and the members' ranks.