# When to use Pearson's test and when to use Spearman's test?

I want to do a correlation analysis on a dataset of 28 samples.

I want to correlate the age with the size of a reflex response.

But I don't understand whether I should use Pearson's or Spearman's test. Because I don't know whether my data can be considered "normally distributed" or not.

Shapiro Wilks "says" it is normally distributed, or rather I think can't prove it's not normally distributed (?), and the data points roughly follow the straight line in the Q-Q plots, but there are some "tails" I think is the expression at both ends, kurtosis -1,006. Here's the Q-Q-plot for age.

When I look at the data using histograms for both age and reflex they don't really look to be normally distributed. But the Shapiro-Wilks test can't disprove normality (0,033). Here's a histogram for age, it doesn't look normal distributed to me?

I guess I'm really just asking, should I use Pearson's or Spearman's?

If you have any questions, or need information, please ask I will be very greatful for any help I can get.

Edit: here's a scatter plot of age on the x-axis and reflex on the y-axis.

I'm also adding Q-Q-plot and histogram for the reflex-response. Shapiro Wilk 0,133

Edit 2: On request I have done a Pearson's and Spearman's correlation test. I have also inserted a graph with quadratic line and one with a spline.

Pearson: r = -0,501 (correlation is significant at the 0,01 level (2-tailed) p = 0,006

Spearman: rho = -0.423 (correlation is significant at the 0,005 level (2-tailed) P = 0,022

• Correlation involves two variables; here you apparently only discuss one of them!? Commented Oct 14, 2023 at 9:35
• General remark: Nothing is ever normally distributed. The best Shapiro-Wilks or any other test can ever do is to say whether data provide (strong) evidence against normality (in fact p=0.033 would count to some extent against normality). But neither does the Pearson test require data to be truly normal, otherwise you could never use it. The histogram shown doesn't show any dangerous violations of normality (e.g., outliers), so no reason not to use Pearson, but that's just one variable. Commented Oct 14, 2023 at 9:39
• Also Pearson und Spearman don't exactly test the same thing (Pearson measures deviations from linearity, Spearman measures deviations from monotonicity) and you may want to think about what is more relevant here. Commented Oct 14, 2023 at 9:41
• I'd do a scatterplot of the two variables first to see what is going on. Commented Oct 14, 2023 at 9:45
• Spearman's rho allows the researcher to quantity monotonic non-linear relationships. Something Pearono's correlation cannot do. Based on the scatterplot, the relationship is indeed non-linear monotonic (perhaps properly described by a spline or polynomial). Therefore, Spearman's rho is preferable. Commented Oct 14, 2023 at 10:06

Normality is not relevant. Neither Pearson's nor Spearman's correlation assumes that either variable is normally distributed. Pearson's measures the linear relationship; Spearman's the monotonic relationship. Use Pearson's if you are only interested in testing a linear relationship; use Spearman's if you are interested in any monotonic relationship. Note that there is no statistical test for this: It depends on what you are interested in or what theory suggests and so on.

In general, be very leery of any rules such as the one you give (the data is not normal, so I use Spearman). There are lots of cases where NEITHER Spearman nor Pearson will be right (e.g. when the relationship is not monotonic).

But your scatterplot seems to me to show a relationship that, while quite weak, is not even monotonic. Just from eyehalling it, it looks vaguely quadratic. You could try plotting either a quadratic or a spline and see. But, with such a small sample, it's going to be hard to draw any strong conclusion other than "there is not much of a relationship here."

EDIT: Christian is correct about the requirements for testing. See his comment.

• Using distribution theory of Pearson (for testing) actually formally does require normality, even though I agree that this doesn't mean that the data have to be really normal for using it. One could use a permutation test without normality though. Commented Oct 14, 2023 at 10:28
• @Peter Flom I have added a quadratic and spline to the original post. Commented Oct 14, 2023 at 11:20

The scatterplot suggests that there might be problems with testing Pearson. The largest observation along the y-axis looks outlying and may have a too big influence on Pearson. Also the relationship doesn't look linear (actually I'd not even be sure it is monotonic as one could suspect that first y goes a little bit up with increasing x, then down). One could try Spearman to see whether overall a probably decreasing trend of y with increasing y is significant, however even then I'd be careful not interpreting this as if the relation were indeed monotonic, which may well not be the case.

(Note that the null hypothesis of Spearman is independence and the alternative a monotonic relationship, but in reality there are situations were x and y are neither independent nor monotonically related, and the situation here may just be like this. There's a similar issue with Pearson testing independence against linearity.)

• I have added a Spearman's correlation analysis to the post. Commented Oct 14, 2023 at 11:18

Short answer: Use Pearson’s correlation when you are somewhat sure that the relationship is linear. In other words, almost always use Spearman’s $$\rho$$ unless you suspect the relationship is non-monotonic.

• The question whether there is a significant trend (i.e., significantly different from what is expected under independence) in one direction could be of interest even if the true relationship is non-monotonic, so I wouldn't say Spearman shouldn't be used then. Also typically in reality people don't know whether their relationship is linear, monotonic etc. Of course a significant Spearman should in such cases not be interpreted as saying "the relationship is in fact monotonic", but it still says something of potential interest. Commented Oct 14, 2023 at 12:13