The formula
Say you have n measurements: x_1, x_2, ... , x_n.
mean (x-bar) = ( x_1 + x_2 + ... + x_n ) / n
Reading: add every value, divide by how many there are. The center of mass of the data.
median = middle value once the data is sorted
= the single middle point if n is odd
= the average of the two middle points if n is even
Reading: half the data sits below it, half above. Sorting does the work, not arithmetic.
mode = the value that shows up most often
Reading: the peak of the histogram. Useful for counts and categories, near-useless for continuous readings that never repeat.
sample variance: s² = sum( (x_i - x-bar)² ) / (n - 1)
sample std dev: s = √( sum( (x_i - x-bar)² ) / (n - 1) )
Reading: average squared distance from the mean, then take the square root to get back into the original units. s is the number you quote as the spread.
range = max - min
IQR = Q3 - Q1 (the 75th percentile minus the 25th)
Reading: two cheap measures of spread. Range is the full stretch; IQR is the width of the middle half and ignores the tails.
Where you meet it
- First look at a vibration or thermal run. The DAQ hands you 50,000 samples. Before anyone plots anything, you compute mean, standard deviation, min, and max per channel. That one line per channel tells you whether the sensor was alive, whether the level was in family, and whether a spike blew past the rails.
- Acceptance testing on the bench. You measure a resistor lot, a machined bore, a regulator's output. Mean tells you if the process is centered on nominal; standard deviation tells you if it's tight enough to hold tolerance. Cp and Cpk — the capability numbers the quality group lives by — are both just the spec window divided by some multiple of
s. - RF noise and settling. Sample a "quiet" node and the standard deviation of those samples is the RMS noise. The mean is the DC offset you'll subtract. The two summary numbers separate the signal you want from the fuzz you don't.
- The review board argument. Someone claims a build "runs hot." Before the room debates it, the mean and the spread of the thermocouple data settle whether that's a real center shift or one bad channel dragging the average. The summary statistics are what you put on the slide so the argument is about the data, not about impressions.
How it works
The mean and the standard deviation are a matched pair: one says where the data sits, the other says how far it wanders. Report a mean without a spread and you've told half the story — a bore averaging 10.00 mm means nothing until you know whether s is 0.001 mm or 0.5 mm.
The mean's weakness is outliers. One bad reading drags it hard because every value votes with full weight. Take four clean readings around 10.1 and one busted 25.0: the mean jumps to 13.08, which describes none of your parts. The median of that same set stays at 10.2 — it only cares about rank order, so a single wild point can't move it more than one slot. That's the whole reason engineers keep both. When mean and median agree, the data is roughly symmetric. When they split, something is skewing it — a tail, a stuck channel, a hidden second population — and that gap is a flag to go look, not a number to average away.
The n - 1 in the standard deviation is not a typo. When you compute spread using the sample mean instead of the true population mean, the numbers are naturally a little too tight — the sample mean sits right in the middle of your own data by construction, so distances measured from it come out smaller than distances from the real center. Dividing by n - 1 instead of n inflates the estimate just enough to cancel that bias. It is verifiable by simulation: draw samples of five from a population with true variance 1.0, and dividing the sum of squares by n averages about 0.80 — biased low — while dividing by n - 1 averages about 1.00. This is Bessel's correction. It matters most when n is small; by the time you have thousands of samples, n versus n - 1 is a rounding error. On the classic set {2, 4, 4, 4, 5, 5, 7, 9} the population formula (divide by n) gives σ = 2.0 exactly, while the sample formula (divide by n - 1) gives s ≈ 2.138.
The gotcha most people miss: dividing by n - 1 makes the variance unbiased, but the standard deviation — its square root — is still biased slightly low. The square root is a curved function, so the average of the roots isn't the root of the average. For most engineering work the difference is negligible and nobody corrects for it, but if someone asks why "unbiased" doesn't quite hold for s, that's why.
Limits of validity. A mean and a standard deviation describe a single lump of data honestly only when it's roughly one hump — unimodal and not too skewed. Feed them a bimodal set (two operators, two fixtures, day shift and night shift) and the mean lands in the empty valley between the two peaks, describing a condition that never occurred. Descriptive statistics summarize; they don't diagnose. Always glance at the histogram before you trust the summary — the four numbers can look perfectly reasonable while hiding a story only the shape reveals. And these numbers describe the sample in hand. The jump from "this batch" to "the whole population" is inferential statistics, a different and more dangerous game.
History
The mean is old and has no single author. Astronomers combined repeated observations to pin down positions of the sun, moon, and planets long before anyone wrote down a general formula, though historians who have traced the record argue the mean as an explicit, general concept arrived surprisingly late — antiquity had related estimation tricks (the Greeks used a kind of interpolation between counted bounds), but the deliberate rule "add them up and divide" took centuries to become standard practice [1]. Thomas Simpson gave the practice its public defense in a 1755 letter to the Royal Society, arguing that taking the mean of several observations beat picking the single one you liked best [2].
The median took even longer to get a name. Ruđer Bošković, working on the shape of the earth in 1757, developed a fitting method that minimizes the sum of absolute deviations — a criterion that implicitly picks out the middle value, a property Laplace made explicit in 1774 [3]. The English word "median" came from Francis Galton, the relentless nineteenth-century data analyst, who introduced it in 1881 (Cournot had already used the French "valeur médiane" in 1843) [3]; Galton championed the middle-most value precisely because it shrugged off wild points and was easy to find by hand for a small set [4].
The standard deviation is the young one, and its parent is named. Karl Pearson introduced the term "standard deviation" in 1893, as a cleaner replacement for clumsy older labels like "root mean square error" and "mean error" that had floated around Gauss's and Airy's error work for decades [5][6]. Pearson was building the vocabulary of modern statistics wholesale in those years, and the phrase stuck. The n - 1 correction carries a different name: it's called Bessel's correction after Friedrich Bessel [7], though Gauss had already used the same adjustment in error analysis as early as 1823 — a common pattern where the name and the first use don't match [8].
Related tools
- /tools/rms-peak — RMS of a signal is the standard deviation of its samples once you remove the mean; same square-and-average machinery.
- /tools/crest-factor — peak divided by RMS; a summary of a waveform's shape built from the same spread idea.
- /tools/thermal-noise-floor — the noise floor you compute is the standard deviation of a "quiet" signal.
- /tools/snr-enob — signal-to-noise ratio and effective bits both compare a signal against the standard deviation of its noise.
Sources
- https://www.tandfonline.com/doi/full/10.1080/10691898.2003.11910694
- https://royalsocietypublishing.org/doi/10.1098/rstl.1755.0020
- https://en.wikipedia.org/wiki/Median#History
- https://priceonomics.com/how-the-average-triumphed-over-the-median/
- https://mathshistory.st-andrews.ac.uk/Biographies/Pearson/
- https://en.wikipedia.org/wiki/Karl_Pearson
- https://en.wikipedia.org/wiki/Bessel%27s_correction
- https://mathworld.wolfram.com/BesselsCorrection.html