Correlation Coefficient
GeneralPearson Correlation Coefficient (r)
A value between -1 and 1 (Pearson's r) that measures the strength and direction of a linear relationship between two variables.
Definition
The correlation coefficient, most commonly Pearson's r, is a value between -1 and 1 that measures the strength and direction of a linear relationship between two variables. A value near +1 indicates a strong positive relationship (as one variable increases, so does the other), a value near -1 indicates a strong negative relationship (as one increases, the other decreases), and a value near 0 indicates little to no linear relationship.
Correlation coefficients are widely used across finance, science, and social research to quantify how two variables move together — for example, the relationship between advertising spend and sales, or between temperature and ice cream sales. The Correlation Coefficient Calculator computes r directly from paired data points, and the closely related Covariance Calculator computes the unstandardized version of the same underlying relationship.
Correlation is also the foundation of simple linear regression: the Linear Regression Calculator fits a line through the data, and the square of the correlation coefficient gives the R-Squared value describing how much variance that line explains.
Formula
r = Σ[(x − x̄)(y − ȳ)] ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²]
Equivalently, r can be expressed using covariance and standard deviations:
r = Cov(X, Y) ÷ (σₓ × σᵧ)
Worked Example
Consider five paired data points of hours studied (x) and test scores (y): (1, 50), (2, 60), (3, 65), (4, 80), (5, 85).
Calculating the means (x̄ = 3, ȳ = 68), the deviations, and applying the formula yields:
r ≈ 0.99
This indicates an extremely strong positive linear relationship — more hours studied is very strongly associated with higher test scores in this sample.
Key Things to Know
- Only measures linear relationships: a strong curved (non-linear) pattern can produce a correlation coefficient near 0 even though the variables are clearly related.
- Squares to give R-Squared: in simple linear regression, r² tells you the proportion of variance explained by the model.
- Doesn't imply causation: high correlation only shows association, never proof that one variable causes changes in the other.
- Sensitive to outliers: a single extreme data point can substantially inflate or deflate the correlation coefficient, especially in small samples.
- Related to covariance: correlation is covariance standardized by the two variables' standard deviations, putting it on a fixed -1 to 1 scale for easy comparison.
Related Calculators
Frequently Asked Questions