Probability

How far from the average a thing can be

Knowing only an average and a spread — nothing about the shape, nothing about the number of outcomes, nothing about symmetry — the chance of landing three standard deviations out is at most one in nine. And there is a distribution that lands there exactly that often, so the bound cannot be improved.
15 min read 7 figures Decided by exhaustionSmall cases lie

Worth reading first: A bell curve assembled out of coin flips · Bayes' theorem is a picture of a square.

A quantity has an average. It also has a spread, measured the standard way: take the squared distance of each outcome from the average, weight each by how likely it is, add them up, and take the square root. Those two numbers are the whole of what is assumed here. Nothing about the shape of the distribution, nothing about how many outcomes there are, nothing about whether it is symmetric.

From those two numbers alone, the chance of landing far out is bounded.

five values, unevenly weighted, and the mass outside 3 standard deviationsA distribution drawn as bars, with the windows one and a half, two and three standard deviations wide marked. The probability outside each window is summed and compared with the bound that knows only the variance.-6-4-202460.000.100.200.300.400.50valueprobability1.5σthe meanmean 0.300, standard deviation 1.847; beyond 1.5 of them lies 0.2000 against a bound of 0.4444, beyond 2 ofthem lies 0.1000 against a bound of 0.2500, beyond 3 of them lies 0.0000 against a bound of 0.1111the bound knows only the variance — not the shape, not the number of values, not whether the distribution issymmetric — which is why it is so far from tight here and cannot be improved in general
Fig. 1 A distribution drawn as bars, with the windows one and a half, two and three standard deviations wide marked. The probability outside each is summed over the bars themselves and compared with the bound — which knows nothing about this distribution except its variance.

The bound is one over the square of the window width: beyond two standard deviations, at most a quarter of the probability; beyond three, at most a ninth; beyond ten, at most a hundredth. It is due to Chebyshev, it is proved in three lines, and it holds for every distribution that has a variance at all.

Three lines

The variance is an average of squared distances. Some of those squared distances are large and some are small, and the whole argument is that the large ones cannot be too common or they would make the average bigger than it is.

Write σ for the standard deviation and consider the outcomes at distance kσ or more from the mean. Each of those contributes at least (kσ)² to the average of squared distances, weighted by its probability. So if the total probability of that region is P, the variance is at least P × k²σ².

But the variance is σ². So σ² ≥ P k²σ², and dividing through gives P ≤ 1/k².

That is the whole proof. It throws away the contribution of everything inside the window — treating it as zero, which is generous — and it treats every outcome outside the window as if it sat exactly on the boundary, which is also generous. Two crude approximations, and out comes a bound that cannot be improved.

Why it cannot be improved

A bound that is true is one thing; a bound that is attained is another, and the difference decides whether the inequality is a tool or a curiosity.

The distribution that meets the bound at 2 standard deviationsA three-valued distribution whose mass beyond k standard deviations is exactly the bound. It shows the inequality cannot be improved without assuming more than a variance.−2σ0.1250the mean0.7500+2σ0.1250three values, at −2, 0 and 2 standard deviations, with weights 0.1250, 0.7500, 0.1250the mass at 2 standard deviations or beyond is 0.2500, which is exactly 1/2² — so no bound of thiskind can be lower, whatever else is assumed about the shape
Fig. 2 The distribution that meets the bound exactly at two standard deviations: three values, at minus two, zero and plus two, with the outer weights chosen so that the variance is one. The mass outside the window is exactly a quarter, which is the whole of what the inequality allows.

Both approximations in the proof become equalities for the same distribution. Put all the inside probability at exactly the mean, so its contribution to the variance really is zero, and put all the outside probability at exactly k standard deviations out, so each contributes exactly (kσ)². Then the two inequalities in the proof are equalities, and the mass outside is exactly 1/k².

Such a distribution exists for every k above one: it takes the value −k with probability 1/(2k²), the value +k with the same probability, and 0 the rest of the time. Its variance works out to 1 exactly, and the figure computes both the variance and the tail mass from the three weights rather than quoting them.

So the inequality is sharp. Any bound better than 1/k² would be false for that distribution, and it follows that no argument using only a mean and a variance can do better — the improvement would have to assume something more.

How far from sharp it usually is

Sharp in general does not mean sharp in any particular case, and for the distributions anybody actually meets the bound is wildly loose.

Four distributions, and the one bound over all of themThe probability of landing at least k standard deviations from the mean, for four distributions, against the bound that knows only their variance. Every staircase stays under the curve.0.511.522.533.540.000.200.400.600.801.00window, in standard deviationsprobability outside itthe bound, 1/k²a fair coin, ±1a fair die0 nine times in ten, 10 otherwisefive values, unevenly weightedthe bound is the falling curve; every distribution's own tail mass is a staircase under it, because a finitedistribution's mass jumps as the window passes a valuethe lopsided one reaches 89% of the bound, and the three-point distribution of the previous figure reaches all of it— so the bound is not merely true but as low as a bound can be
Fig. 3 Four distributions and the one bound over all of them. Every staircase is the real probability of landing outside a window of that width, computed by summing the distribution itself; the falling curve is the bound. Nothing touches it except at the widths where a distribution has an outcome sitting exactly on the boundary.

