Correlation Coefficient Calculator
Calculate Pearson's r correlation coefficient between two variables. Measure the strength and direction of a linear relationship. Values range from -1 (perfect negative) to +1 (perfect positive).
Formula & Reference
| Variable | Symbol | Formula | Units |
|---|---|---|---|
| Correlation Coefficient Calculator | — | r = Σ[(x-x̄)(y-ȳ)] / (n⋅sx⋅sy) | dimensionless -1 to 1 |
Step-by-Step Examples
x: 160,165,170,175,180 (cm). y: 55,60,65,70,80 (kg).
- Calculate means: x̄=170, ȳ=66
- Numerator: Σ(xi-x̄)(yi-ȳ) = (-10)(-11)+(-5)(-6)+(0)(-1)+(5)(4)+(10)(14)
- = 110+30+0+20+140 = 300
- r = 300 / sqrt(250×394) = 300/313.8 = 0.956
Temp: 10,15,20,25,30. Sales: 20,30,40,50,70.
- Positive relationship: higher temp → more sales
- r ≈ 0.989
- Strong positive correlation
x: 1,2,3,4,5. y: 5,1,4,2,3 (random).
- Positive and negative deviations cancel out
- r ≈ -0.20
- Very weak, near-zero correlation
- No linear relationship
Real-World Applications
Common Mistakes to Avoid
r = 0.95 between X and Y means they move together linearly. It does NOT mean X causes Y. Always consider confounding variables and mechanism.
Two variables can have r = 0 but a perfect nonlinear relationship (e.g., U-shaped). Always plot your data first.
A single outlier can inflate r from 0.2 to 0.9 or deflate it from 0.9 to 0.3. Visualize data and check outliers before reporting r.
Frequently Asked Questions
Related Math Calculators
Formula Explorer connections
Interpretation: This formula summarizes data, models uncertainty or supports inference about a population or random process. Assumption: The sampling design and distribution assumptions must match the data. Independence, sample size, outliers and measurement quality can materially affect interpretation.