Correlation Calculator
Calculate the Pearson correlation coefficient (r) between two variables X and Y. Enter paired data points to measure the strength and direction of the linear relationship.
About this Calculator
Calculate the Pearson correlation coefficient (r) between two variables X and Y. Enter paired data points to measure the strength and direction of the linear relationship.
Formula & Calculations
Formula
r = Σ((x−x̄)(y−ȳ)) / √(Σ(x−x̄)² × Σ(y−ȳ)²); r² = coefficient of determinationWhere:
- x, y=Paired data points for variables X and Y
- x̄, ȳ=Means of X and Y respectively
- r=Pearson correlation coefficient (−1 to +1)
- r²=Coefficient of determination (proportion of variance explained)
Assumptions
- Both variables are continuous (interval or ratio scale).
- The relationship between X and Y is approximately linear.
- Data pairs are independent of each other.
- r = +1 indicates perfect positive correlation; r = −1 indicates perfect negative correlation; r = 0 indicates no linear correlation.
Calculation Examples
Example 1
Y is exactly 2X for all values, resulting in a perfect positive correlation.
Example 2
Y decreases exactly as X increases, resulting in a perfect negative correlation.
Frequently Asked Questions
What does the correlation coefficient r actually tell me?
Pearson's r measures both the direction and strength of the linear relationship between two variables. Values near +1 indicate a strong positive relationship (as X increases, Y increases). Values near −1 indicate a strong negative relationship (as X increases, Y decreases). Values near 0 suggest little to no linear relationship.
Does correlation imply causation?
No. Correlation measures association, not causation. Two variables may be strongly correlated because one causes the other, both are affected by a third variable (confounding factor), or the relationship is coincidental. Always consider study design and potential confounders before inferring causation.