The Essentials of Biostatistics for Physicians, Nurses, and Clinicians

(Ann) #1
9.4 Spearman’s Rank-Order Correlation Coeffi cient 151

estimate from the least squares line. But how do we measure a mono-
tonic relationship that is not linear or the data is very nonnormal?
Spearman ’ s rank - order correlation coeffi cient is a nonparametric
measure of such relationships.
Suppose we have a relationship given by YX= measured with
no error and defi ned for all X ≥ 0. Recall that Pearson ’ s correlation can
be between − 1 and 1, and is only equal to 1 or − 1 if there is a perfect
linear relationship. Now this square root function is a monotonic func-
tion but is nonlinear. So the Pearson correlation would be less than 1.
In such cases, we would prefer that a correlation measure for a perfect
monotonic functional relationship would equal 1 if it is an increasing
function such as the square root or − 1 for a negative exponential (i.e.,
Y = exp( − X )). Spearman ’ s rank correlation coeffi cient does that. In fact,
there are two nonparametric correlation measures that have been
devised to satisfy this condition for perfect monotonic relationships and
be properly interpretable for any continuous bivariate distribution.
Spearman rank correlation “ ρ ” and Kendall ’ s “ τ ” introduced by
Spearman (1904) and Kendall (1938) , respectively. We shall only
discuss Spearman ’ s ρ.
Spearman ’ s ρ in essence is calculated by the same formula as
Pearson ’ s correlation, but with the measured values replaced by their
ranks. What exactly do we mean by this? For each X i , replace the value
by the rank of X i when ranked with relationship to the set of observed
X s with rank 1 for the smallest values in increasing order up to rank n
for the largest of the X s. Do the same for each Y i. Then take the ranked
pairs and compute the correlation for these pair just like you would
with Pearson ’ s correlation coeffi cient. For example, suppose we con-
sider the pair ( X 5 , Y 5 ), and X 5 is ranked third out of 20, and Y 5 sixth out
of 20, Then we replace the pair with (3, 6) their ranked pair.
The computational formula for Spearman ’ s rank correlation is


ρ=−+{}

⎡{}}−+

=

=



RX RY n n

RX n n

i ii

n

i i

n

()() ([ ])


() ([ ])


1

2

2
1

2

12


12


/


/


⎣⎣⎢


{}−+


∑=
RYi n n
i

n
()^2 ([ ] ).
1

12 /^2


In the case of no ties, this formula simplifi es to
Free download pdf