For a normal distribution the probability beyond three standard deviations is about 0.0027, against a bound of one ninth — forty times too generous. For a coin flip taking two values it is even further out. The staircases in the figure are the honest answer for each distribution, and the bound sits well above all of them.

This gap is the price of the hypothesis being so weak. The bound has to cover the three-point distribution, which is as bad as a distribution with that variance can be, so it must be loose for everything better behaved. Assuming more — that the distribution is a sum of many independent pieces, say, or that its tails decay exponentially — buys much sharper bounds, and the whole subject of concentration inequalities is a catalogue of what each extra assumption buys.

What it is for

Three uses, and none of them involves knowing the distribution.

Guaranteeing a simulation. Estimating π by dropping needles produces an answer whose error can be bounded by this inequality and by nothing weaker, because the estimator’s distribution is not known in closed form. The variance is computable, the bound applies, and the number of trials needed for a stated confidence follows.

300 needles on a lined floor300 needles dropped at random across evenly spaced lines; 200 of them cross a line.200 of 300 cross a line2Ln / dc ≈ 3.000
Fig. 4 Three hundred needles dropped on a lined floor. The proportion crossing a line estimates a number, and the only honest statement about the error is a bound — which is what an inequality assuming nothing about the shape is for.

Proving a limit theorem. The weak law of large numbers — that the average of many independent copies settles on the mean — follows in one line: the variance of the average of n copies is σ²/n, so the chance of the average being more than ε from the mean is at most σ²/(nε²), which goes to zero. That is the shortest complete proof of a genuine theorem anywhere in probability, and it uses this inequality as its only ingredient.

Bounding what cannot be computed. In the analysis of an algorithm whose running time depends on random choices, or of a physical measurement whose error distribution is unknown, the variance is often computable when the distribution is not. Chebyshev converts a variance into a statement about how often things go badly wrong, and it is frequently the only such statement available.

The distance a random walk gets to

The clearest place to watch the bound do useful work is a quantity whose distribution is awkward and whose variance is trivial.

Nine walks, and the square root5 independent walks of 400 steps, each step one place left or right. The dashed curves are ±√n: the walks stay near them, spill past them, and come back — which is what a typical distance means as opposed to a limit.050100150200250300350400-60-40-20204060steps takendistance from the start√n
Fig. 5 Five independent walks of four hundred steps, each step one place left or right, with the curves at plus and minus the square root of the step count drawn over them. The walks stay near those curves, spill past them, and come back.

A walk of n steps, each one place left or right with equal chance, ends at a position whose average is zero and whose variance is exactly n — because the steps are independent, so the variances add, and each step has variance 1. So the standard deviation is √n, and Chebyshev says at once that the walk is beyond kn with probability at most 1/k².

That is a complete answer to how far does a random walk get without any of the combinatorics. The exact distribution of the endpoint is a binomial coefficient divided by a power of two, which is a perfectly good formula and an awkward one to reason with; the bound needs two facts and a division.

The walk that comes home is a different question about the same object, and it is worth noting how differently the two are answered. Whether a walk returns to the origin infinitely often is settled by summing a series and depends delicately on the dimension. How far it typically gets is settled by adding variances, and works in any dimension without change.

Averaging is what makes the bound bite

7 running averages, and the band they stay insideThe running average of repeated draws, for several independent runs, with the band two standard errors wide. The runs wander early and settle onto the mean as the band closes.020040060080010002.04.06.0draws so faraverage so farthe mean, 3.507 runs of up to 1,000 draws from a fair die; the band is ±2σ/√n, drawn from the distribution rather than fitted to therunsthe average settles because the band shrinks, and it shrinks like one over the square root of the count — so tentimes the work buys about three times the precision
Fig. 6 Seven runs of a running average, with the band two standard errors wide drawn from the distribution rather than fitted to the runs. The runs wander early and settle as the band closes, and the band closes like one over the square root of the count.

The variance of an average of n independent copies is σ²/n, so its standard deviation is σ/√n. Feeding that into the inequality gives the statement that makes the whole of statistics possible: the average of n copies is within kσ/√n of the true mean with probability at least 1 − 1/k².

Every number in that sentence is computable from one variance and one sample size, and none of it needs the shape of the distribution. The band drawn in the figure above is exactly that, and the seven runs stay inside it not because they were selected but because the arithmetic says most runs will.

The 1/√n is the rate, and it is a harsh one. Cutting the error in half needs four times the work; adding a decimal place needs a hundred times. It is the same rate that makes Monte Carlo estimation slow and the same rate that the needle experiment is limited by, and no amount of cleverness about the sampling changes the exponent — only the constant in front of it.

Where the hypothesis fails

The inequality assumes a variance exists, and some distributions have none.

