What Pearson’s r measures
Positive correlation means larger values of one variable tend to accompany larger values of the other in a linear pattern. Negative correlation means larger values of one tend to accompany smaller values of the other. A coefficient near zero indicates little linear association, not necessarily no relationship.
Inspect a scatter plot before interpreting the coefficient. NIST's scatter-plot guidance highlights patterns such as nonlinearity, changes in variation, and outliers that a single summary can conceal. [1]
The observations must be paired meaningfully. A person's height belongs with that same person's measurement of the other variable. Sorting each list independently before calculating correlation destroys those pairings.
The calculation in centered form
Subtract each variable's mean, multiply the paired deviations, and compare their sum with the spread of each variable.
r = Σ[(x − x̄)(y − ȳ)] ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²]
This form avoids needing a separate choice between sample and population covariance denominators because the matching factors cancel. Both variables must have nonzero variation. If every x-value or every y-value is identical, Pearson's r is undefined.
Changing units by a positive linear scale, such as centimeters to meters, does not change r. Multiplying one variable by a negative number reverses its sign.
Worked example with paired values
Use x-values 1, 2, 3, 4, and 5, paired with y-values 2, 1, 4, 3, and 5. Both means are 3. The sums of squared deviations are 10 for x and 10 for y, while the sum of cross-products is 8.
r = 8 ÷ √(10 × 10) = 0.8
This sample has a positive linear association. It does not tell us what the variables represent, whether either causes the other, or whether five observations support a stable population estimate.
A label such as “strong” is context-dependent. A coefficient useful in a noisy behavioral setting may be inadequate for a precision calibration task. Report the number and the context instead of treating one label scale as universal.
Correlation is not a causal design
Two variables can move together because one affects the other, because a third factor affects both, because of selection, or because of a shared time trend. The coefficient alone cannot distinguish those explanations.
For example, a business may find that larger customers receive more support and also renew more often. That does not by itself prove additional support caused the renewals; account size, product fit, and contract structure could influence both.
A causal question needs an appropriate design and assumptions, such as a well-conducted randomized experiment or a justified observational strategy. Adding a correlation coefficient to a chart does not provide that design.
Outliers and nonlinear patterns can mislead
A single extreme paired observation can substantially change r. Inspect whether it is a valid point, a data-entry error, or evidence of a separate process before deciding how to handle it.
A U-shaped relationship can have correlation near zero even when y is strongly determined by x. Restricting the range of one variable can also weaken an observed correlation. Mixing distinct groups can produce a pooled pattern different from the pattern within each group.
Rank-based correlation can help answer a monotonic-association question, but it is not an automatic fix for every nonlinear or confounded relationship. Choose the measure to fit the question.
Report uncertainty and limitations
A sample coefficient is an estimate, and its stability depends on sample size, the data distribution, independence, and the sampling process. With only two nonconstant paired observations, r is necessarily +1 or −1; that apparent perfection provides very little evidence.
When reporting r, include the number of complete pairs, what was excluded, the measurement units, and an appropriate plot. Confidence intervals or tests require additional assumptions beyond the descriptive correlation calculation.
Frequently asked questions
Does a correlation of zero mean there is no relationship?
No. Pearson correlation measures linear association. A strong nonlinear relationship can have a coefficient near zero.
Can Pearson correlation be calculated when one variable is constant?
No. The denominator contains that variable’s zero spread, making the coefficient undefined.
Does r squared always mean the percentage caused by one variable?
No. In a simple linear regression with an intercept, r squared describes the fraction of sample variation explained by that fitted linear model. It is not a causal percentage.
Sources & calculation notes
Primary references are linked below. Dates, limits, and product terms can change; confirm the applicable details before acting.
Use this guide thoughtfully. Examples illustrate a calculation method, not a guaranteed outcome. The usefulness of any result depends on the definitions, measurements, and assumptions used.