Home/Statistics & Probability/Descriptive Statistics/Pearson Correlation Coefficient

Formula & Calculator

Pearson Correlation Coefficient

Measures the strength and direction of the linear relationship between two variables, standardized to range from -1 to +1.

StatisticsDescriptive StatisticsRelationships

Pearson Correlation Coefficient Calculatorr = Cov / (σX · σY)

r = Cov / ( σX · σY )
r = correlation coefficient  ·  Cov = covariance  ·  σX, σY = standard deviations
⟹ Solver, Cov, σX, σY
Please fix the errors above.
Solve for:
Presets:
Correlation Coefficient
r: Cov: σX: σY:
✓ Copied!
Correlation Gauge
Negative Zero Positive
r = Cov / (σX · σY)  ·  r ranges from -1 (perfect negative) to +1 (perfect positive).

Interpretation

r = Cov(X,Y) / (σX σY). Measures linear relationship between two variables, ranging from −1 to +1. 0 means no linear relationship. Used in regression and data analysis.

r = Cov(X,Y) / (σX * σY)
Pearson Correlation Coefficient

Variables

SymbolQuantityUnit
rPearson correlation coefficient
Cov(X,Y)Covariance of X and Y
σXStandard deviation of X
σYStandard deviation of Y

What it means

The Pearson correlation coefficient (r) is a standardised measure of the strength and direction of the linear relationship between two variables. It ranges from −1 (perfect negative linear) to +1 (perfect positive linear), with 0 indicating no linear correlation. It is the covariance divided by the product of the standard deviations. Correlation is widely used in data analysis, in finance (diversification), in medicine (association between risk factors), and in psychology. However, correlation does not imply causation. It is also sensitive to outliers. Understanding r is crucial for interpreting scatterplots and for building regression models. The square of r, R², represents the proportion of variance explained.

Worked example

Pearson Correlation – Two Examples

Real‑World
Scenario: Cov(X,Y)=15, σX=5, σY=4. Compute r.
ParameterValue
Cov15
σX5
σY4
1r = 15 / (5×4) = 15/20 = 0.75
Result 0.75 ✓ Strong positive correlation
Scenario: Cov=−10, σX=3, σY=4. Find r.
ParameterValue
Cov-10
σX3
σY4
1r = −10 / (3×4) = −10/12 = −0.8333
Result -0.8333 ✓ Strong negative correlation
Insight: Correlation coefficient r is unit‑less and ranges from −1 to +1. It measures strength and direction of linear relationship.

Common mistakes

  • Correlation coefficient r: Measures the strength and direction of a linear relationship.
  • Range: r is between −1 and +1 inclusive.
  • Units: r is dimensionless.
  • Causation: Correlation does not imply causation.
  • Outliers: Outliers can greatly affect the correlation coefficient.

Applications

The Pearson correlation coefficient (r) measures the strength and direction of a linear relationship between two variables, ranging from −1 to +1. It is one of the most used statistics in all disciplines. Engineers use it to validate simulation models, to assess relationships between input and output variables, and to design experiments. In finance, it diversifies portfolios. In medicine, it correlates risk factors with outcomes. By calculating r, professionals can quantify the degree of association, test hypotheses about relationships, and identify redundant predictors. The correlation coefficient is scale‑independent, making it interpretable across different units. It is a cornerstone of exploratory data analysis and predictive modelling.

  • Exploratory data analysis – identifying variable relationships
  • Model validation – comparing simulated and measured data
  • Finance – diversification and asset correlation
  • Medical research – linking risk factors to diseases
  • Quality control – process input‑output correlation

Frequently Asked Questions

Q01What is Pearson's correlation coefficient and what does it measure?
A01

r = Cov(X,Y) / (σX · σY). It measures the strength and direction of a linear relationship between two variables, ranging from −1 (perfect negative) to +1 (perfect positive).

Q02What does r = 0.8 indicate?
A02

It indicates a strong positive linear relationship. As X increases, Y tends to increase. The value 0.8 is close to 1, suggesting a strong association.

Q03What is the difference between correlation and causation?
A03

Correlation does not imply causation. Two variables can be highly correlated without one causing the other (e.g., ice cream sales and drowning incidents both increase in summer).

Q04How is the correlation coefficient influenced by outliers?
A04

Outliers can drastically affect Pearson's r. A single extreme point can inflate or deflate the correlation, making it misleading. Always check scatterplots.

Q05What are the assumptions for interpreting Pearson's r?
A05

  • Linear relationship
  • Continuous variables
  • Approximately normal distributions
  • No significant outliers
Violation of these can make r unreliable.

Q06How do you test the significance of a correlation coefficient?
A06

A t‑test is used: t = r√(n−2) / √(1−r²), with df = n−2. This tests whether the population correlation is zero.

Q07What is the coefficient of determination (R²)?
A07

R² = r² for simple linear regression. It represents the proportion of variance in Y explained by X. For r = 0.8, R² = 0.64, meaning 64% of the variance is explained.

Q08Can Pearson's r be used for non‑linear relationships?
A08

It is not suitable for non‑linear relationships; it will underestimate the strength. Spearman's rank correlation is better for monotonic, non‑linear relationships.

Q09What is the Fisher z‑transformation?
A09

The Fisher transformation is z = 0.5 ln((1+r)/(1−r)). It stabilises the variance and is used to construct confidence intervals for correlation coefficients.

Q10How is correlation used in feature selection for machine learning?
A10

Features with high correlation to the target are often selected, while highly correlated features among themselves may be redundant. Correlation matrices help in dimensionality reduction.