The Cauchy distribution — the ratio of two independent normal quantities, or equivalently the tangent of a uniformly random angle — has tails heavy enough that the average of the squared distances diverges. It has no variance, and so no version of this bound applies. Worse, it has no mean either: the average of many independent copies does not settle down at all, but has the same distribution as a single copy however many are taken.

That is not an exotic corner. Ratios turn up constantly, and a quantity built as a ratio should be treated as suspect until its tails have been looked at. The same warning applies to the central limit theorem, which also needs a finite variance and which also fails without one — and fails silently, in the sense that a simulation of a heavy-tailed quantity produces perfectly plausible-looking histograms that are converging to nothing.

The one-sided version is worth knowing too. Chebyshev’s inequality is symmetric and most quantities are not, and Cantelli’s one-sided version replaces 1/k² with 1/(1 + k²) for the probability of exceeding the mean by kσ in one direction — a better bound, from the same information, obtained by a slightly cleverer choice in the proof.

The shape the bound refuses to use

A Galton board after 600 balls600 balls fall through 12 rows of pegs, each bouncing left or right at random, and pile up in a bell-shaped heap.1173760121153109683661left or right, 12 times, 600 times over
Fig. 7 Six hundred balls through twelve rows of pegs, piling into a bell-shaped heap. The shape is a theorem about sums of many independent pieces, and it is exactly the extra assumption Chebyshev’s inequality declines to make.

Set the inequality beside the central limit theorem and the trade becomes explicit. The limit theorem says that a sum of many independent pieces has an approximately bell-shaped distribution, from which the chance of being three standard deviations out is about 0.0027. The inequality says nothing about the shape and gets 0.111 instead.

Forty times worse — and it applies to a single roll of a die, to a quantity built from ten pieces rather than ten thousand, to a distribution nobody has characterised, and to a quantity whose independence is doubtful. The limit theorem’s answer is far better and rests on hypotheses that have to be argued for each time. That is the whole relationship between the two, and it is why both are taught.

There is also a case where the comparison inverts. For a sum of a few heavy-tailed pieces the bell approximation is simply wrong at three standard deviations — the true tail is far heavier than 0.0027 — while Chebyshev’s bound remains true, because it was never approximating anything. A bound that is always right and usually loose is a different kind of object from an approximation that is usually excellent and sometimes badly wrong, and a reader who has only met the second is liable to trust it in the places it fails.

What it costs

Almost nothing, and that is the point.

Applying the inequality costs one variance computation. The variance of a sum of independent quantities is the sum of the variances, so for an average of n copies it is arithmetic; there is no integration, no distribution to characterise, no simulation.

The figures compute their tail masses by summing over the outcomes exactly rather than by sampling, which is possible because the distributions drawn are finite. That distinction matters for what the pictures are evidence of: a sampled tail mass would be an estimate with its own error, and the claim being checked here is an inequality between two exact numbers.

The one figure on this page that does sample is the needle-dropping one, and it is sampling because the subject of that figure is an estimate.

What the picture cannot show

The bound is a statement about every distribution with a finite variance, and every figure here draws a handful of them. A sweep across four distributions is evidence about four distributions; the proof is what covers the rest, and the proof is three lines of algebra that no picture contains.

Nor can a figure of a discrete distribution show what goes wrong for a continuous one with heavy tails. The bars can be made shorter and more numerous, and the divergence that kills the Cauchy case happens out where no drawing extends.

And the extremal distribution is drawn at one value of k. There is a different extremal distribution for every k, and no single distribution meets the bound at more than one window width — which is worth stating because it means the bound is sharp pointwise and not uniformly. There is no distribution for which Chebyshev is tight everywhere.

The ladder from here

Rungs above: Markov’s inequality, which is the same argument one step earlier and from which Chebyshev follows by applying it to the squared deviation. Cantelli’s one-sided bound. Chernoff bounds, where assuming the quantity is a sum of independent bounded pieces buys an exponentially small tail instead of a polynomial one. Hoeffding’s inequality and the concentration of measure phenomenon, where high dimension makes almost every function nearly constant. The Berry–Esseen theorem, which says how fast the bell curve approximation arrives. Martingale concentration, where the independence assumption is weakened to something a process can satisfy. And the median-of-means trick, which converts a bound with a weak tail into one with a strong tail by running the estimate several times.

The shape of the idea

The argument on this page is an instance of a manoeuvre that appears whenever an average is used to bound a part: if a few outcomes were much larger than the average allows, they would drag the average up, so there cannot be many of them.

That is the pigeonhole principle with weights attached. Pigeonhole says that if n + 1 things go into n boxes some box has two; the averaging version says that if the mean of a collection is m, something in it is at least m. Chebyshev is the same observation applied to squared distances, and the sharpness comes from the fact that the observation is exactly right when everything sits at one of two extremes.

What makes it worth its own essay rather than a remark is the second figure. A bound proved by throwing away two whole terms ought to be badly loose, and it is — for every distribution except the one it was, in effect, designed for. Finding that distribution is what turns an inequality from a true statement into a complete answer.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Concentration inequalityConvergence rateExpectationExtremal exampleHeavy tailsNormal distributionRandom walkStandard deviationTail boundVariance