Rank Randomization for Association (Spearman's ρ )
David M. Lane
Pearson's r, Randomization Test for Pearson's r
- Compute Spearman's ρ
- Test Spearman's ρ for significance
The rank randomization test for association is equivalent to the randomization test for Pearson's r except that the numbers are converted to ranks before the analysis is done. Table 1 shows 5 values of X and Y. Table 2 shows these same data converted to ranks (separately for X and Y).
Table 1. Example data.
The approach is to consider the X variable fixed and compare the correlation obtained in the actual ranked data to the correlations that could be obtained by rearranging the Y variable ranks. For the ranked data shown in Table 2, the correlation between X and Y is 0.90. The correlation of ranks is called "Spearman's ρ."
Table 3. Ranked data with correlation of 1.0.
There is only one arrangement of Y that produces a higher correlation than 0.90: A correlation of 1.0 results if the fourth and fifth observations' Y values are switched (see Table 3). There are also three other arrangements that produce an r of 0.90 (see Tables 4, 5, and 6). Therefore, there are five arrangements of Y that lead to correlations as high or higher than the actual ranked data (Tables 2 through 6).
Table 4. Ranked data with correlation of 0.90.
Table 5. Ranked data with correlation of 0.90.
Table 6. Ranked data with correlation of 0.90.
The next step is to calculate the number of possible arrangements of Y. The number is simply N!, where N is the number of pairs of scores. Here, the number of arrangements is 5! = 120. Therefore, the probability value is 5/120 = 0.042. Note that this is a one-tailed probability since it is the proportion of arrangements that give a correlation as large or larger. The two-tailed probability is 0.084.
Since it is hard to count up all the possibilities when the sample size is even moderately large, it is convenient to have a table of critical values.
Table of Critical Values for Spearman's ρ (in a new window).
From the table linked to above, you can see that the critical value for a one-tailed test with 5 observations at the 0.05 level is 0.90. Since the correlation for the sample data is 0.90, the association is significant at the 0.05 level (one-tailed). As shown above, the probability value is 0.042. Since the critical value for a two-tailed test is 1.0, Spearman's ρ is not significant in a two-tailed test.
Please answer the questions: