25
$\begingroup$

The Pearson's coefficient between two variables is quite high (r=.65). But when I rank the variable values and run a Spearman's correlation, the cofficient value is much lower (r=.30).

  • What is the interpretation of this?
$\endgroup$
2
  • 6
    $\begingroup$ It's generally a good idea to show a scatterplot of the data before interpreting a correlation coefficient. $\endgroup$
    – chl
    Commented Jun 9, 2011 at 7:45
  • $\begingroup$ What is your sample size? $\endgroup$ Commented Jun 9, 2011 at 7:58

1 Answer 1

48
$\begingroup$

Why the big difference

  • If your data is normally distributed or uniformly distributed, I would think that Spearman's and Pearson's correlation should be fairly similar.

  • If they are giving very different results as in your case (.65 versus .30), my guess is that you have skewed data or outliers, and that outliers are leading Pearson's correlation to be larger than Spearman's correlation. I.e., very high values on X might co-occur with very high values on Y.

  • @chl is spot on. Your first step should be to look at the scatter plot.
  • In general, such a big difference between Pearson and Spearman is a red flag suggesting that
    • the Pearson correlation may not be a useful summary of the association between your two variables, or
    • you should transform one or both variables before using Pearson's correlation, or
    • you should remove or adjust outliers before using Pearson's correlation.

Related Questions

Also see these previous questions on differences between Spearman and Pearson's correlation:

Simple R Example

The following is a simple simulation of how this might occur. Note that the case below involves a single outlier, but that you could produce similar effects with multiple outliers or skewed data.

# Set Seed of random number generator
set.seed(4444)

# Generate random data
# First, create some normally distributed correlated data
x1 <- rnorm(200)
y1 <- rnorm(200) + .6 * x1

# Second, add a major outlier
x2 <- c(x1, 14)
y2 <- c(y1, 14)

# Plot both data sets
par(mfrow=c(2,2))
plot(x1, y1, main="Raw no outlier")
plot(x2, y2, main="Raw with outlier")

plot(rank(x1), rank(y1), main="Rank no outlier")
plot(rank(x2), rank(y2), main="Rank with outlier")

# Calculate correlations on both datasets
round(cor(x1, y1, method="pearson"), 2)
round(cor(x1, y1, method="spearman"), 2)
round(cor(x2, y2, method="pearson"), 2)
round(cor(x2, y2, method="spearman"), 2)

Which gives this output

[1] 0.44
[1] 0.44
[1] 0.7
[1] 0.44

The correlation analysis shows that without the outlier Spearman and Pearson are quite similar, and with the rather extreme outlier, the correlation is quite different.

The plot below shows how treating the data as ranks removes the extreme influence of the outlier, thus leading Spearman to be similar both with and without the outlier whereas Pearson is quite different when the outlier is added. This highlights why Spearman is often called robust.

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.