Tutorials › Statistical Theory I - Probability and Distribution Theory › Chebyshev’s Inequality from Centered Second Moments

Probability and Tail Inequalities · Tutorial 899 of 994

Chebyshev's Inequality from Centered Second Moments

See how centering a random variable and bounding its squared deviations yields a distribution-free control on the probability of a large error.

Intermediate 9 min read

What You'll Learn

  • State the finite-variance conditions required for Chebyshev’s inequality.
  • Prove the two-sided tail bound from a pointwise inequality.
  • Identify cases where the bound is exact and understand when it is loose.
  • Convert a variance bound into a deviation threshold for a chosen probability.
  • Apply the inequality to a sample mean using independence.

Why Centered Second Moments Control Tails

Knowing only the mean and variance of a random variable does not determine its distribution. It does, however, constrain how much probability can lie far from the mean. The key is to compare a large deviation with its square: whenever \(X\) is at least \(t\) units from its mean, its squared deviation is at least \(t^2\). Since the expected squared deviation is the variance, this pointwise comparison gives a bound on the probability of a large deviation.

The resulting inequality is useful precisely when more detailed distributional information is unavailable or unwarranted. It requires neither a density nor symmetry nor a particular family of distributions. Its cost is that a bound based on variance alone can be conservative.

Definition: Let \(X\) be a random variable with finite mean \(\mu=E[X]\) and finite variance \(\sigma^2=\operatorname{Var}(X)=E[(X-\mu)^2]\). For any \(t>0\), Chebyshev’s inequality is
$$ P(|X-\mu|\ge t)\le \frac{\sigma^2}{t^2}. $$
Equivalently, writing the mean and variance explicitly,
$$ P(|X-E[X]|\ge t)\le \frac{\operatorname{Var}(X)}{t^2}. $$

The threshold \(t\) is a distance from the mean, and must be positive. The variance has units equal to the square of the units of \(X\), so the ratio \(\sigma^2/t^2\) is dimensionless, as a probability bound must be. If \(\sigma^2/t^2\) exceeds 1, the inequality remains true but may say no more than the elementary fact that a probability is at most 1.

Deriving the Inequality

The proof is an application of Markov’s inequality to the nonnegative random variable \((X-\mu)^2\). For completeness, Markov’s inequality says that if \(Z\ge 0\) almost surely, \(E[Z]<\infty\), and \(a>0\), then \(P(Z\ge a)\le E[Z]/a\). It follows by taking expectations in \(a\,\mathbf{1}_{\{Z\ge a\}}\le Z\).

Theorem: If \(E[X]=\mu\) and \(\operatorname{Var}(X)=\sigma^2<\infty\), then for every \(t>0\),
$$ P(|X-\mu|\ge t)\le \frac{\sigma^2}{t^2}. $$
Proof: The random variable \(Z=(X-\mu)^2\) is nonnegative and has expectation \(E[Z]=\sigma^2<\infty\). Because \(t>0\), the events \(\{|X-\mu|\ge t\}\) and \(\{(X-\mu)^2\ge t^2\}\) are identical. Markov’s inequality, applied with threshold \(t^2\), therefore gives
$$ P(|X-\mu|\ge t) =P((X-\mu)^2\ge t^2) \le \frac{E[(X-\mu)^2]}{t^2} =\frac{\sigma^2}{t^2}. $$
All expectations used are finite by the finite-variance assumption. \(\square\)

This proof also shows why the mean must be the center used in the bound: the expectation of the squared centered variable is exactly the variance. More generally, applying Markov’s inequality to \((X-c)^2\) for another constant \(c\) gives a bound involving \(E[(X-c)^2]\), not necessarily the variance.

Standardized Form and Its Consequences

When \(\sigma>0\), the result can be expressed in units of standard deviations. For \(k>0\), set \(t=k\sigma\). Then

$$ P\left(\left|\frac{X-\mu}{\sigma}\right|\ge k\right) \le \frac{1}{k^2}. $$

No assumption that the standardized variable is normally distributed is involved. The bound says, for example, that at most one quarter of the probability can lie at least two standard deviations from the mean, regardless of the distribution, provided its variance is finite.

Taking complements gives an equivalent way to describe concentration around the mean:

$$ P(|X-\mu|<t)\ge 1-\frac{\sigma^2}{t^2}. $$

