Pearson Correlation#
Pearson Correlation is a statistical measure that evaluates the strength and direction of the linear relationship between two continuous variables. The values range from -1 to +1. A value close to +1 indicates a strong positive linear correlation, where as one variable increases, the other also increases proportionally. A value close to -1 signifies a strong negative linear correlation, meaning as one variable increases, the other decreases proportionally. A value of 0 indicates no linear correlation between the variables.
Implementation Details#
The correlation coefficient is calculated by dividing the covariance of \(x\) and \(y\) by their individual standard deviations. This can be mathematically represented as:
where \(x\) and \(y\) are the collection of data points.
Examples#
Temperature Correlation:
Ground Truth Temperature (°C) | Predicted Temperature (°C) |
---|---|
25 | 27 |
35 | 28 |
30 | 30 |
Limitations and Biases#
Pearson Correlation is useful for measuring the strength and direction of linear relationships between variables. However, it assumes linearity and is sensitive to outliers, which can distort the results. In datasets with non-linear relationships or significant outliers, Pearson Correlation may not provide an accurate representation. For non-linear relationships, Spearman's Rank Correlation is a better choice.