Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

How do I know when to choose between Spearman's $\rho$ and Pearson's $r$? My variable includes satisfaction and the scores were interpreted using the sum of the scores. However, these scores could also be ranked.

share|improve this question
2  
see also this question on pearson versus spearman for non-normal data stats.stackexchange.com/questions/3730/… –  Jeromy Anglim Mar 9 '11 at 12:14
1  
in case of normal data, produce pearson. in case of non-normal data, produce spearman. –  user36239 Dec 15 '13 at 21:28

5 Answers 5

(I recognize this is a late answer, but it could help some future readers.)

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information. Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set:

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

This is because $y$ increases monotonically with $x$ so the Spearman correlation is perfect, but not linearly, so the Pearson correlation is imperfect.

corr(x,log(y),'type','Pearson');  % will equal 1

Doing both is interesting because if you have S > P, that means that you have a correlation that is monotonic but not linear. Since it is good to have linearity in statistics (it is easier) you can try to apply a transformation on $y$ (such a log).

I hope this helps to make the differences between the types of correlations easier to understand.

share|improve this answer
1  
I'm guessing that this is a given from what you have said already, but I just want to confirm that it is not possible for S<P to occur. –  Jonathan Thiele Jun 26 '12 at 16:33
4  
@JonathanThiele it is perfectly possible to have S<P. For example, sets II and IV from Anscombe's Quartets demonstrate this behaviour. Also, see this question: stats.stackexchange.com/questions/27127/… –  atomicules Jul 24 '12 at 14:55
    
@atomicules Thanks for the information. I just checked the correlations in Anscombe's Quartet, and your link was helpful. –  Jonathan Thiele Jul 25 '12 at 17:59

Shortest and mostly correct answer is:

Pearson benchmarks linear relationship, Spearman benchmarks monotonic relationship (few infinities more general case, but for some power tradeoff).

So if you assume/think that the relation is linear (or, as a special case, that those are a two measures of the same thing, so the relation is $y=1\cdot x+0$) and the situation is not too weired (check other answers for details), go with Pearson. Otherwise use Spearman.

share|improve this answer

This happens often in statistics: there are a variety of methods which could be applied in your situation, and you don't know which one to choose. You should base your decision the pros and cons of the methods under consideration and the specifics of your problem, but even then the decision is usually subjective with no agreed-upon "correct" answer. Usually it is a good idea to try out as many methods as seem reasonable and that your patience will allow and see which ones give you the best results in the end.

The difference between the Pearson correlation and the Spearman correlation is that the Pearson is most appropriate for measurements taken from an interval scale, while the Spearman is more appropriate for measurements taken from ordinal scales. Examples of interval scales include "temperature in Farenheit" and "length in inches", in which the individual units (1 deg F, 1 in) are meaningful. Things like "satisfaction scores" tend to of the ordinal type since while it is clear that "5 happiness" is happier than "3 happiness", it is not clear whether you could give a meaningful interpretation of "1 unit of happiness". But when you add up many measurements of the ordinal type, which is what you have in your case, you end up with a measurement which is really neither ordinal nor interval, and is difficult to interpret.

I would recommend that you convert your satisfaction scores to quantile scores and then work with the sums of those, as this will give you data which is a little more amenable to interpretation. But even in this case it is not clear whether Pearson or Spearman would be more appropriate.

share|improve this answer
    
How about for example... communication apprehension? A high apprehension has no definite difference with a very high apprehension, right? But I've seen that the variable has been correlated with other variables using Pearson's r. Is that totally okay? Thank you! –  user3636 Mar 9 '11 at 12:57

I ran into an interesting corner case today.

If we are looking at very small numbers of samples, the difference between Spearman and Pearson can be dramatic.

In case below, the two methods report an exactly opposite correlation.

enter image description here

Some quick rules of thumb to decide on Spearman vs. Pearson:

  • The assumptions of Pearsons are constant variance and linearity (or something reasonably close to that), and if these are not met, it might be worth trying Spearmans.
  • The example above is a corner case that only pops up if there is a handful (<5) of datapoints. If there is >100 data points, and the data is linear or close to it, then Pearson will be very similar to Spearman.
  • If you feel that linear regression is a suitable method to analyze your data, then the output of Pearsons will match the sign and magnitude of a linear regression slope (is this strictly correct, anyone?).
  • If your data has some non-linear components that linear regression won't pick up, then first try to straighten out the data into a linear form by applying a transform (perhaps log e). If that doesn't work, then Spearman may be appropriate.
  • I always try Pearson's first, and if that doesn't work, then I try Spearman.
  • Can you add any more rules of thumb or correct the ones I have just deduced? I have made this question a community Wiki so you can do so.

p.s. Here is the R code to reproduce the graph above:

# Script that shows that in some corner cases, the reported correlation for spearman can be
# exactly opposite to that for pearson. In this case, spearman is +0.4 and pearson is -0.4.
y = c(+2.5,-0.5, -0.8, -1)
x = c(+0.2,-3,   -2.5,+0.6)

plot(y ~ x,xlim=c(-6,+6),ylim=c(-1,+2.5))
title("Correlation: corner case for Spearman vs. Pearson\nNote that they are exactly opposite each other (-0.4 vs. +0.4)")
abline(v=0)
abline(h=0)
lm1=lm(logReturn ~ indicator)
abline(lm1,col="red")

spearman = cor(y,x,method="spearman")
pearson = cor(y,x,method="pearson")
legend("topleft",
    c("Red line: regression.",
    sprintf("Spearman: %.5f",spearman),
    sprintf("Pearson:   +%.5f",pearson)
))
share|improve this answer

While agreeing with charles answer, i would suggest (on a strictly practical level) that you compute both of the coefficients and look at the differences. In many cases, they will be exactly the same, so you don't need to worry.

If however, they are different then you need to look at whether or not you met the assumptions of Pearsons (constant variance and linearity) and if these are not met, you are probably better off using Spearmans.

share|improve this answer
1  
as a machine learner I am certainly not a saint regarding statistical correctness, but checking the assumptions AFTER performing the test seems like heresy to me. –  steffen Mar 9 '11 at 12:11
    
Thanks! –  user3636 Mar 9 '11 at 13:00
5  
@steffen I think it's fine. One assumption of regression is that the residuals are normally distributed. How would you check that before running the regression? –  Glen Mar 9 '11 at 13:27
    
@Glen: In this case I cannot. But when I compare the quality of different models, I generally prefer to check the assumption (e.g. approximately normally distributed) before performing the test to reduce the tendency to relax assumptions in favor of certain test outcomes. Call it prevention of a mind trick. I guess it is just me ;). –  steffen Mar 9 '11 at 14:26
1  
@ steffen: you are correct about the heresy, but if the two procedures give the same results then its a matter of taste which to use, but if they dont then checking the asumptions and where they fail can often give useful insight into the data. Personally, i use spearman wherever possible, but this is not common practice in my field. –  richiemorrisroe Mar 10 '11 at 10:37

protected by Community Dec 16 '13 at 13:16

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?