Spearman's rank correlation coefficient - Wikipedia, the free encyclopedia 05/21/2007 03:25 PM Spearman's rank correlation coefficient From Wikipedia, the free encyclopedia (Redirected from Spearman's rho) In statistics, Spearman's rank correlation coefficient, named after Charles Spearman and often denoted by the Greek letter ρ (rho), is a non-parametric measure of correlation – that is, it assesses how well an arbitrary monotonic function could describe the relationship between two variables, without making any assumptions about the frequency distribution of the variables. Unlike the Pearson product-moment correlation coefficient, it does not require the assumption that the relationship between the variables is linear, nor does it require the variables to be measured on interval scales; it can be used for variables measured at the ordinal level. In principle, ρ is simply a special case of the Pearson product-moment coefficient in which the data are converted to rankings before calculating the coefficient. In practice, however, a simpler procedure is normally used to calculate ρ. The raw scores are converted to ranks, and the differences d between the ranks of each observation on the two variables are calculated. ρ is then given by: where: di = the difference between each rank of corresponding values of x and y, and n = the number of pairs of values. Spearman's rank correlation coefficient is equivalent to Pearson correlation on ranks. The formula above is a short-cut to its product-moment form, assuming no tie. The product-moment form can be used in both tied and untied cases. Another popular method for computing rank correlation is the Kendall tau rank correlation coefficient. Contents 1 Example 2 Determining significance 3 See also 4 External links Example http://en.wikipedia.org/wiki/Spearman%27s_rho Page 1 of 4 Spearman's rank correlation coefficient - Wikipedia, the free encyclopedia 05/21/2007 03:25 PM The raw data used in this example is shown below. IQ Hours of TV per week. 106 7 86 0 100 28 100 50 99 28 103 28 97 20 113 12 113 7 110 17 The first step is to sort this data by the first column. Next, two more columns are created. Both of these are for ranking the first two columns. Notice how the rank of values that are the same is the mean of what their ranks would otherwise be. Then a column "d" is created to hold the differences between the two rank columns. Finally another column "d2 " should be created. This is just column d squared. After doing this process with the example data you should end up with something like: IQ (i) Hours of TV per week (t) rank (i) rank (t) d d2 86 0 1 1 0 0 97 20 2 6 4 16 99 28 3 8 5 25 100 50 4.5 10 5.5 30.25 100 28 4.5 8 3.5 12.25 103 28 6 8 2 106 7 7 2.5 4.5 20.25 110 17 8 5 3 9 113 7 9.5 2.5 7 49 113 12 9.5 4 5.5 30.25 The values in the d2 column can now be added to find can now be substituted back into the equation. http://en.wikipedia.org/wiki/Spearman%27s_rho 4 . The value of n is 10. So these values Page 2 of 4 Spearman's rank correlation coefficient - Wikipedia, the free encyclopedia 05/21/2007 03:25 PM Which evaluates to ρ = − 0.187878787878. Determining significance The modern approach to testing whether an observed value of ρ is significantly different from zero (we will always have 1 ≥ ρ ≥ −1) is to calculate the probability that it would be greater than or equal to the observed ρ, given the null hypothesis, by using a permutation test. This approach is almost always superior to traditional methods, unless the data set is so large that computing power is not sufficient to generate permutations, or unless an algorithm for creating permutations that are logical under the null hypothesis is difficult to devise for the particular case (but usually these algorithms are straightforward). Although the permutation test is often trivial to perform for anyone with computing resources and programming experience, traditional methods for determining significance are still widely used. The most basic approach is to compare the observed ρ with published tables for various levels of significance. This is a simple solution if the significance only needs to be known within a certain range or less than a certain value, as long as tables are available that specify the desired ranges. A reference to such a table is given below. However, generating these tables is computationally intensive and complicated mathematical tricks have been used over the years to generate tables for larger and larger sample sizes, so it is not practical for most people to extend existing tables. An alternative approach available for sufficiently large sample sizes is an approximation to the Student's tdistribution. For sample sizes above about 20, the variable has a Student's t-distribution in the null case (zero correlation). In the non-null case (i.e. to test whether an observed ρ is significantly different from a theoretical value, or whether two observed ρs differ significantly) tests are much less powerful, though the t-distribution can again be used. A generalisation of the Spearman coefficient is useful in the situation where there are three or more conditions, a number of subjects are all observed in each of them, and we predict that the observations will have a particular order. For example, a number of subjects might each be given three trials at the same task, and we predict that performance will improve from trial to trial. A test of the significance of the trend between conditions in this situation was developed by E. B. Page and is usually referred to as Page's trend test for ordered alternatives. See also Kendall tau rank correlation coefficient Rank correlation http://en.wikipedia.org/wiki/Spearman%27s_rho Page 3 of 4 Spearman's rank correlation coefficient - Wikipedia, the free encyclopedia 05/21/2007 03:25 PM Chebyshev's sum inequality, rearrangement inequality (These two articles may shed light on the mathematical properties of Spearman's ρ.) Pearson product-moment correlation coefficient, a similar correlation method that instead relies on the data being linearly correlated. External links Table of critical values of ρ for significance with small samples (http://www.sussex.ac.uk/Users/grahamh/RM1web/Rhotable.htm) Online calculator (http://www.wessa.net/rankcorr.wasp) Chapter 3 part 1 shows the formula to be used when there are ties (http://faculty.vassar.edu/lowry/webtext.html) Spearman's rank correlation (http://udel.edu/~mcdonald/statspearman.html) : Simple notes for students with an example of usage by biologists and a spreadsheet for Microsoft Excel for calculating it (a part of materials for a Research Methods in Biology course). Retrieved from "http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient" Categories: Articles lacking sources from April 2007 | All articles lacking sources | Covariance and correlation | Statistical tests | Non-parametric statistics This page was last modified 09:45, 16 May 2007. All text is available under the terms of the GNU Free Documentation License. (See Copyrights for details.) Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a US-registered 501(c)(3) taxdeductible nonprofit charity. http://en.wikipedia.org/wiki/Spearman%27s_rho Page 4 of 4