A practical guide on their difference, with examples!
A correlation coefficient measures how much two variables tend to change in relation to each other. The coefficient describes both the direction as well as the strength of the relationship. In this article we’ll go through two of the most popular correlation calculation methods: Pearson’s Correlation and Spearman’s Correlation.
Pearson’s correlation (P)
Pearson’s correlation (named after Karl Pearson) is used to show linear relationship between two variables. It is calculated as:
Pearson’s Correlation returns a value between [-1, 1], with 1 meaning full positive correlation and -1 full negative correlation.
Pearson’s Correlation uses mean and standard deviation in the calculation, which implies that it is a parametric method and it assumes a Gaussian-like distribution for the data.
Pearson’s Correlation is the most popular method of calculating correlation and it tends to be the default implementation in many programming languages. For example, if you run corr() method on a Pandas…