Spearman rank correlation
Spearman rank correlation is a statistical method used to measure the strength and direction of the relationship between two variables. Unlike the Pearson correlation, which assesses linear relationships, Spearman evaluates how well the relationship between the variables can be described by a monotonic function. This means it looks at the ranks of the data rather than the actual values, making it useful for non-parametric data.
To calculate the Spearman rank correlation, each data point is assigned a rank, and then the correlation coefficient is computed based on these ranks. The result ranges from -1 to +1, where -1 indicates a perfect negative correlation, +1 indicates a perfect positive correlation, and 0 suggests no correlation.