Spearman Rank Correlation Coefficient and Test

In Section 16.4 we introduced the test of the coefficient of correlation, which allows us to determine whether there is evidence of a linear relationship between two interval variables. Recall that the required condition for the t-test of is that the variables are bivariate normally distributed. When the normality requirement is not satisfied we turn to another nonparametric technique, the Spearman rank correlation coefficient, to determine whether there is enough evidence to infer that a relationship exists.

The Spearman rank correlation coefficient is calculated like all of the previously introduced nonparametric methods by first ranking the data. We then calculate the Pearson correlation coefficient of the ranks. The population Spearman correlation coefficient is labelled, and the sample statistic used to estimate its value is labelled .

Sample Spearman Rank Correlation Coefficient

where a and b are the ranks of x and y, respectively, sab is the covariance of the values of a and b, sa is the standard deviation of the values of a, and sb is the standard deviation of the values of b.

We can test to determine whether a relationship exists between the two variables. The hypotheses to be tested are

(We also can conduct one-tail tests.) The test statistic is . To determine whether the value of is large enough to reject the null hypothesis, we refer to Table 11 in Appendix B, which lists the critical values of the test statistic for one-tail tests. To conduct a two-tail test, the value of must be doubled. The table lists critical values for = .005, .01, and .025 and for n = 5 to 30. When n is greater than 30, is approximately normally distributed with mean 0 and standard deviation 1/. Thus, for n > 30, the test statistic is as shown in the box.

Test Statistic for Testing = 0 when n > 30

which is standard normally distributed

Example 1 [Sp] The weekly returns of two stocks for a 13-week period were recorded and are listed here. Assuming that the returns are not normally distributed, can we infer at the 5% significance level that the stock returns are correlated?

Stock 1 −7 −4 −7 −3 2 −10 −10 5 1 −4 2 6 −13

Stock 2 6 6 −4 9 3 −3 7 −3 4 7 9 5 −7

SOLUTION

IDENTIFY

The problem objective is to analyze the relationship between two variables, both of which are interval. However, the normality requirement for the use of the test of ρ (correlation) is not satisfied. We calculate and test the Spearman rank correlation coefficient. The hypotheses are

COMPUTE

Manually

This is a two-tail test and the sample size is less than or equal to 30; we use Table 11 to produce the rejection region. The significance level of the two-tail test is .05. Consequently, we find under the heading α = .025 and on the row for n = 13 we find .566. Thus, the rejection region is rS > .566.

We rank each of the variables separately, averaging any ties that we encounter. The original data and ranks are as follows, and the sums of the ranks, sums of the ranks squared, and sums of the products are listed below.

Week Stock 1 Rank a Stock 2 Rank b a2 b2 ab

1 −7 4.5 6 8.5 20.25 72.25 38.25

2 −4 6.5 6 8.5 42.25 72.25 55.25

3 −7 4.5 −4 2 20.25 4.00 9.00

4 −3 8 9 12.5 64.00 156.25 100.00

5 2 10.5 3 5 110.25 25.00 52.50

6 −10 2.5 −3 3.5 6.25 12.25 8.75

7 −10 2.5 7 10.5 6.25 110.25 26.25

8 5 12 −3 3.5 144.00 12.25 42.00

9 1 9 4 6 81.00 36.00 54.00

10 −4 6.5 7 10.5 42.25 110.25 68.25

11 2 10.5 9 12.5 110.25 156.25 131.25

12 6 13 5 7 169.00 49.00 91.00

13 −13 1 −7 1 1.00 1.00 1.00

Sums 91 91 817 817 677.5

The sums are

=677.5

= = 91

= 817

= 817

Using the shortcut calculation we determine that the covariance of the ranks is

= = 3.38

The sample variances of the ranks are

= = 15.00

= = 15.00

The standard deviations are

Thus,

Excel

Because the sample size is small, the only part of the printout that we can use is the Spearman rank correlation. To complete the test of hypothesis compare this statistic with the rejection we determine from Table 11 in Appendix B.

INSTRUCTIONS

1. Type or import the data into two adjacent columns. (Open XmY-01.)

2. Click Add-Ins, Data Analysis Plus, and Correlation (Spearman).

3. Specify the Input Range (A1:B14) and the value of (.05).

Minitab

Correlations: Rank 1, Rank 2

Pearson correlation of Rank 1 and Rank 2 = 0.225

P-Value = 0.460

Because the sample size is small, the only part of the printout that we can use is the correlation. To complete the test of hypothesis compare this statistic with the rejection we determine from Table 11 in Appendix B.

INSTRUCTIONS

1. Click Data and Rank… to rank each variable.

2. Click Stat, Basic Statistics, and Correlation. Select the variables representing the ranks.

INTERPRET

The sample Spearman rank correlation coefficient is .225, which is less than .566. There is not enough evidence to conclude that the returns are correlated.

Copyright © 2016 by Nelson Education Ltd.