Correlation Test Calculator
Pearson's r
0.774597
Correlation Coefficient Calculator
Number of pairs
5
Coefficient of determination (r squared)
0.6
Spearman's rho
0.737865
Kendall's tau-b
0.67082
Cosine similarity
0.959651
Sample covariance
1.5
Population covariance
1.2
Mean of X
3
Mean of Y
4
Sample standard deviation of X
1.581139
Sample standard deviation of Y
1.224745
Sum of X
15
Sum of Y
20
Sum of XY
66
Sum of X squared
55
Sum of Y squared
86
Sxx (corrected sum of squares in X)
10
Syy (corrected sum of squares in Y)
6
Sxy (corrected sum of cross-products)
6
t statistic
2.12132
Two-sided p value
0.124027
Degrees of freedom
3
Significant at the chosen level
no - p = 0.124027 is not below alpha = 0.05
Fisher's z transform of r
1.031719
Lower confidence limit for rho
-0.340082
Upper confidence limit for rho
0.984236
Concordant pairs
7
Discordant pairs
1
Interpretation
strong positive
Worked out from NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.13 Correlation and Scatter Plots and 3 other sources.
With fewer than 10 pairs a correlation is very unstable; treat it as indicative only.
Ties are present. Spearman uses midranks and Kendall uses the tie-corrected tau-b, so both differ from the simple no-ties shortcut formulas.
Correlation measures association, not causation, and Pearson only detects linear association.
How this is worked out
7 steps
- n = 5 pairs. Mean of X = 3, mean of Y = 4.
- Sxx = sum (x - xbar)^2 = 10; Syy = 6; Sxy = sum (x - xbar)(y - ybar) = 6.
- r = Sxy / sqrt(Sxx x Syy) = 6 / sqrt(10 x 6) = 0.77459667
- Spearman's rho = Pearson's r applied to the midranks = 0.73786479
- Kendall: 7 concordant and 1 discordant pairs out of 10, giving tau-b = 0.67082039.
- t = r sqrt(n - 2) / sqrt(1 - r^2) = 2.12132034 on 3 degrees of freedom, two-sided p = 0.12402706.
- Fisher z = arctanh(r) = 1.03171853; 95% interval for rho = [-0.340082, 0.984236].
Results are general information, not financial, tax, legal, medical or engineering advice.