Wednesday, September 23, 2026

What Does "Spread" Actually Mean?

 

1. Location is only half the story

Suppose two laboratories measure the same quantity.

Laboratory A reports:

[
10,;10,;10,;10,;10
]

Laboratory B reports:

[
2,;6,;10,;14,;18
]

Both have mean 10.

Yet describing them as statistically equivalent would clearly be absurd.

A location statistic tells us where the distribution sits.

A dispersion statistic tells us how broadly the observations occupy the space around that location.

This distinction appears everywhere:

  • biology: variability in gene expression,
  • ecology: variability in species abundance,
  • manufacturing: process consistency,
  • finance: volatility,
  • medicine: heterogeneity of patient responses,
  • genomics: read depth variability,
  • machine learning: variability of representations or prediction uncertainty.

Sometimes variability is noise.

Sometimes variability is the biological phenomenon.

That distinction matters enormously.


2. Four different ideas of dispersion

Consider:

[
x=(1,2,3,4,20).
]

There are several reasonable ways to describe its spread.

Extreme separation

[
\text{Range}=\max(x)-\min(x)
]

This asks:

How far apart are the most extreme observations?

Central spread

[
IQR=Q_{0.75}-Q_{0.25}
]

This asks:

How wide is the middle 50%?

Typical deviation from a center

For example,

[
\frac{1}{n}\sum |x_i-\bar{x}|
]

or

[
\operatorname{median}|x_i-\operatorname{median}(x)|.
]

These ask:

How far does a typical observation lie from some center?

Pairwise spread

We can instead ask how far apart observations are from one another:

[
\frac{1}{\binom n2}
\sum_{i<j}|x_i-x_j|.
]

This idea leads to Gini's mean difference.

None of these questions is inherently more correct than the others.

They simply measure different geometries of variability.


3. A short historical detour

The modern vocabulary emerged gradually.

Karl Pearson introduced the term standard deviation in lectures in 1893 and used it in print in 1894, replacing older terminology such as "mean error" and "error of mean square."

R. A. Fisher introduced the statistical term variance in his famous 1918 work on the resemblance between relatives, where variation could be decomposed into meaningful components.

Corrado Gini introduced his mean-difference approach to variability in 1912, providing an alternative family of ideas based on absolute pairwise differences rather than squared deviations.

So even historically, variance was never the only road through the forest.


4. A first experiment in Python

import numpy as np

x = np.array([1, 2, 3, 4, 20])

mean = np.mean(x)
median = np.median(x)
data_range = np.ptp(x)
variance = np.var(x, ddof=1)
sd = np.std(x, ddof=1)
iqr = np.percentile(x, 75) - np.percentile(x, 25)
mad_raw = np.median(np.abs(x - median))

print("Mean:", mean)
print("Median:", median)
print("Range:", data_range)
print("Variance:", variance)
print("SD:", sd)
print("IQR:", iqr)
print("MAD:", mad_raw)

Now remove the extreme observation:

y = np.array([1, 2, 3, 4])

for name, z in [("with outlier", x),
                ("without outlier", y)]:
    print("\n", name)
    print("SD =", np.std(z, ddof=1))
    print("IQR =", np.percentile(z, 75) -
                   np.percentile(z, 25))
    print("MAD =", np.median(
        np.abs(z - np.median(z))
    ))

The measures react very differently.

That reaction is not a bug. It tells us what each measure cares about.


5. The same experiment in R

x <- c(1, 2, 3, 4, 20)

mean(x)
median(x)
diff(range(x))
var(x)
sd(x)
IQR(x)

mad_raw <- median(abs(x - median(x)))
mad_raw

Compare with:

y <- c(1, 2, 3, 4)

metrics <- function(x) {
  c(
    SD = sd(x),
    IQR = IQR(x),
    MAD_raw = median(abs(x - median(x)))
  )
}

metrics(x)
metrics(y)

6. Properties we should demand from dispersion measures

A useful dispersion measure might possess several properties.

Non-negativity

[
D(X)\geq0.
]

Zero for constant data

If every observation is identical,

[
D(X)=0.
]

Translation invariance

Adding a constant should usually not change spread:

[
D(X+c)=D(X).
]

Variance, SD, IQR and MAD all satisfy this.

Scale equivariance

Multiplying the data by (a) should change a scale measure proportionally:

[
D(aX)=|a|D(X).
]

SD and MAD satisfy this.

Variance instead satisfies:

[
\operatorname{Var}(aX)=a^2\operatorname{Var}(X).
]

Robustness

How much can one pathological observation alter the answer?

This turns out to be one of the central questions in the entire series.


7. A crucial lesson

There is no universally best dispersion measure.

Choosing one involves deciding what kind of variation deserves influence.

Variance says:

Large deviations deserve disproportionately large influence.

MAD says:

The behavior of the majority matters more than extreme observations.

Range says:

I care specifically about the extremes.

IQR says:

I care about the central half.

Gini mean difference says:

I care about distances among all pairs.

Those are scientific choices disguised as formulas.

And that is why dispersion deserves more thought than simply typing sd(x).

No comments: