Normalize centered products
Sxx and Syy are the corresponding squared-deviation sums. Both must be positive; the descriptive definition requires at least two paired observations.[1]
With consistent sample conventions the n−1 factors cancel. Mixing denominators n and n−1 would be wrong.[1]
The x and y values must be paired by case. Sorting just one series changes the pairs and therefore the question. r is dimensionless: the numerator’s unit XY cancels the same unit in the denominator. Descriptive calculation does not require normality; significance tests and confidence intervals for population correlation need additional assumptions.[1]
Why r lies between minus one and one
Put ui=xi−x̄ and vi=yi−ȳ. The sum Σ(ui−t vi)2 is nonnegative for every real t. As a quadratic in t it therefore cannot have two distinct real roots enclosing a negative region. Its discriminant gives Sxy2≤Sxx Syy. Dividing by the positive denominator gives |r|≤1. Equality holds precisely for proportional centered vectors, an exact line with nonzero slope.
Here b is the ordinary y-on-x regression slope with an intercept. A large slope alone does not mean large correlation.[2][1]
Positive linear unit conversions leave r unchanged. Reflecting exactly one axis by a negative factor reverses its sign; translations leave it unchanged. Correlation is symmetric in x and y, while a y-on-x regression slope is not. In simple regression with an intercept, R2=r2 is the explained fraction of the observed y squared-deviation sum. Do not extend this identity to every regression.[2]
An observed association does not identify a cause. A shared external influence may change both variables, while selection mechanisms or outliers may also shape the result. The coefficient alone does not distinguish these mechanisms. Inspect the scatterplot as well.[3]
A positive trend and a nonlinear relationship
Three pairs without a perfect line
- Given
- x=(0,1,2) and y=(1,2,2) are correctly paired observations.
- Find
- Calculate r and r2.
First state the general setup for the supplied quantities, then substitute the particular numbers.
Calculate means and centered sums.
Normalize the joint variation.
Report the square separately.
Result: r is about 0.866 and positive; r2 is 0.75. The three points do not lie exactly on one line.
Check: Under the sample convention sxy=1/2, sx=1 and sy=√(1/3). The ratio (1/2)/√(1/3)=√3/2 agrees. The regression slope is only 1/2, so it is a different quantity.
Zero correlation on an exact parabola
- Given
- The five pairs are (−2,4), (−1,1), (0,0), (1,1), (2,4), so y=x2. This is a manual five-pair example.
- Find
- Check whether r detects the exact nonlinear relationship.
First state the general setup for the supplied quantities, then substitute the particular numbers.
Find the centers.
Calculate the three centered sums.
Form the correlation ratio.
Result: Pearson correlation is zero although y is completely determined by x.
Check: Both squared-deviation sums are positive, so r is genuinely defined rather than failing because a series is constant. Symmetry cancels positive and negative products. A scatterplot immediately reveals the parabola.
Recall the method later with the formula’s flashcards.
9 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises on interpretation
Calculate · Foundation
Find r for x=(0,1,2), y=(4,2,0).
Show hint
Every point satisfies y=4−2 x.
Learning goal: Recognize a negative exact line.
Show solution and calculation
x̄=1, ȳ=2, Sxx=2, Syy=8 and Sxy=−4.
Hence r=−4/√16=−1.
The line is exact with negative slope.
Calculate · Foundation
sxy=6, sx2=4 and sy2=9. Find r.
Show hint
Take the positive root of each variance.
Learning goal: Normalize covariance using standard deviations.
Show solution and calculation
sx=2 and sy=3, so r=6/(2·3)=1.
Dividing by 4·9 would be wrong because the denominator uses standard deviations, not variances.
Error analysis · Application
x=(3,3,3), y=(1,2,4). Someone reports r=0. Is that correct?
Show hint
Calculate Sxx.
Learning goal: Recognize a constant series.
Show solution and calculation
Sxx=0, making the denominator zero. r is undefined.
Zero correlation would require two positive spreads and a zero numerator, as in the parabola example.
Interpret · Application
All x values are converted from kg to g. How does r change?
Show hint
The conversion factor 1000 is positive.
Learning goal: Check unit invariance.
Show solution and calculation
Sxy is multiplied by 1000 and √Sxx by 1000, so the factor cancels. r stays the same.
Regression slope per g would instead be 1000 times smaller.
Transfer · Challenge
r=−0.6, sx=2 and sy=5. Find slopes for y on x and x on y.
Show hint
b=r sy/sx; swap spreads for the other direction.
Learning goal: Connect r to both regression directions.
Show solution and calculation
The y-on-x slope is −0.6·5/2=−1.5; the x-on-y slope is −0.6·2/5=−0.24.
Their product is 0.36=r2 rather than one.
The fitted directions are inverse lines only when |r|=1.
Check your understanding with the formula’s reference test.
7 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Descriptive three-pair mode
The calculator accepts exactly three pairs and returns r or r2. It checks both positive squared-deviation sums and retains centered products rationally through the final root. It calculates neither significance nor population-correlation intervals and does not replace scatterplot inspection. The mathematical formulas and manual examples also apply to larger finite datasets. A rounded display of r=±1 or r2=1 alone does not prove exact collinearity; the calculator explicitly notes this if a strictly interior coefficient rounds to its boundary.
Linear regression complements unit-free correlation with a directional fitted line. Standard deviation describes each individual series. Sample variance explains the common n−1 denominator that cancels in consistently calculated correlation.
Sources for this explanation
Quanta · Updated November 1, 2026
- NIST Dataplot reference CORRELATION, page2-15: centered product-moment coefficient
- NIST Engineering Statistics Handbook §4.4.3.1: criterion, normal equations and straight-line estimators
- NIST Engineering Statistics Handbook §4.1.4.1: linear in parameters, outliers and extrapolation
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Authored a full German-English article with an original explanation, two worked examples and five varied exercises.
Cite this reference page
Quanta. Pearson Correlation Coefficient. Updated November 1, 2026. https://quanta-study.de/en/formula-sheet/pearson-korrelationskoeffizient
When citing a specific scientific statement, also cite the specialist source linked to that statement.