Correlation Coefficient Calculator
Pearson correlation coefficient
r ≈ 0.96356
A very strong positive linear correlation (a rule of thumb): r² ≈ 0.92844 means about 92.844% of the variation in y goes with x along a straight line, from 10 pairs. p ≈ 7.3835 × 10⁻⁶, below 0.05, so r is statistically significant at the 5% level. The 95% confidence interval for r is ≈ 0.84901 to 0.99160. Spearman rank correlation: ρ ≈ 0.96341.
Pearson correlation
- Pearson correlation coefficient (r)
- ≈ 0.96356
- Coefficient of determination (r²)
- ≈ 0.92844
- r² as a percentage
- ≈ 92.844%
- Strength (rule of thumb)
- Very strong, positive
- t statistic
- ≈ 10.188
- Degrees of freedom (n − 2)
- 8
- p-value (two-tailed)
- ≈ 7.3835 × 10⁻⁶
- 95% confidence interval for r
- ≈ 0.84901 to 0.99160
Spearman rank correlation
- Spearman rank correlation (ρ)
- ≈ 0.96341
- Strength (rule of thumb)
- Very strong, positive
- t statistic
- ≈ 10.167
- p-value (two-tailed)
- ≈ 7.4992 × 10⁻⁶
- Tied values
- x: 2 values in 1 tie group; y: 2 values in 1 tie group
The p-value uses the t distribution with n − 2 degrees of freedom, the usual approximation for ρ (SciPy’s spearmanr does the same); it is less reliable with fewer than about 10 pairs or many ties.
Working sums
- Number of pairs (n)
- 10
- Mean of x (x̄)
- 4.52
- Mean of y (ȳ)
- 24.1
- Sxx = Σ(x − x̄)²
- 25.096
- Sxy = Σ(x − x̄)(y − ȳ)
- 95.68
- Syy = Σ(y − ȳ)²
- 392.9
- Σx
- 45.2
- Σy
- 241
- Σx²
- 229.4
- Σy²
- 6,201
- Σxy
- 1,185
Scatter plot
How strong is the correlation?
| |r| (or |ρ|) | Label | r² (or ρ²) | Your data |
|---|---|---|---|
| 0.00 to below 0.20 | Very weak | 0 to below 0.04 | |
| 0.20 to below 0.40 | Weak | 0.04 to below 0.16 | |
| 0.40 to below 0.60 | Moderate | 0.16 to below 0.36 | |
| 0.60 to below 0.80 | Strong | 0.36 to below 0.64 | |
| 0.80 to 1.00 | Very strong | 0.64 to 1 | Pearson r and Spearman ρ |
These labels are a rough convention, not a law: what counts as strong depends on the field, and a small n can make even a large r a fluke. The p-value and the confidence interval above say how much to trust it.
Rank table for Spearman’s ρ
Equal values share the average of the ranks they occupy, so a tie for ranks 2 and 3 gives both 2.5. Spearman’s ρ is Pearson’s r computed on these ranks.
| # | x | y | Rank of x | Rank of y |
|---|---|---|---|---|
| 1 | 2.1 | 14 | 1 | 1 |
| 2 | 2.8 | 18 | 2 | 3 |
| 3 | 3.4 | 17 | 3.5 | 2 |
| 4 | 3.4 | 22 | 3.5 | 4 |
| 5 | 4 | 24 | 5 | 5.5 |
| 6 | 4.7 | 24 | 6 | 5.5 |
| 7 | 5.2 | 27 | 7 | 7 |
| 8 | 5.9 | 31 | 8 | 9 |
| 9 | 6.5 | 29 | 9 | 8 |
| 10 | 7.2 | 35 | 10 | 10 |