Décimales maximales : 6 ; Au plus proche, égalités en s’éloignant de zéro
Strength
Strong positive
Coefficient of determination r²
0.963613
t statistic
14.555426
Degrees of freedom
8
p-value (two-sided)
4.865 × 10⁻⁷
Pairs n
10
r = 0.9816 is a strong positive linear association; r² = 0.9636, so a straight line accounts for 96.36% of the variation in y. p = 4.86 × 10⁻⁷: if there were no correlation in the population, a sample of 10 pairs would show one at least this strong with that probability. Correlation alone does not show that one variable causes the other.
y against x
PairsLeast-squares line
Comment le calcul est effectué S
Means
xˉ=4.3,yˉ=66.8
Sums of squares and cross-products
Sxx=48.1,Syy=993.6,Sxy=214.6
Corrélation
r=SxxSyySxy=48.1×993.6214.6=0.981638
Test statistic
t=r1−r2n−2=0.9816381−0.9636138=14.555426
Two-sided p-value
p=2P(T8>∣t∣)=4.86464×10−7
Assumes the pairs are independent and roughly bivariate normal.
À propos de Correlation coefficient calculator (Pearson and Spearman)
Pearson's r measures how closely paired values follow a straight line: r = Sxy/√(Sxx·Syy), the sum of cross-products of deviations from the two means divided by the square root of the product of the two sums of squares. It runs from −1, a perfect falling line, through 0 to +1, a perfect rising line. Spearman's ρ is Pearson's r computed on the ranks, so it measures any steadily rising or falling trend and is less affected by outliers. The p-value comes from t = r√((n − 2)/(1 − r²)) with n − 2 degrees of freedom.
The default pairs hours studied with exam scores for 10 students: r = 0.9816, r² = 0.9636 and p = 4.9 × 10⁻⁷, a strong positive association.
A correlation near 0 rules out only a straight-line relationship: y = x² for x from −3 to 3 has r = 0 exactly.
Exemples détaillés
Hours studied vs score (default)
x values
1, 2, 2, 3, 4, 5, 5, 6, 7, 8
y values
52, 55, 61, 58, 66, 70, 68, 75, 79, 84
Coefficient
Pearson r
Correlation coefficient
0.981638
Coefficient of determination r²
0.963613
t statistic
14.555426
Degrees of freedom
8
p-value (two-sided)
4.865 × 10⁻⁷
Strength
Strong positive
Source de vérification : Python fractions for Sxx, Syy, Sxy with a decimal square root; p from the closed-form Student t CDF for integer df (Abramowitz & Stegun 26.7.4)
Negative association
x values
10, 20, 30, 40, 50, 60
y values
8.1, 7.4, 7.9, 6.2, 5.8, 6.0
Coefficient
Pearson r
Correlation coefficient
-0.891042
t statistic
-3.925982
p-value (two-sided)
0.017161
Strength
Strong negative
Source de vérification : Python fractions with decimal square roots; p = 2·(1 − F_t(|t|; 4)) from the A&S 26.7.4 closed form
Spearman with tied ranks
x values
1, 2, 2, 3, 4, 5, 5, 6
y values
3, 1, 4, 4, 5, 9, 2, 6
Coefficient
Spearman ρ
Correlation coefficient
0.575768
t statistic
1.724946
p-value (two-sided)
0.135297
Degrees of freedom
6
Strength
Strong positive
Source de vérification : Python: ties averaged by hand (x ranks 1, 2.5, 2.5, 4, 5, 6.5, 6.5, 8), Pearson r of the ranks with fractions (Sxy = 95/4, Sxx = 41, Syy = 83/2), p from the A&S 26.7.4 t CDF
Perfect straight line
x values
1, 2, 3, 4
y values
3, 5, 7, 9
Coefficient
Pearson r
Correlation coefficient
1
Coefficient of determination r²
1
p-value (two-sided)
0
Strength
Strong positive
Source de vérification : y = 2x + 1 exactly, so r = 1 by definition and no sample could be more extreme
Questions
What does a correlation coefficient of 0.7 mean?
A fairly strong positive linear association: as x rises, y tends to rise, and r² = 0.49 says a straight line accounts for 49% of the variation in y. Cohen (1988) called r = 0.1 small, 0.3 medium and 0.5 large, and the Strength output uses those cut-offs. They are rough conventions from the behavioural sciences, so what counts as strong still depends on the field.
What is the difference between Pearson and Spearman correlation?
Pearson's r measures linear association using the values themselves; Spearman's ρ applies the same formula to their ranks, so it measures any monotonic trend. For y = x³ with x from 1 to 10, Spearman gives exactly 1 but Pearson gives 0.928. Spearman also resists outliers and suits ordinal data such as ratings, while Pearson's r is the one that matches a least-squares line.
Does correlation imply causation?
No. A correlation shows that two variables move together, not why. A third variable can drive both, as hot weather raises both ice-cream sales and drownings. The cause can also run the other way, or the pattern can be chance: test 20 unrelated pairs at α = 0.05 and about one will look significant. Showing cause takes a randomized experiment or a careful causal design.
How do you test whether a correlation is significant?
Convert r to t = r√((n − 2)/(1 − r²)) and compare it with a t distribution with n − 2 degrees of freedom. The default data give r = 0.9816 with n = 10, so t = 14.56 on 8 df and p = 4.9 × 10⁻⁷. Significance depends heavily on n: with 1,000 pairs, r = 0.07 already gives p = 0.027, although it explains under 0.5% of the variation.
Quelle est la précision de « Correlation coefficient calculator (Pearson and Spearman) » ?
La précision dépend de vos données et des hypothèses de la méthode. Le calcul décimal utilise 50 chiffres significatifs, mais les estimations, méthodes numériques et données sources peuvent être moins précises ; l’arrondi affiché ne supprime pas ces limites. Exemples résolus vérifiés à partir de sources indépendantes : 4. Par exemple, « Hours studied vs score (default) » est vérifié à l’aide de Python fractions for Sxx, Syy, Sxy with a decimal square root; p from the closed-form Student t CDF for integer df (Abramowitz & Stegun 26.7.4).
D’où vient cette méthode ?
NIST/SEMATECH e-Handbook of Statistical Methods, §7.1.3 / Dataplot CORRELATION (Pearson and rank correlation); Spearman (1904), The proof and measurement of association between two things, American Journal of Psychology 15; Cohen (1988), Statistical Power Analysis for the Behavioral Sciences, 2nd ed., §3.2 (r = 0.1, 0.3, 0.5).
Spearman (1904), The proof and measurement of association between two things, American Journal of Psychology 15
Cohen (1988), Statistical Power Analysis for the Behavioral Sciences, 2nd ed., §3.2 (r = 0.1, 0.3, 0.5)
Vérifié avec les références
Ce calculateur comprend 4 exemples résolus dont les réponses proviennent de sources indépendantes. Ils font partie de la suite de tests et peuvent aussi être exécutés ici.