If a desired upper bound on the probability outside a tolerance \(t\) is \(\alpha\), where \(0<\alpha\le 1\), choose \(t=\sigma/\sqrt{\alpha}\). Then \(P(|X-\mu|\ge t)\le\alpha\). This is a guarantee based on variance alone; it need not be the smallest tolerance that would work if the distribution were known.

If \(\sigma^2=0\), then \(E[(X-\mu)^2]=0\). A nonnegative random variable with expectation zero is zero almost surely, so \(X=\mu\) almost surely. Thus the tail probability is zero for every \(t>0\), consistent with the inequality.

Worked Example: An Exact Chebyshev Bound

Let \(X\) take values \(-2,0,2\) with probabilities \(1/4,1/2,1/4\), respectively. Find the mean and variance, then apply Chebyshev’s inequality at \(t=2\) and compare the bound with the actual tail probability.

The mean is

$$ E[X]=(-2)\frac14+0\frac12+2\frac14=0. $$

The variance, using the mean just computed, is

$$ \operatorname{Var}(X)=E[X^2] =4\frac14+0\frac12+4\frac14=2. $$

Chebyshev’s inequality gives

$$ P(|X-E[X]|\ge 2)\le \frac{2}{2^2}=\frac12. $$

The event is \(\{|X|\ge2\}\), which occurs exactly when \(X=-2\) or \(X=2\). Therefore

$$ P(|X|\ge2)=\frac14+\frac14=\frac12. $$

The bound is exact in this example: the probability of reaching the threshold equals the variance divided by the squared threshold.

When the Bound Is Sharp

The example above is not an accident. For any prescribed \(t>0\) and any variance \(v\) satisfying \(0<v\le t^2\), one can construct a mean-zero random variable for which Chebyshev’s inequality is an equality. This establishes that no uniformly smaller upper bound depending only on \(v\) and \(t\) can replace \(v/t^2\) throughout this range.

Result: Fix \(t>0\) and \(0<v\le t^2\). Define \(Y\) to equal \(t\) with probability \(v/(2t^2)\), \(-t\) with probability \(v/(2t^2)\), and \(0\) with probability \(1-v/t^2\). Then \(E[Y]=0\), \(\operatorname{Var}(Y)=v\), and
$$ P(|Y-E[Y]|\ge t)=\frac{v}{t^2}. $$
Proof: The three probabilities are nonnegative because \(0<v\le t^2\), and they sum to
$$ \frac{v}{2t^2}+\frac{v}{2t^2}+1-\frac{v}{t^2}=1. $$
Symmetry of the probabilities at \(t\) and \(-t\) gives
$$ E[Y]=t\frac{v}{2t^2}-t\frac{v}{2t^2}=0. $$
Its second moment, and hence its variance, is
$$ \operatorname{Var}(Y)=E[Y^2] =t^2\frac{v}{2t^2}+t^2\frac{v}{2t^2}=v. $$
Finally, \(|Y|\ge t\) holds exactly when \(Y=t\) or \(Y=-t\). Its probability is \(v/(2t^2)+v/(2t^2)=v/t^2\), as claimed. \(\square\)

Sharpness does not mean that every distribution attains the bound. A distribution may put very little probability far from its mean even when its variance is fixed. Chebyshev’s inequality is a worst-case guarantee over distributions with the specified second moment.

Worked Example: A Conservative Bound for a Bernoulli Variable

Suppose \(X\) is Bernoulli with \(P(X=1)=0.2\) and \(P(X=0)=0.8\). Bound the probability that \(X\) differs from its mean by at least \(0.5\), then compute the actual probability.

The mean and variance are

$$ E[X]=0.2,\qquad \operatorname{Var}(X)=0.2(1-0.2)=0.16. $$

Chebyshev’s inequality yields

$$ P(|X-0.2|\ge0.5)\le\frac{0.16}{0.5^2} =\frac{0.16}{0.25}=0.64. $$

To find the actual probability, check each possible value. If \(X=0\), then \(|X-0.2|=0.2<0.5\); if \(X=1\), then \(|X-0.2|=0.8\ge0.5\). Thus the event occurs exactly when \(X=1\), and

$$ P(|X-0.2|\ge0.5)=P(X=1)=0.2. $$

The variance-only bound is valid but substantially larger than the true probability. The construction that makes Chebyshev sharp uses probability at the threshold and at the center; this Bernoulli distribution has a different shape.

Applying the Bound to a Sample Mean

