SOLVETUTORMATH SOLVER

Instrument MI-07-123 · Statistics

Pearson Correlation Calculator

Two variables can move together, move oppositely, or show no pattern at all. Pearson's r puts a single number, from -1 to +1, on exactly how strong that straight-line relationship is.

Instrument MI-07-123
Sheet 1 OF 1
Rev A
Verified
Type 07 — Correlation & Regression SER. 2026-07123

Pearson correlation coefficient (r)

0.774597

r = Sxy / sqrt(Sxx * Syy)

0.600000 Coefficient of determination (r²)
5 Number of pairs (n)
The working Every figure verified twice
  1. n=5 -> r=0.774597, r^2=0.600000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The Pearson correlation coefficient, r, measures the strength and direction of a linear relationship between two paired variables. It ranges from -1 to +1: +1 means the two variables move in perfect lockstep on a straight line, -1 means a perfect inverse straight-line relationship, and 0 means no linear relationship at all — though two variables can still be strongly related in a non-straight-line way and still score close to 0 on r.

The formula divides the covariance of x and y (how much they vary together) by the product of their individual standard deviations (how much each varies on its own), which is what keeps r bounded between -1 and +1 regardless of the original units or scale of x and y. r² — simply r squared — is called the coefficient of determination: it's the proportion of the variation in y that can be explained by its linear relationship with x, expressed as a number between 0 and 1.

A strong correlation does not mean one variable causes the other — that classic 'correlation is not causation' warning applies just as much here as anywhere in statistics. Two variables can correlate strongly because one genuinely drives the other, because both are driven by some third factor, or purely by coincidence in a particular dataset; Pearson's r describes the pattern in the data, not the mechanism behind it.

r=(xixˉ)(yiyˉ)(xixˉ)2(yiyˉ)2r=\frac{\sum(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum(x_i-\bar{x})^2\sum(y_i-\bar{y})^2}}
x̄, ȳ — the mean of the x values and the mean of the y values · Sxy — the sum of the products of each pair's deviations from their means · Sxx, Syy — the sum of squared deviations for x and for y respectively · r — the resulting correlation coefficient, between -1 and +1.
  • Enter your x values into X values, separated by commas, spaces, or new lines.
  • Enter the corresponding y values into Y values, in the same order and count as X values.
  • Read r — the Pearson correlation coefficient, from -1 (perfect negative) to +1 (perfect positive).
  • Read r² — the proportion of variation in y explained by its linear relationship with x, from 0 to 1.

Worked example — five paired x, y observations

Five paired observations: x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 5. Enter '1, 2, 3, 4, 5' into X values and '2, 4, 5, 4, 5' into Y values.

Mean x = 3, mean y = 4. Summing the deviation products and squares across all five pairs gives Sxy = 6, Sxx = 10, and Syy = 6. r = 6 / sqrt(10 × 6) = 6 / sqrt(60) = 0.774597 — a fairly strong positive linear relationship, though not a perfect one, since y doesn't rise in perfectly equal steps alongside x. r² = 0.6, meaning 60% of the variation in y is explained by its linear relationship with x.

Questions

What does an r of 0 actually mean?

It means there's no linear relationship between x and y in your data — but it does not necessarily mean there's no relationship at all. Two variables can have a strong, perfectly predictable curved relationship, such as y = x², and still produce an r close to 0, because Pearson's r specifically measures straight-line association. Always look at a scatter plot alongside r, since a low r can hide a real but non-linear pattern.

How large does |r| need to be to count as a 'strong' correlation?

There's no universal cutoff, and the right threshold depends heavily on the field — physics experiments often expect |r| above 0.9, while social-science or behavioral data might treat |r| around 0.3 to 0.5 as a meaningfully strong relationship. Common rough guidance treats |r| below 0.3 as weak, 0.3 to 0.7 as moderate, and above 0.7 as strong, but these bands are conventions, not statistical laws.

Does a strong correlation mean one variable causes the other?

No — correlation measures how strongly two variables move together, not why they move together. A strong r can come from a genuine causal relationship, from both variables being driven by a shared underlying cause, or occasionally from pure coincidence in a limited dataset. Establishing causation requires additional evidence beyond a correlation coefficient, such as a controlled experiment or a well-supported causal model.

What's the relationship between r and r²?

r² is simply r multiplied by itself, but the two numbers answer different questions. r tells you the strength and direction, positive or negative, of the linear relationship. r², always between 0 and 1 regardless of r's sign, tells you the proportion of the variation in y that's explained by the linear relationship with x — an r of 0.77 corresponds to an r² of about 0.6, meaning roughly 60% of y's variation is accounted for by its linear link to x.

Do outliers affect Pearson's r a lot?

Yes, often significantly — because the formula is built from squared deviations from the mean, a single extreme outlier can pull the mean and inflate or deflate the correlation substantially, sometimes even flipping its sign in a small dataset. If your data has one or two extreme points, it's worth checking how much r changes with and without them, or considering a rank-based measure like Spearman's correlation, which is less sensitive to outliers.

References