Whether to use pearson's correlation coefficient or Spearman's correlation coefficient depends on what you want to measure ?
Pearson's correlation coefficient measures the strength of a linear relationship between two variables. The variables should be on an interval or ratio scale. Ordinal variables cannot be used in pearson's test. The variables should satisfy certain assumption before the pearson's product moment correlation is applied. They are:
- The variables should be approximately normally distributed
- There should be no significant outliers in the data
- The variables should have a linear relationship
In case, the variables do not satisfy these assumptions they can either be transformed to meet them or we can use the spearman's rank correlation coefficient to measure correlation.
The Spearman's method is primarily used when the data can be ranked, therefore correlation between ordinal, interval and ratio variables can be measured using this method. Also, this method measures the strength of a monotonic relationship between two variables.