What Is Pearson Correlation? (Definition)
The intuition is simple. Scatter both variables on a plot. If the points form a straight line sloping upward, r is close to +1. If they form a line sloping downward, r is close to −1. If the cloud of points has no clear direction, r is near zero. The formula turns that visual impression into a single number you can report, test for significance, and compare across studies.
Pearson correlation was developed as part of Francis Galton's work on regression to the mean in the 1880s and mathematically formalized by Karl Pearson in 1895 in the paper "Notes on regression and inheritance in the case of two parents." Ronald Fisher later derived the sampling distribution of r and the significance test used today. Background on these ideas is in the statistics and probability section of Statistics Fundamentals.
- Symbol: r (sample) or ρ (population, "rho")
- Range: −1 to +1 — values outside this range indicate a calculation error
- Direction: Positive r = variables move together; Negative r = variables move in opposite directions
- Magnitude: Closer to ±1 = stronger relationship; Closer to 0 = weaker relationship
- R-squared (r²): The proportion of variance in one variable explained by the other
- Only measures linear relationships: A curved or U-shaped relationship can give r ≈ 0 even when variables are strongly related
- Requires continuous data: Both variables must be interval or ratio scale
The Pearson Correlation Formula
There are two equivalent versions of the formula — the definitional form using deviations from the mean, and the computational form using raw sums. Both give the same answer; the definitional form makes the concept clearest.
Definitional Formula
xᵢ = each x value
ȳ = mean of y
x̄ = mean of x
yᵢ = each y value
n = number of pairs
Σ = sum over all pairs
In words: compute how much each observation deviates from its variable's mean, multiply those deviations together for each pair, sum across all pairs (the numerator), then divide by the square root of the product of the total squared deviations in x and y (the denominator). The denominator rescales the result to lie between −1 and +1 regardless of the original units.
Computational (Raw Score) Formula
n = sample size
Σxy = sum of x×y products
Σx, Σy = sums of each variable
Σx², Σy² = sum of squared values
The computational form is faster when doing arithmetic by hand because you do not need to subtract the mean at each step. Both are formally derived in the NIST Engineering Statistics Handbook and in most introductory statistics textbooks such as Moore, McCabe, and Craig's Introduction to the Practice of Statistics.
How to Interpret Pearson's r
A number alone is incomplete. Interpretation requires three things: the sign (direction), the magnitude (strength), and context about the field. A correlation of 0.30 means something different in clinical psychology, where individual variation is enormous, than in precision manufacturing, where tight tolerances are the norm.
The most widely cited framework comes from Jacob Cohen's 1988 book Statistical Power Analysis for the Behavioral Sciences. His benchmarks apply primarily to the social and behavioral sciences. The table below shows those thresholds alongside what each range means in practice.
Understanding R-squared (r²)
Squaring the correlation coefficient gives r², called the coefficient of determination. This is the proportion of variance in one variable that is statistically associated with variance in the other. For example, r = 0.70 gives r² = 0.49, meaning 49% of the variation in y is accounted for by its linear relationship with x.
Positive Correlation Examples
A positive correlation means both variables tend to increase together. The following examples use original datasets computed specifically for this page. Each dataset contains ten paired observations — realistic figures drawn from the relevant research literature.
Example 1 — Study Hours vs. Exam Scores
Students who spend more time studying typically earn higher exam scores. This is one of the most studied correlations in educational psychology. The dataset below represents a class of ten students.
Original Dataset: Study Hours (x) vs. Exam Score % (y)
| Student | Study Hours (x) | Exam Score % (y) | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|---|---|---|---|---|---|---|
| A | 2 | 55 | −4 | −20 | 80 | 16 | 400 |
| B | 3 | 62 | −3 | −13 | 39 | 9 | 169 |
| C | 4 | 68 | −2 | −7 | 14 | 4 | 49 |
| D | 4 | 71 | −2 | −4 | 8 | 4 | 16 |
| E | 5 | 73 | −1 | −2 | 2 | 1 | 4 |
| F | 6 | 77 | 0 | 2 | 0 | 0 | 4 |
| G | 7 | 82 | 1 | 7 | 7 | 1 | 49 |
| H | 8 | 85 | 2 | 10 | 20 | 4 | 100 |
| I | 9 | 90 | 3 | 15 | 45 | 9 | 225 |
| J | 12 | 87 | 6 | 12 | 72 | 36 | 144 |
| Σ | 60 | 750 | — | — | 287 | 84 | 1160 |
x̄ = 60/10 = 6.0 hours | ȳ = 750/10 = 75.0%
Sum of cross-products (numerator): Σ[(xᵢ − x̄)(yᵢ − ȳ)] = 80 + 39 + 14 + 8 + 2 + 0 + 7 + 20 + 45 + 72 = 287
Sum of squared deviations for x: Σ(xᵢ − x̄)² = 16 + 9 + 4 + 4 + 1 + 0 + 1 + 4 + 9 + 36 = 84
Sum of squared deviations for y: Σ(yᵢ − ȳ)² = 400 + 169 + 49 + 16 + 4 + 4 + 49 + 100 + 225 + 144 = 1160
Apply the formula:
r = 287 / √(84 × 1160) = 287 / √97440 = 287 / 312.2 = r = 0.92
✅ Interpretation: r = 0.92 indicates a strong positive linear relationship. r² = 0.846, meaning about 85% of the variance in exam scores is explained by study hours. This is consistent with research findings: in a 2020 meta-analysis published in Review of Educational Research, study time was among the strongest predictors of academic performance.
Scatter Plot — Study Hours vs. Exam Score (r = 0.92)
Example 2 — Height vs. Weight
Taller people tend to weigh more. This relationship appears across populations and is a standard example in introductory statistics courses. Data below uses adult measurements in metric units.
Original Dataset: Height in cm (x) vs. Weight in kg (y)
| Person | Height cm (x) | Weight kg (y) | x² | y² | xy |
|---|---|---|---|---|---|
| 1 | 155 | 52 | 24025 | 2704 | 8060 |
| 2 | 160 | 58 | 25600 | 3364 | 9280 |
| 3 | 163 | 61 | 26569 | 3721 | 9943 |
| 4 | 167 | 65 | 27889 | 4225 | 10855 |
| 5 | 170 | 68 | 28900 | 4624 | 11560 |
| 6 | 173 | 72 | 29929 | 5184 | 12456 |
| 7 | 175 | 74 | 30625 | 5476 | 12950 |
| 8 | 178 | 80 | 31684 | 6400 | 14240 |
| 9 | 182 | 85 | 33124 | 7225 | 15470 |
| 10 | 188 | 92 | 35344 | 8464 | 17296 |
| Σ | 1711 | 707 | 293689 | 51387 | 122110 |
Numerator: nΣxy − (Σx)(Σy) = 10×122110 − 1711×707 = 1221100 − 1209677 = 11423
Denominator part 1: nΣx² − (Σx)² = 10×293689 − 1711² = 2936890 − 2927521 = 9369
Denominator part 2: nΣy² − (Σy)² = 10×51387 − 707² = 513870 − 499849 = 14021
Calculate r: r = 11423 / √(9369 × 14021) = 11423 / √131346549 = 11423 / 11461.1 = r = 0.997
✅ Interpretation: r = 0.997 is an extremely strong positive correlation. Height and weight are almost perfectly linearly related in this dataset. In practice, population-level correlations between adult height and weight typically range from r = 0.60 to r = 0.70, with greater scatter from differences in body composition, age, and sex — the high value here reflects a small, homogeneous illustrative sample.
Example 3 — Advertising Spend vs. Sales Revenue
Businesses routinely examine whether advertising budgets translate into higher sales. A moderate-to-strong positive correlation is typical, though the relationship depends on the industry and advertising medium.
Monthly Ad Spend $'000 (x) vs. Sales Revenue $'000 (y) — 10 Months
| Month | Ad Spend (x) | Sales (y) | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|---|---|---|---|---|---|---|
| Jan | 10 | 80 | −8 | −40 | 320 | 64 | 1600 |
| Feb | 12 | 95 | −6 | −25 | 150 | 36 | 625 |
| Mar | 15 | 105 | −3 | −15 | 45 | 9 | 225 |
| Apr | 18 | 118 | 0 | −2 | 0 | 0 | 4 |
| May | 20 | 115 | 2 | −5 | −10 | 4 | 25 |
| Jun | 22 | 132 | 4 | 12 | 48 | 16 | 144 |
| Jul | 25 | 140 | 7 | 20 | 140 | 49 | 400 |
| Aug | 24 | 138 | 6 | 18 | 108 | 36 | 324 |
| Sep | 19 | 125 | 1 | 5 | 5 | 1 | 25 |
| Oct | 15 | 152 | −3 | 32 | −96 | 9 | 1024 |
| Σ | 180 | 1200 | — | — | 710 | 224 | 4396 |
x̄ = 18 | ȳ = 120 | r = 710 / √(224 × 4396) = 710 / √984704 = 710 / 992.3 = r = 0.716
✅ Interpretation: r = 0.716 indicates a strong positive relationship between advertising spend and sales. October is an outlier — high sales despite lower ad spend, possibly due to seasonal demand — which pulls r below 0.90. This illustrates why scatter plots should always accompany the correlation coefficient.
Example 4 — Household Income vs. Monthly Spending
Higher-income households tend to spend more each month. This relationship is studied by economists and market researchers and typically shows a strong positive correlation, though it flattens at higher income levels (suggesting the linear model is approximate).
Annual Household Income $'000 (x) vs. Monthly Spending $ (y)
| # | Income $k (x) | Spending $ (y) | xy | x² | y² |
|---|---|---|---|---|---|
| 1 | 35 | 1800 | 63000 | 1225 | 3240000 |
| 2 | 45 | 2100 | 94500 | 2025 | 4410000 |
| 3 | 55 | 2400 | 132000 | 3025 | 5760000 |
| 4 | 65 | 2600 | 169000 | 4225 | 6760000 |
| 5 | 75 | 2900 | 217500 | 5625 | 8410000 |
| 6 | 85 | 3100 | 263500 | 7225 | 9610000 |
| 7 | 100 | 3400 | 340000 | 10000 | 11560000 |
| 8 | 120 | 3700 | 444000 | 14400 | 13690000 |
| 9 | 150 | 4200 | 630000 | 22500 | 17640000 |
| 10 | 200 | 5000 | 1000000 | 40000 | 25000000 |
| Σ | 930 | 31200 | 3353500 | 110250 | 106080000 |
r = (10×3353500 − 930×31200) / √[(10×110250 − 930²)(10×106080000 − 31200²)]
= (33535000 − 29016000) / √[(1102500 − 864900)(1060800000 − 973440000)]
= 4519000 / √(237600 × 87360000) = 4519000 / √20758336000000 = 4519000 / 4556130 ≈ r = 0.99
✅ Interpretation: r = 0.99 in this dataset reflects an almost perfectly linear relationship. Income and spending are very tightly coupled here. Real survey data from sources such as the Bureau of Labor Statistics Consumer Expenditure Survey shows r values typically in the range 0.85–0.95, with more scatter at higher income levels where savings rates increase.
Negative Correlation Examples
A negative correlation means one variable tends to decrease as the other increases. The data points slope downward from left to right on a scatter plot. The following examples illustrate common negative correlations across different fields.
Example 5 — Exercise Frequency vs. Resting Heart Rate
People who exercise more consistently tend to have lower resting heart rates, because a conditioned heart pumps blood more efficiently. This is a well-established finding in exercise physiology.
Weekly Exercise Sessions (x) vs. Resting Heart Rate bpm (y)
| Person | Sessions/wk (x) | Resting HR bpm (y) | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 88 | −3.5 | 14.5 | −50.75 | 12.25 | 210.25 |
| 2 | 1 | 82 | −2.5 | 8.5 | −21.25 | 6.25 | 72.25 |
| 3 | 1 | 84 | −2.5 | 10.5 | −26.25 | 6.25 | 110.25 |
| 4 | 2 | 78 | −1.5 | 4.5 | −6.75 | 2.25 | 20.25 |
| 5 | 3 | 74 | −0.5 | 0.5 | −0.25 | 0.25 | 0.25 |
| 6 | 4 | 71 | 0.5 | −2.5 | −1.25 | 0.25 | 6.25 |
| 7 | 4 | 68 | 0.5 | −5.5 | −2.75 | 0.25 | 30.25 |
| 8 | 5 | 65 | 1.5 | −8.5 | −12.75 | 2.25 | 72.25 |
| 9 | 6 | 60 | 2.5 | −13.5 | −33.75 | 6.25 | 182.25 |
| 10 | 9 | 65 | 5.5 | −8.5 | −46.75 | 30.25 | 72.25 |
| Σ | 35 | 735 | — | — | −202.5 | 66.5 | 776.5 |
x̄ = 3.5 | ȳ = 73.5 | r = −202.5 / √(66.5 × 776.5) = −202.5 / √51636.25 = −202.5 / 227.2 = r = −0.89
✅ Interpretation: r = −0.89 indicates a strong negative linear relationship. As exercise sessions per week increase, resting heart rate tends to decrease. The American Heart Association defines a healthy resting HR as 60–100 bpm; endurance athletes can have resting HR as low as 40 bpm, consistent with this pattern.
Scatter Plot — Exercise Sessions vs. Resting Heart Rate (r = −0.89)
Example 6 — Temperature vs. Heating Bills
As outdoor temperatures rise, households use less heating, so energy bills fall. This is a straightforward negative correlation observed across utility data in temperate climates.
Average Monthly Temperature °C (x) vs. Heating Bill $ (y) — 10 Months
| Month | Temp °C (x) | Heating $ (y) | xy | x² | y² |
|---|---|---|---|---|---|
| Jan | −5 | 280 | −1400 | 25 | 78400 |
| Feb | −2 | 250 | −500 | 4 | 62500 |
| Mar | 5 | 190 | 950 | 25 | 36100 |
| Apr | 10 | 140 | 1400 | 100 | 19600 |
| May | 16 | 85 | 1360 | 256 | 7225 |
| Jun | 22 | 30 | 660 | 484 | 900 |
| Jul | 26 | 15 | 390 | 676 | 225 |
| Aug | 25 | 18 | 450 | 625 | 324 |
| Sep | 18 | 60 | 1080 | 324 | 3600 |
| Oct | 8 | 165 | 1320 | 64 | 27225 |
| Σ | 123 | 1233 | 5710 | 2583 | 236099 |
r = (10×5710 − 123×1233) / √[(10×2583 − 123²)(10×236099 − 1233²)]
= (57100 − 151659) / √[(25830 − 15129)(2360990 − 1520289)]
= −94559 / √(10701 × 840701) = −94559 / √8996240001 ≈ −94559 / 94849 ≈ r = −0.997
✅ Interpretation: r = −0.997 is an extremely strong negative correlation — nearly perfect. Temperature is an almost perfect linear predictor of heating costs over this range. This makes practical sense: heating demand responds directly and predictably to outdoor temperatures over a typical seasonal range.
Example 7 — Hours of Sleep vs. Cognitive Performance
Sleep deprivation impairs working memory, reaction time, and decision-making. Research consistently shows that people who sleep fewer hours perform worse on cognitive tasks. The dataset below uses a simulated study modeled on findings from the Journal of Sleep Research.
Hours of Sleep (x) vs. Cognitive Error Rate % (y)
Note: Higher y = more errors = worse performance. So more sleep → fewer errors = negative correlation.
| # | Sleep hrs (x) | Error Rate % (y) | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|---|---|---|---|---|---|---|
| 1 | 4 | 42 | −3 | 18.3 | −54.9 | 9 | 334.89 |
| 2 | 4.5 | 38 | −2.5 | 14.3 | −35.75 | 6.25 | 204.49 |
| 3 | 5 | 33 | −2 | 9.3 | −18.6 | 4 | 86.49 |
| 4 | 5.5 | 30 | −1.5 | 6.3 | −9.45 | 2.25 | 39.69 |
| 5 | 6 | 26 | −1 | 2.3 | −2.3 | 1 | 5.29 |
| 6 | 6.5 | 22 | −0.5 | −1.7 | 0.85 | 0.25 | 2.89 |
| 7 | 7 | 20 | 0 | −3.7 | 0 | 0 | 13.69 |
| 8 | 7.5 | 17 | 0.5 | −6.7 | −3.35 | 0.25 | 44.89 |
| 9 | 8 | 14 | 1 | −9.7 | −9.7 | 1 | 94.09 |
| 10 | 9 | 11 | 2 | −12.7 | −25.4 | 4 | 161.29 |
| Σ | 63 | 253 | — | — | −158.6 | 28 | 987.7 |
x̄ = 6.3 | ȳ = 25.3 | r = −158.6 / √(28 × 987.7) = −158.6 / √27655.6 = −158.6 / 166.3 ≈ r = −0.954
✅ Interpretation: r = −0.954 is a strong negative correlation. More sleep hours are associated with fewer cognitive errors. This direction is consistent with an extensive body of sleep science research. The relationship does plateau around 8–9 hours: sleeping 10 hours does not necessarily outperform 8, which is why a linear model may be approximate at the extremes.
Zero (No Linear) Correlation Examples
A correlation near zero means there is no consistent linear relationship between the two variables. Zero correlation does not mean the variables are unrelated — they could have a strong curved (non-linear) relationship that Pearson's r fails to detect.
Example 8 — Shoe Size vs. Annual Salary
Adult Shoe Size (x) vs. Annual Salary $'000 (y) — n = 10
| # | Shoe Size (x) | Salary $k (y) | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|---|---|---|---|---|---|---|
| 1 | 6 | 52 | −2 | −11 | 22 | 4 | 121 |
| 2 | 6.5 | 80 | −1.5 | 17 | −25.5 | 2.25 | 289 |
| 3 | 7 | 48 | −1 | −15 | 15 | 1 | 225 |
| 4 | 7.5 | 67 | −0.5 | 4 | −2 | 0.25 | 16 |
| 5 | 8 | 55 | 0 | −8 | 0 | 0 | 64 |
| 6 | 8 | 72 | 0 | 9 | 0 | 0 | 81 |
| 7 | 8.5 | 63 | 0.5 | 0 | 0 | 0.25 | 0 |
| 8 | 9 | 45 | 1 | −18 | −18 | 1 | 324 |
| 9 | 9.5 | 90 | 1.5 | 27 | 40.5 | 2.25 | 729 |
| 10 | 10 | 58 | 2 | −5 | −10 | 4 | 25 |
| Σ | 80 | 630 | — | — | 22 | 15 | 1874 |
x̄ = 8.0 | ȳ = 63.0 | r = 22 / √(15 × 1874) = 22 / √28110 = 22 / 167.7 ≈ r = 0.13
✅ Interpretation: r = 0.13 is negligible — essentially zero. Shoe size has no meaningful linear relationship with salary. This example illustrates why it is important to choose variables with a plausible causal or theoretical connection before running a correlation analysis.
More Real-Life Pearson Correlation Examples
The following examples are reported as summary results with interpretations rather than full worked arithmetic, to cover a broader set of fields. Each describes a common application and gives a typical r value from the research literature.
Example 9 — IQ Score vs. Academic GPA (Psychology)
Case Study — Educational Psychology
IQ and Academic Achievement
Researchers studying cognitive predictors of academic performance measure the correlation between standardized IQ scores and cumulative GPA across a sample of college students. Meta-analyses in educational psychology consistently find correlations in this range.
Interpretation: A moderate positive correlation. IQ is one predictor of academic performance, but 75% of GPA variance is explained by other factors — study habits, motivation, subject interest, instructional quality, and socioeconomic factors. This shows why a correlation of 0.50, though meaningful, does not allow precise individual-level prediction.
Example 10 — Website Visitors vs. Conversions (Digital Marketing)
Case Study — Digital Marketing
Traffic and Conversion Rate
A digital marketing team tracks monthly website visitors and the number of conversions (purchases, sign-ups) over 12 months. They want to know whether more traffic reliably produces more conversions, or whether conversion rate fluctuates independently.
Interpretation: A strong positive correlation. Higher traffic volumes tend to produce more conversions, but the relationship is imperfect — campaign quality, landing page effectiveness, and seasonality all affect whether a visitor converts. Using this correlation, the team can forecast conversion volume from planned traffic targets, with appropriate uncertainty bounds from a confidence interval.
How to Calculate Pearson Correlation Step by Step
The manual calculation uses the definitional formula and follows these steps consistently. The same procedure applies regardless of the field or variable names.
Collect Paired Data
Each observation must consist of two measurements taken from the same unit (person, time period, location). Record n paired (xᵢ, yᵢ) values. Both variables must be continuous (interval or ratio scale). Check for obvious data entry errors before computing.
Compute the Means (x̄ and ȳ)
Sum all x values and divide by n to get x̄. Repeat for y to get ȳ. These are the reference points from which deviations are measured. The formula for the mean is covered in the mean guide.
Compute the Deviations
For each observation, calculate (xᵢ − x̄) and (yᵢ − ȳ). These are the deviations from the mean. Verify that the sum of each deviation column equals zero — this is a useful arithmetic check.
Compute the Products and Squares
For each pair, calculate the cross-product (xᵢ − x̄)(yᵢ − ȳ) and the squared deviations (xᵢ − x̄)² and (yᵢ − ȳ)². Then sum each of those three columns to get Σ[(xᵢ − x̄)(yᵢ − ȳ)], Σ(xᵢ − x̄)², and Σ(yᵢ − ȳ)².
Apply the Formula
r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²]. The result must be between −1 and +1. If yours falls outside this range, recheck your arithmetic — this cannot happen with a correct calculation.
Test for Statistical Significance
Use the t-statistic: t = r√(n − 2) / √(1 − r²), with n − 2 degrees of freedom. Compare to a critical value from the t-distribution table. At α = 0.05 with n = 10, the critical value is approximately ±2.306. If |t| exceeds this, the correlation is statistically significant. Full critical values are in the Pearson correlation critical values table.
Interpret the Result in Context
State the direction (positive or negative), magnitude (using Cohen's benchmarks), the r² value, whether the result is statistically significant, and what this means for the research question. Correlation does not establish causation — see the correlation vs. causation guide.
Calculating in R, Python, Excel, and SPSS
R
cor(x, y, method = "pearson")
Returns r directly. For significance: cor.test(x, y)
Python (SciPy)
from scipy import stats
r, p = stats.pearsonr(x, y)
Returns r and two-tailed p-value.
Excel
=CORREL(array1, array2)
Or use Data → Data Analysis → Correlation for a full matrix.
SPSS
Analyze → Correlate → Bivariate. Select Pearson. Output includes r, n, and two-tailed significance for each pair.
Pearson Correlation Assumptions
Pearson's r is only appropriate when specific conditions are met. Violating these conditions can produce a correlation coefficient that misrepresents the actual relationship between variables.
Pearson's r can be computed for any two numeric variables, but the result is only meaningful when the assumptions below are satisfied. Always plot your data first — a scatter plot reveals violations that the formula cannot detect.
| Assumption | What It Means | How to Check |
|---|---|---|
| Continuous data | Both variables are interval or ratio scale — not ordinal, nominal, or binary | Check measurement scale of each variable |
| Linear relationship | The relationship between x and y is linear (straight-line), not curved | Inspect the scatter plot for a curved pattern |
| Bivariate normality | Both variables are approximately normally distributed (especially for hypothesis testing) | Histograms, Q-Q plots, normality tests |
| No extreme outliers | Outliers can inflate or deflate r substantially — a single outlier can change r by 0.3 or more | Scatter plot, outlier detection |
| Homoscedasticity | The spread of y values should be roughly constant across all values of x | Scatter plot — look for funnel or fan patterns |
| Independent observations | Each data pair is independent — no repeated measures or time-series autocorrelation | Study design; use paired t-test or time-series methods if needed |
When these assumptions are violated, the Spearman rank correlation is often a better choice. Spearman makes no assumption of normality, is less sensitive to outliers, and works with ordinal data — at the cost of slightly less statistical power when the Pearson assumptions are met.
Comparison Tables
Pearson vs. Spearman Correlation
| Feature | Pearson (r) | Spearman (ρ) |
|---|---|---|
| What it measures | Strength of linear relationship | Strength of monotonic relationship |
| Data type required | Continuous (interval/ratio) | Ordinal, interval, or ratio |
| Normality required | Yes (for inference) | No |
| Sensitive to outliers | Yes — substantially | Less sensitive (uses ranks) |
| Works with non-linear relationships | No — misses curves | Yes, if monotonic |
| Formula | Based on means and standard deviations | Based on rank differences |
| Use when | Continuous, normal data, linear trend expected | Ordinal data, outliers present, or normality violated |
| Statistical power | Higher when assumptions are met | Slightly lower under ideal conditions |
Correlation vs. Causation
A significant Pearson correlation tells you two variables are associated — not that one causes the other. Ice cream sales and drowning rates are positively correlated (r ≈ 0.80 in summer months) because both are driven by a third variable: hot weather. Always consider confounding variables, reverse causation, and chance findings before drawing causal conclusions. See the full guide on correlation vs. causation.
| Aspect | Correlation | Causation |
|---|---|---|
| What it shows | Statistical association between two variables | One variable directly produces change in another |
| Evidence strength | Can be established from observational data | Requires controlled experiments or strong causal theory |
| Confounding | May be driven by a third variable | Controlled experiments eliminate confounders |
| Direction | Bidirectional — does not specify which causes which | Directional — cause precedes effect |
| Example | r = 0.85 between shoe size and reading ability in children (both caused by age) | Smoking causes lung cancer (established via randomized evidence and mechanism) |
The CORRELATE Framework
The CORRELATE framework provides a structured procedure for applying Pearson correlation correctly in any analytical context. It is designed to prevent the most common mistakes: computing r without checking assumptions, reporting r without p-values, and confusing correlation with causation.
An 8-step protocol developed by Statistics Fundamentals to standardize how Pearson correlation is applied and reported across fields.
Collect Paired Data
Ensure you have n paired continuous measurements. Both variables must come from the same unit of observation. Define the research question before collecting data to avoid data dredging.
Observe the Scatter Plot
Plot y against x before computing any statistic. Look for linearity, outliers, heteroscedasticity (funnel shapes), and curvature. A scatter plot often tells you more than the correlation coefficient alone.
Review Assumptions
Confirm continuous scale, approximate normality, no extreme outliers, and homoscedasticity. If assumptions are violated, consider Spearman correlation or data transformation before proceeding.
Run the Pearson Correlation
Apply the formula manually using the worked-example method above, or use statistical software (R, Python, SPSS, Excel). Always record n alongside r — a correlation of 0.80 from n = 5 is far less reliable than from n = 500.
Evaluate Strength
Classify r using Cohen's (1988) benchmarks: |r| ≥ 0.50 strong, 0.30–0.49 moderate, 0.10–0.29 weak. Compute r² to understand how much shared variance the correlation explains.
Look for Significance
Test whether r differs significantly from zero using t = r√(n − 2)/√(1 − r²) with df = n − 2. Report the p-value and confidence interval for r, not just the correlation alone. Use the Pearson correlation table for critical values.
Apply Interpretation
State the direction (positive or negative), magnitude (weak/moderate/strong), r², significance, and what the result means for your specific question. Reference field-specific norms — what is "strong" in psychology may be "weak" in physics.
Translate to Real-World Meaning
Convert the statistical finding into language accessible to a non-specialist audience. Example: "Students who studied one additional hour per day scored about 4 percentage points higher on average" is clearer than "r = 0.92."
Explain Limitations
State what the correlation does not tell you: it does not establish causation, it only measures linear relationships, it is affected by outliers, and it may not generalize beyond the sample studied. Mention any violated assumptions.
When to Use (and Not Use) Pearson Correlation
Decision Guide — Is Pearson Correlation the Right Choice?
Common Mistakes with Pearson Correlation
| Common Mistake | What Is Wrong | Correct Approach |
|---|---|---|
| "r = 0.85, so one variable causes the other" | Confuses association with causation | Report as association only; use experimental design or causal inference methods to establish causation |
| "r = 0 means the variables are unrelated" | Zero linear correlation does not rule out a strong curved relationship | Plot the data — Anscombe's quartet famously shows four datasets with identical r but very different patterns |
| "A significant p-value means a large effect" | With large n, even r = 0.05 can be statistically significant | Always report r and r² alongside the p-value; significance and practical importance are not the same |
| Using Pearson with ordinal data (e.g., Likert scales) | Ordinal data does not have equal intervals; Pearson assumes continuous scale | Use Spearman correlation or polychoric correlation for ordinal variables |
| Not checking for outliers before computing r | A single outlier can inflate or deflate r by 0.2–0.5 in small samples | Always plot the data first; report results with and without outliers when they are present |
| Reporting only r without sample size or p-value | r = 0.70 from n = 5 is not reliable; from n = 500 it is | Always report: r, n, p-value, and ideally a 95% confidence interval for r |
Entity and Formula Glossary
| Term | Symbol | Definition |
|---|---|---|
| Pearson Correlation | r | A measure of the strength and direction of the linear relationship between two continuous variables. Ranges from −1 to +1. |
| Correlation Coefficient | r or ρ | Generic term for a standardized measure of association; Pearson's r is the most common form for continuous data. |
| Scatter Plot | — | A graph plotting paired data as points, with x on the horizontal axis and y on the vertical axis. Used to visualize correlation direction and linearity. |
| Positive Correlation | r > 0 | Both variables tend to increase together. Example: study hours and exam scores. |
| Negative Correlation | r < 0 | One variable increases as the other decreases. Example: exercise frequency and resting heart rate. |
| Zero Correlation | r ≈ 0 | No consistent linear relationship. Example: shoe size and salary. |
| Covariance | Cov(x,y) | The unnormalized version of Pearson correlation: Cov(x,y) = Σ[(xᵢ−x̄)(yᵢ−ȳ)]/(n−1). Pearson r normalizes this by the standard deviations. |
| R-squared | r² | The coefficient of determination. The proportion of variance in y explained by its linear relationship with x. |
| Outlier | — | A data point that falls far from the general pattern. Can substantially change the value of r, especially in small samples. |
| p-value | p | The probability of observing a correlation as extreme as r by chance if the true population correlation is zero. See the p-values guide. |
| Statistical Significance | p < α | The correlation is unlikely to have occurred by chance alone at the chosen significance level α (usually 0.05). |
| Confidence Interval | — | A range of plausible values for the true population correlation ρ, computed via Fisher's z-transformation. A 95% CI means 95% of such intervals contain the true ρ. See the confidence intervals guide. |
| Linear Relationship | — | A relationship that can be represented by a straight line on a scatter plot. Pearson r measures only this type of relationship. |
| Correlation Matrix | — | A table showing Pearson r values for all pairs of variables in a dataset. Used in multivariate analysis and factor analysis. |
| Karl Pearson | — | British statistician (1857–1936) who mathematically formalized the correlation coefficient in 1895. Also developed the chi-square goodness-of-fit test. |
| Spearman Correlation | ρ | A rank-based alternative to Pearson correlation, suitable for ordinal data or when Pearson assumptions are violated. See the Spearman correlation guide. |
Pearson Correlation Calculator
Enter paired x and y values below, one pair per line separated by a comma (e.g., 5, 72). The calculator computes r, r², the t-statistic, and the interpretation.
Interactive Pearson Correlation Calculator
Real-World Applications of Pearson Correlation
Pearson correlation appears across virtually every quantitative field. Below are the most common application areas, with the types of variable pairs typically studied and the correlations found in the literature.
Education Research
Study time vs. grades, IQ vs. GPA, class size vs. test scores, teacher experience vs. student performance. Typical r ranges: 0.30–0.70.
Psychology
Intelligence measures vs. job performance, anxiety scores vs. academic achievement, parental income vs. child development outcomes. Correlations 0.20–0.60 are common.
Healthcare
Body mass index vs. blood pressure, age vs. bone density, diet quality vs. cholesterol. Clinical correlations often range 0.40–0.80.
Business Analytics
Ad spend vs. revenue, customer satisfaction vs. repeat purchases, price vs. demand. Marketing correlations vary widely, typically 0.50–0.90 for controlled analyses.
Environmental Science
CO₂ concentration vs. temperature, rainfall vs. crop yield, pollution levels vs. respiratory disease rates. Environmental correlations tend to be high (0.70–0.99) for physical relationships.
Sports Science
Training volume vs. race time, muscle mass vs. strength output, recovery hours vs. performance. Sports science correlations range 0.50–0.90 depending on the variables.
Data Science / ML
Feature correlation analysis in preprocessing (identifying redundant features), measuring target variable relationships before model selection. See also the guide on simple linear regression, which extends correlation to prediction.
Finance
Stock return correlations (for portfolio diversification), GDP vs. unemployment rate (Okun's Law), interest rates vs. bond prices. Financial correlations can shift substantially during market stress.
Pearson Correlation Cheat Sheet
| Item | Detail |
|---|---|
| Formula (definitional) | r = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / √[Σ(xᵢ−x̄)² · Σ(yᵢ−ȳ)²] |
| Formula (computational) | r = [nΣxy − (Σx)(Σy)] / √{[nΣx² − (Σx)²][nΣy² − (Σy)²]} |
| Range | −1 ≤ r ≤ +1 |
| Perfect positive | r = +1.00 |
| Perfect negative | r = −1.00 |
| No linear relationship | r = 0 |
| Strong (Cohen) | |r| ≥ 0.50 |
| Moderate (Cohen) | |r| = 0.30–0.49 |
| Weak (Cohen) | |r| = 0.10–0.29 |
| R-squared | r² = proportion of shared variance |
| Significance test | t = r√(n−2) / √(1−r²), df = n−2 |
| Degrees of freedom | df = n − 2 |
| Critical values (α=0.05) | n=10: |r| > 0.632; n=20: |r| > 0.444; n=30: |r| > 0.361 |
| R command | cor.test(x, y, method="pearson") |
| Python command | scipy.stats.pearsonr(x, y) |
| Excel command | =CORREL(array1, array2) |
| Alternative when assumptions fail | Spearman correlation (use with ordinal data or outliers) |
Frequently Asked Questions
Sources and Further Reading
- Pearson, K. (1895) — "Notes on regression and inheritance in the case of two parents." Proceedings of the Royal Society of London, 58, 240–242. Original paper introducing the correlation coefficient.
- Cohen, J. (1988) — Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Hillsdale, NJ: Lawrence Erlbaum Associates. Source of the widely used r = 0.10/0.30/0.50 benchmarks for weak, moderate, and strong correlations.
- NIST/SEMATECH Engineering Statistics Handbook — Section 1.3.5.13: Pearson Correlation. itl.nist.gov
- Moore, D.S., McCabe, G.P., & Craig, B.A. — Introduction to the Practice of Statistics (9th ed.). New York: W.H. Freeman. Standard undergraduate textbook covering Pearson correlation with worked examples.
- Fisher, R.A. (1915) — "Frequency distribution of the values of the correlation coefficient in samples from an indefinitely large population." Biometrika, 10(4), 507–521. Fisher's z-transformation for confidence intervals around r.
- SciPy Documentation — scipy.stats.pearsonr function. docs.scipy.org
- American Statistical Association (2016) — "Statement on Statistical Significance and P-Values." The American Statistician, 70(2), 129–133. tandfonline.com
- Penn State STAT 501 — Regression Methods, Chapter 1: Simple Linear Regression. online.stat.psu.edu