UpSkill Sprint Consulting logoUpSkill Sprint Consulting

THE SPREAD LAB — an interactive notebook

The Spread Lab: Variance, Covariance, Correlation & Coefficient of Variation

Every process wobbles. Here's how to measure it.

Variance, standard deviation, coefficient of variation and its cousins, covariance, and correlation are usually taught as separate formulas to memorize. They're really one idea, asked several different ways: how far do things drift from where we expect them, and do two things drift together? Drag the slider below to feel it before we name it.

relationship strength: 0.70
as you drag, watch the dots snap from a cloud to a line — that snapping-into-a-line is what correlation measures.
Part 1 of 6

Variance — the average squared distance from the mean

Imagine a machine cutting bolts to a target length of 50 mm. No machine is perfect — every bolt lands a little off target. Variance asks: on average, how far off, once you square each miss (so a miss to the left and a miss to the right don't cancel out)?

population variance

Run the bolt line

Slide "consistency" and hit shuffle — every bolt is a dot on the line. Watch variance explode as the process gets sloppier.

bolt length (mm) — target 50mm
mean—
variance—
std dev (√variance)—

Notice the units on variance: mm². Squared millimeters aren't something you can picture holding a caliper up to — that awkwardness is the whole reason the next quantity exists.

Part 2 of 6

Standard deviation undoes the squaring. CV undoes the units.

Take the square root of variance and you're back in millimeters — that's standard deviation, the "typical distance from the mean" in plain units. But a std dev of 2mg and a std dev of 2kg are not equally impressive. Coefficient of variation asks the fairer question: how big is that spread relative to the average?

standard deviation, then coefficient of variation

CV is often multiplied by 100 and reported as a percentage.

Same absolute wobble, two different products

One slider sets the same numeric standard deviation for both lines below. Watch which one that spread actually threatens.

4.0

Tablet coating weight

mean = 8 mg per tablet
std dev—
CV—

Truck shipment weight

mean = 800 kg per truck
std dev—
CV—

Same std dev, wildly different CV — because 4 mg is enormous relative to an 8 mg tablet, and nothing relative to an 800 kg truck.

Part 3 of 6

CV has cousins — and each one trusts the data differently

CV isn't the only way to express spread "relative to something." Four more live in the same family, each built from a different raw material — the full range, just the middle 50%, average distance instead of squared distance, or CV itself renamed for a lab bench. Where they disagree is how much a single wild reading can shake them.

coefficient of range — spread relative to the total scale
quartile coefficient of dispersion — spread of just the middle 50%, ignores the tails
coefficient of mean deviation — average distance, not squared distance, relative to the average
relative standard deviation — CV, renamed for the lab bench

Identical math to CV — just always expressed as a percentage.

The clogged nozzle

Twelve syringes off Fill Line 7, target 10.00 mL. Then the nozzle catches for one cycle and overfills a single syringe to 13.80 mL. Toggle it in and out and watch which numbers flinch.

fill volume (mL)
min / max—
Q1 / Q3—
mean—
mean deviation—
coefficient of range — sensitive
quartile coeff. of dispersion — robust
coefficient of mean deviation — moderate
RSD — sensitive

That ordering isn't a coincidence. Quartile coefficient of dispersion only looks at Q1 and Q3 — the middle 50% of the data — so one extreme syringe usually doesn't even change which readings sit at those positions. Coefficient of mean deviation averages every distance once, so the outlier counts, but only once. Coefficient of range and RSD both key off the single most extreme reading (or its squared distance, for RSD) — exactly the reading that just broke.

When to reach for which: use the quartile coefficient of dispersion when you know the data has (or might have) outliers and you don't want one bad reading to dominate the story — audits of skewed cycle-time or cost data are a classic case. Reach for RSD/CV when the data is reasonably well-behaved and you want the standard, widely-recognized metric. Coefficient of range is quick and intuitive but inherits the raw range's weakness: it only ever looks at two points.
Part 4 of 6

Covariance — variance's formula, aimed at two variables

Variance multiplies each deviation by itself. Covariance multiplies the deviation of X by the deviation of a second variable, Y, at the same moment. If they tend to be above their means together (or below together), the products are positive. If one's up while the other's down, the products are negative.

covariance — and variance is just this with Y = X

The four quadrants of a relationship

Dashed cross-hairs mark the mean of each axis. Teal quadrants push covariance up (both deviations agree in sign); brick quadrants push it down. Drag the slider and watch where the dots choose to live.

covariance—
both deviations agree → pushes covariance up
deviations disagree → pushes covariance down
Part 5 of 6

Correlation — covariance, rescaled to −1…+1

Covariance has the same scale problem variance had: its size depends on the units of X and Y, so a covariance of 4,000 might describe a weaker relationship than a covariance of 0.02, if the units are different enough. Divide covariance by both standard deviations and the units cancel out completely.

correlation coefficient (Pearson's r)

Drive the relationship yourself

This is the same scatter engine as above, wired to a −1…+1 dial instead. Notice r never runs away in scale the way covariance could.

correlation (r)—

Watch for this: correlation only detects linear relationships. A perfect U-shaped curve can score r ≈ 0 while being a completely predictable, strong relationship — just not a straight-line one.
Part 6 of 6

One family tree, five names — plus the cousins

These five share one direct bloodline: each is a variation on "average deviation from expected," widened to two variables or rescaled for comparison. Coefficient of range, quartile coefficient of dispersion, and coefficient of mean deviation from the last section are cousins, not children — same goal, different raw materials (range, quartiles, and absolute distance instead of squared distance).

Guided Practice

Try it on a new dataset — pallets vs. pins

Two brand-new, fictitious datasets. We'll compute every measure from this lesson on both, by hand, so nothing is hidden inside a slider. The goal isn't just practice — it's to expose something the raw numbers actively hide from you.

Dataset A — pallet shipping weights

A warehouse weighs 8 outbound pallets, in kilograms.

760, 780, 795, 805, 815, 825, 840, 860 kg

Dataset B — precision pin diameters

A gauge measures 8 machined pins, in millimeters.

4.5, 4.7, 4.8, 4.9, 5.1, 5.2, 5.4, 5.6 mm

Step 1 — the mean

Step 2 — variance and standard deviation

BEFORE YOU SCROLL FURTHER

30.21kg — pallets std dev
0.346mm — pins std dev

Judging only by those two numbers — which process is more variable?

That reversal isn't a one-off trick of this example — the same thing happens with every relative measure from this lesson, because they all divide out scale in the same way. Let's run the rest.

Step 4 — range and coefficient of range

Step 5 — quartiles and quartile coefficient of dispersion

Step 6 — mean deviation and coefficient of mean deviation

RSD isn't shown as a separate step — it's exactly the CV values from Step 3, just relabeled as a percentage, since RSD and CV are the same statistic.

Every measure, side by side

MeasurePallets (raw)Pins (raw)Pallets (relative)Pins (relative)
Std dev / CV30.21 kg0.346 mm3.73%6.88%
Range / Coef. of range100 kg1.1 mm6.17%10.89%
IQR / QCD37.5 kg0.475 mm2.31%4.74%
Mean dev. / CoMD25 kg0.3 mm3.09%5.97%
RSD— (same as CV, just ×100%)3.73%6.88%

Every single raw measure says "pallets." Every single relative measure says "pins." Both are computed correctly — they're just answering different questions.

The general rule: a raw spread measure (variance, standard deviation, range, IQR, mean deviation) is only comparable between two datasets that share the same units and a similar scale. The instant you're comparing across different units, different scales, or even the same units at very different magnitudes, switch to the relative version — CV, coefficient of range, quartile coefficient of dispersion, or coefficient of mean deviation. That's the entire reason this family of measures exists.
Statistics Implementation

Running these in Excel and Minitab

The formulas above are what's happening under the hood. In practice, on the exam and on the floor, you'll pull these from software — and the sample/population distinction below is the single most common place people lose points.

Excel functions
FunctionSyntaxPurposeWhen to use
VAR.S=VAR.S(range)Sample varianceYour data is a sample of a larger population (the usual case)
VAR.P=VAR.P(range)Population varianceYour data is the entire population — no estimation involved
STDEV.S=STDEV.S(range)Sample standard deviationSquare root of VAR.S; the default for process/quality data
STDEV.P=STDEV.P(range)Population standard deviationSquare root of VAR.P
AVERAGE=AVERAGE(range)MeanNeeded alongside STDEV to build CV yourself — Excel has no native CV function
COVARIANCE.S=COVARIANCE.S(range1,range2)Sample covarianceTwo paired samples (e.g. two process measurements taken together)
COVARIANCE.P=COVARIANCE.P(range1,range2)Population covarianceBoth variables' complete populations are known
CORREL=CORREL(range1,range2)Pearson correlation (r)Same result whether you treat the data as sample or population — r is scale-free either way
MAX, MIN=MAX(range), =MIN(range)ExtremesBuild the coefficient of range yourself — no native function
QUARTILE.INC=QUARTILE.INC(range,1) / (range,3)Q1 / Q3Feeds the quartile coefficient of dispersion — again, no native function combines them for you
AVEDEV=AVEDEV(range)Mean absolute deviationThe numerator for coefficient of mean deviation — one of Excel's more obscure built-ins

Excel use cases

=STDEV.S(B2:B50)/AVERAGE(B2:B50) — the everyday CV formula, since Excel has no built-in CV function. Format the cell as a percentage.
=(STDEV.S(B2:B50)/AVERAGE(B2:B50))*100 — the same calculation reported as RSD, the convention you'll see in analytical chemistry and lab COAs (certificates of analysis).
=(MAX(B2:B50)-MIN(B2:B50))/(MAX(B2:B50)+MIN(B2:B50)) — coefficient of range: fast, but only as trustworthy as your two most extreme readings.
=(QUARTILE.INC(B2:B50,3)-QUARTILE.INC(B2:B50,1))/(QUARTILE.INC(B2:B50,3)+QUARTILE.INC(B2:B50,1)) — quartile coefficient of dispersion, the one to reach for when you suspect outliers.
=AVEDEV(B2:B50)/AVERAGE(B2:B50) — coefficient of mean deviation, in one line since Excel already has AVEDEV built in.
=CORREL(B2:B50,C2:C50) — quick check for whether two process inputs (e.g. oven temperature and cure time) are moving together before you build a regression.
=COVARIANCE.S(B2:B50,C2:C50) — feeds directly into hand-calculating r if you already have both standard deviations, and matters on its own in portfolio-style variance calculations (Var(X+Y) = Var(X)+Var(Y)+2·Cov(X,Y)).

Minitab navigation

Stat → Basic Statistics → Display Descriptive Statistics — gives mean, StDev, and variance together; check "Statistics…" to add CoefVar (Minitab computes CV for you, unlike Excel). Q1 and Q3 are available in the same dialog for building the quartile coefficient of dispersion by hand.
Stat → Basic Statistics → Covariance — direct covariance matrix for two or more columns.
Stat → Basic Statistics → Correlation — correlation matrix with an option to display p-values; use this over hand-calculating r whenever you have more than two variables to compare pairwise.

Which option to use and why: Descriptive Statistics is the right first stop for any single-variable spread question (variance, StDev, CV, and quartiles all live there together). None of coefficient of range, quartile coefficient of dispersion, or coefficient of mean deviation have a dedicated Minitab menu — you build them from the descriptive-statistics output, same as in Excel. Reach for Covariance only when you specifically need the unscaled joint measure — most of the time, on the exam and at work, Correlation is what you actually want, since it's directly interpretable without knowing the units.

Exam tips (CSSBB / CQE)

Sample vs. population: if the question describes measuring "all units produced" or a defined finite lot, use population formulas (n divisor). If it describes a sample pulled for inspection — the overwhelming majority of exam scenarios — use sample formulas (n−1 divisor). Using n instead of n−1 is the single most common calculation trap.
Correlation ≠ causation: a classic distractor answer treats a high r as proof that X causes Y. The exam will reward "there is a strong linear association" over "X causes Y" unless the question describes a controlled experiment.
CV shows up in Measurement Systems Analysis and reliability questions as a way to compare variability across different gauges or different-scaled processes — if a question compares consistency across two different units of measure, CV (not raw StDev) is almost always the intended tool.

Knowledge check

Check your understanding

Comprehension quiz

Pick the strongest answer, then submit. Explanations appear after you submit.

1. Why does variance square each deviation from the mean instead of just averaging the raw deviations?
2. A process has a standard deviation of 3 minutes. What can you say about its coefficient of variation without more information?
3. Two variables have a covariance of −850. What does the negative sign tell you?
4. Why divide covariance by σx · σy to get correlation?
5. A scatter plot shows a perfect, tight U-shape (like a parabola). What will Pearson's correlation coefficient likely show?
6. A dataset has one extreme outlier. Which measure of relative spread is built to barely notice it?
← Back to Statistics lessons