Chebyshev’s inequality can also control the error of an estimator when its variance is known. Suppose \(X_1,\ldots,X_n\) are independent and identically distributed, with \(E[X_i]=\mu\) and \(\operatorname{Var}(X_i)=\sigma^2<\infty\). Their sample mean is \(\bar X=n^{-1}\sum_{i=1}^n X_i\). Independence gives \(\operatorname{Var}(\bar X)=\sigma^2/n\), so the inequality applies directly to \(\bar X\).

$$ P(|\bar X-\mu|\ge t)\le\frac{\sigma^2}{nt^2},\qquad t>0. $$

The factor \(1/n\) makes the bound shrink as the sample size grows. To verify the variance calculation, independence makes every covariance between distinct observations zero:

$$ \operatorname{Var}(\bar X) =\frac{1}{n^2}\operatorname{Var}\left(\sum_{i=1}^n X_i\right) =\frac{1}{n^2}\sum_{i=1}^n\operatorname{Var}(X_i) =\frac{\sigma^2}{n}. $$

The independence assumption matters for this displayed variance formula. Without it, the variance of the sum includes covariance terms, and the same \(1/n\) conclusion does not follow from identical marginal variances alone.

Worked Example: Choosing a Sample Size for a Mean

Let \(X_1,\ldots,X_n\) be independent Bernoulli observations with success probability \(1/2\). Find a sample size that guarantees the sample proportion \(\bar X\) is within \(0.1\) of \(1/2\) with probability at least \(0.95\), using only Chebyshev’s inequality.

Each observation has mean \(1/2\) and variance \((1/2)(1/2)=1/4\). Therefore the sample mean has mean \(1/2\) and variance \(1/(4n)\). Chebyshev’s inequality gives

$$ P\left(\left|\bar X-\frac12\right|\ge0.1\right) \le\frac{1/(4n)}{(0.1)^2} =\frac{1}{0.04n} =\frac{25}{n}. $$

We want the probability of being outside the tolerance to be no more than \(0.05\). It is enough to require

$$ \frac{25}{n}\le0.05, \qquad n\ge\frac{25}{0.05}=500. $$

Thus \(n=500\) suffices. Substitution checks the guarantee: the outside probability is at most \(25/500=0.05\), so

$$ P\left(\left|\bar X-\frac12\right|<0.1\right)\ge0.95. $$

This is a sufficient sample size based on variance alone; it does not claim that 500 is the smallest sample size that could provide the guarantee by some sharper argument.

Common Mistakes and Practical Interpretation

  • Forgetting the finite-variance condition. The inequality requires a finite mean and finite variance. If the variance is infinite, the stated right-hand side is not a finite variance bound.
  • Using the variance instead of its square root as a distance. The threshold \(t\) has the same units as \(X\); the numerator \(\operatorname{Var}(X)\) has squared units. The ratio is \(\sigma^2/t^2\), not \(\sigma^2/t\).
  • Assuming the bound is an exact probability. It is an upper bound. As the Bernoulli example shows, the actual tail probability can be much smaller.
  • Assuming a particular distributional shape. Chebyshev’s inequality does not require normality, symmetry, or a continuous distribution. Its strength is that it applies without those assumptions.
  • Ignoring a bound above one. If \(\sigma^2/t^2>1\), the inequality is true but uninformative. A probability cannot exceed one, so the useful combined bound is \(\min(1,\sigma^2/t^2)\).
Key takeaway: Finite variance controls the two-sided probability of a large deviation from the mean: \(P(|X-E[X]|\ge t)\le\operatorname{Var}(X)/t^2\). The guarantee is distribution-free, and its usefulness depends on the size of the variance relative to the squared tolerance.

Check Your Understanding

Answer each question using the finite-variance assumptions and the event threshold carefully.

  1. If \(E[X]=4\), \(\operatorname{Var}(X)=9\), and \(t=6\), what upper bound does Chebyshev’s inequality give for \(P(|X-4|\ge6)\)?
  2. Why does applying Markov’s inequality to \((X-E[X])^2\) produce a threshold of \(t^2\), rather than \(t\)?
  3. For what values of \(v\) and \(t\) does the three-point construction in the sharpness result attain equality?
  4. If \(\operatorname{Var}(X)=0\), what can be concluded about \(X\) relative to its mean, almost surely?
  5. For independent, identically distributed observations with variance \(\sigma^2\), what variance of the sample mean leads to the bound \(\sigma^2/(nt^2)\)?