Scatter diagram: do these two things move together?
Paired readings plotted, with Pearson r, Spearman rho, r², the least-squares line and its p-value — and the two reported together, because when they disagree the disagreement is the finding.
Nothing you paste leaves this calculation. It is not stored, not logged and not sent anywhere else — the numbers are computed and returned, and that is all.
Look at the plot before you read the number
This is not a slogan. A correlation coefficient compresses a whole relationship into one number, and several very different pictures produce the same one.
r measures linear association only. A perfect parabola — a relationship so strong you could predict y from x exactly — has an r of about zero if it is symmetric about its vertex. A low r is therefore not evidence that two things are unrelated. It is evidence that they are not related in a straight line.
Equally, a single extreme point can manufacture a high r out of a shapeless cloud, or destroy a real one. The plot shows you which you have; the coefficient cannot.
Why both Pearson and Spearman
Pearson r measures how close the points lie to a straight line. Spearman ρ works on the ranks instead, so it measures whether y consistently rises with x, whatever shape the rise has.
When the two agree, the relationship is roughly linear and either number describes it. When they disagree markedly, that gap is itself the finding, and it has two usual causes:
- Spearman much higher than Pearson — the relationship is real and monotonic but curved. Fitting a straight line to it will understate how well you can predict y, and will predict badly at the ends.
- Pearson much higher than Spearman — usually one or two extreme points are doing the work. Remove them mentally and see whether the relationship survives.
Correlation is not causation — specifically
The phrase is worn out, which is a pity, because the three concrete failures behind it are genuinely useful to have in mind. A strong r between x and y is consistent with all of these, and the coefficient cannot distinguish them:
- A lurking third variable. Both x and y are driven by something you did not measure. Ambient temperature moves the machine and the material; the two move together and neither causes the other. This is the commonest one on a factory floor by a wide margin.
- Reverse causation. y is moving x. Easy to get backwards when the two are measured at the same time, and easy to check by looking at which one moves first.
- Coincidence. At small n this is much more likely than people expect. With ten points, an r of 0.6 arises by chance often enough not to be interesting.
The only reliable way past this is to change x deliberately and see whether y follows. That is an experiment, not an analysis, and it is what a scatter diagram is for: generating the hypothesis that is worth the experiment.
r² and what it does not promise
r² is the share of the variation in y that the straight line accounts for. An r of 0.8 gives an r² of 0.64 — so a relationship most people would call strong leaves over a third of the variation unexplained.
And it describes the fit over the range you measured. Extending the line beyond your data assumes the relationship carries on being a straight line out there, which nothing in the data supports. That is why the fitted line drawn above stops where the readings stop.
Questions people ask about this
What is a scatter diagram used for?
Seeing whether two variables move together — one of the seven basic quality tools, and the usual way a suspected cause gets a first check. It generates the hypothesis that is worth an experiment; it does not settle anything on its own.
What is the difference between Pearson and Spearman?
Pearson measures how close the points lie to a straight line. Spearman works on the ranks, so it measures whether y consistently rises with x whatever shape the rise has. When they disagree markedly, either the relationship is real but curved, or one or two extreme points are doing all the work in the Pearson figure.
Can a correlation of zero mean the variables are related?
Yes, and this is the commonest misreading. Pearson r measures linear association only. A symmetric parabola — a relationship so strong you could predict y exactly — has an r of about zero. A low r is evidence of no straight-line relationship, not of no relationship.
What does r squared tell me?
The share of the variation in y that the straight line accounts for. An r of 0.8 gives an r² of 0.64, so a relationship most people would call strong still leaves over a third of the variation unexplained — and only across the range you actually measured.
How do I show one thing causes another?
Not with a correlation. A strong r is equally consistent with a lurking third variable driving both, with the causation running the other way, and with coincidence at small n. The only reliable way past it is to change x deliberately and see whether y follows, which is an experiment rather than an analysis.
Want this to keep itself up to date?
A calculator answers for the data you pasted. A control chart answers for the data your line produced this morning — limits frozen at a baseline you locked, rules evaluated on every new reading, an alert when one trips.
More analysis tools
- Grubbs outlier test — The G statistic against its critical value, the p-value, and the point implicated — plus a straight answer about what to do next, which is almost never to delete the reading.
- Standard deviation calculator — The usual summary statistics, and the thing a spreadsheet will not tell you: the within-subgroup sigma a control chart uses, beside the overall sigma a textbook means. The gap between them is why Cpk and Ppk disagree.
Everything else
- Cp / Cpk calculator — Paste measurements — or type a mean and a sigma — with your tolerance, and get Cp, Cpk, Pp, Ppk, the sigma level and the expected parts per million out of spec.
- Control limit calculator — Give it subgroups or individual readings and it returns the control limits for the chart, the range or sigma chart beneath it, and every constant it used to get there.
- Control chart generator — Paste a column of numbers, or rows of subgroups, and get a real control chart: limits from the data, Nelson rules 1–4 evaluated, out-of-control points marked.
- Nelson & Western Electric rules checker — Every run rule evaluated on your data, each violation named in plain English with what it usually indicates — a shift, a trend, tool wear, two machines mixed.
- Cpk confidence interval & sample size — A Cpk of 1.33 from 30 pieces has a 95% interval of roughly 0.97 to 1.69. See the uncertainty in your own number, and how many parts would settle it.
- Cpk ↔ PPM ↔ sigma level converter — What PPM is a Cpk of 1.33? What Cpk does 3.4 PPM need? Both conventions shown side by side, because the 1.5 sigma shift is why two sources disagree by a factor of ten.
- Control chart constants — The whole table, n = 2 to 25, with the formula each constant belongs to. The same values the charts on this site are computed from.
- X̄-R chart calculator — Subgroups in, X̄ and R charts out — limits from A₂, D₃ and D₄, run rules evaluated, and the range chart shown first because it decides whether the averages chart can be trusted.
- X̄-s chart calculator — For subgroups big enough that the range wastes them. Limits from A₃, B₃ and B₄, sigma recovered with the c₄ correction, and the s chart read first because it decides whether the averages chart can be trusted.
- I-MR chart calculator — For processes that give you one number at a time — a batch, an oven, a destructive test. Limits from the mean moving range, run rules evaluated, and an honest note about what an individuals chart cannot see.
- Levey-Jennings chart with Westgard rules — Paste your QC results with the assigned mean and SD from the package insert, and get the chart with every sigma band drawn and all six Westgard rules evaluated — each one named, and labelled random or systematic error.
- Bland-Altman plot — Paired readings from two methods, plotted as difference against average — with the bias, the limits of agreement, their confidence intervals, and a test for whether the disagreement depends on the magnitude.
- Pareto chart generator — Categories and counts in, ranked bars and the cumulative line out — with the vital few named, an "Other" bucket that always sorts last, and an honest warning when the distribution is flat and there is no dominant cause to attack.
- Box and whisker plot generator — One column per group, boxes side by side. Quartiles, the 1.5×IQR fences, whiskers that stop at real readings and outliers drawn individually — with the quartile method stated, because that is why your plot and Excel's disagree.
- Histogram and normality test — A histogram with the fitted normal curve, both standard bin rules with a reasoned recommendation, and an Anderson-Darling test that refuses to tell you your data is normal — because no test can.
- Gage R&R calculator (ANOVA) — Paste a crossed study — part, operator, reading — and get the full ANOVA: repeatability and reproducibility separated, the part-by-operator interaction tested rather than assumed away, %GRR, %Tolerance and ndc against AIAG's bands.
- p, np, u and c chart calculator — Counted data rather than measured: proportion defective, number defective, defects per unit. Limits that step with the sample size instead of pretending it never changed, and an honest warning when the counts are too low for three-sigma limits to mean anything.