Pearson correlation

The Pearson correlation coefficient, denoted r, measures the strength and direction of a linear relationship between two quantitative variables. It ranges from -1 to 1: close to 0, there is no linear relationship. It does not detect nonlinear relationships, is sensitive to outliers and proves no causation.

Example

df['x'].corr(df['y'])  # Pearson correlation by default

Related concepts

The whole glossary