Tutorial Example

Compare Pearson Correlation Coefficient with Spearman Correlation Coefficient – Machine Learning Tutorial

As to Pearson Correlation Coefficient and Spearman Correlation Coefficient, both of them can meaure the relationship between two variables. However, there are some differences between them. In this tutorial, we will compare them and discuss these differences.

Firstly,  as to Pearson Correlation Coefficient and Spearman Correlation Coefficient, the value of them are in [-1, 1].

Differences between Pearson Correlation Coefficient and Spearman Correlation Coefficient

Pearson Correlation Coefficient measures the linear correlation of two variables. For example, as to \(R\) and \(S\). If they are strong correlation, \(R\) has increased 1, we can use an linear expression to calculate the increment of \(S\). However, Spearman Correlation Coefficient meause the nonlinear correlation, we can not use an linear expression to calculate the increment of \(S\).

Spearman Correlation Coefficient measures the monotonicity of \(R\) and \(S\). If \(R\) increases, \(S\) will also increase.

As to Pearson Correlation Coefficient, it usually needs two variables are:

However, Spearman Correlation Coefficient do not need.

Spearman’s correlation coefficient is not sensitive to noise data and extreme values. But pearson correlation coefficient is sensitive.