Markov and Chebyshev

How likely is a bad answer?

2026-11-16

Tail Bounds

Let X be a random estimate of a target \mu.

\underbrace{\Pr(|X-\mu|\geq\varepsilon)}_{\text{probability of a bad answer}} \leq \underbrace{\delta}_{\text{allowed failure probability}}.

  • \varepsilon measures the size of the error.
  • \delta measures how often we allow that error.

Markov’s inequality

Suppose X\geq0 and \mathbb E[X]<\infty. For every t>0,

\boxed{\Pr(X\geq t)\leq\frac{\mathbb E[X]}{t}.}

Indicator random variables

For an event A, the indicator of A is the random variable \mathbf 1_A=\begin{cases} 1 & \text{if } A \text{ occurs},\\ 0 & \text{otherwise}. \end{cases}

Its expectation is the probability of the event: \boxed{\mathbb E[\mathbf 1_A]=\Pr(A).}

You will prove this in the homework.

Markov’s inequality: Proof

Take the bad event A=\{X\geq t\}, so \mathbf 1_{\{X\geq t\}} is 1 when X\geq t and 0 otherwise. We claim X\geq t\,\mathbf 1_{\{X\geq t\}}.

  • If X\geq t, the right side is t, and X\geq t holds.
  • If X<t, the right side is 0, and X\geq0 holds.

Take expectations, then divide by t: \mathbb E[X] \geq t\,\mathbb E[\mathbf 1_{\{X\geq t\}}] =t\,\Pr(X\geq t).

Markov is tight

Fix t>0 and 0<p\leq1. Let X=\begin{cases} t & \text{with probability }p,\\ 0 & \text{with probability }1-p. \end{cases}

\mathbb E[X]=tp, \qquad \Pr(X\geq t)=p=\frac{\mathbb E[X]}{t}.

A stronger general guarantee needs more information.

Yes, tight, but usually loose

Three nonnegative distributions, each with \mathbb E[X]=1, sampled 200{,}000 times.

The bound always holds, but it ignores the shape of the distribution.

Markov in tail-bound form

An estimate X of \mu can miss in either direction, but the error |X-\mu| is always nonnegative.

Apply Markov to Y=|X-\mu| with threshold \varepsilon: \Pr(|X-\mu|\geq\varepsilon)\leq\frac{\mathbb E\,|X-\mu|}{\varepsilon}.

This is a valid guarantee, but it has two weaknesses.

  • \mathbb E\,|X-\mu| is hard to compute, even for an average of independent terms.
  • The bound only decays like 1/\varepsilon.

Pause: a better bound

Suppose \mathbb E[X]=\mu and \operatorname{Var}(X)=\sigma^2.

We want to bound \Pr(|X-\mu|\geq t).

Which other nonnegative random variable could we put into Markov’s inequality?

Square the deviation

Use the nonnegative random variable Y=(X-\mu)^2, \qquad \mathbb E[Y]=\sigma^2, with threshold t^2.

The bad event does not change: \{|X-\mu|\geq t\}=\{Y\geq t^2\}.

Chebyshev’s inequality

If X has mean \mu and finite variance \sigma^2, then for t>0, \boxed{\Pr(|X-\mu|\geq t)\leq\frac{\sigma^2}{t^2}.}

\begin{aligned} \Pr(|X-\mu|\geq t) &=\Pr\big((X-\mu)^2\geq t^2\big)\\ &\leq\frac{\mathbb E[(X-\mu)^2]}{t^2} =\frac{\sigma^2}{t^2}. \end{aligned}

Distances measured in standard deviations

For \sigma>0, set t=c\sigma. Then \Pr(|X-\mu|\geq c\sigma)\leq\frac1{c^2}.

c 2 5 10
Upper bound 25\% 4\% 1\%

This holds for every distribution with finite variance.

Chebyshev in simulation

Three distributions standardized to \mu=0, \sigma=1. Note the log scale.

Heavy tails come closest to the bound. The Gaussian falls off much faster.

Averaging reduces the variance

Let X_1,\ldots,X_m be independent with common mean \mu and variance \sigma^2, and \overline X=\frac1m\sum_{i=1}^m X_i.

\begin{aligned} \operatorname{Var}(\overline X) &=\frac1{m^2}\operatorname{Var}\Big(\sum_{i=1}^m X_i\Big)\\ &=\frac1{m^2}\sum_{i=1}^m\operatorname{Var}(X_i) =\frac{\sigma^2}{m}. \end{aligned}

Since \mathbb E[\overline X]=\mu, Chebyshev with t=\varepsilon gives \boxed{\Pr(|\overline X-\mu|\geq\varepsilon) \leq\frac{\sigma^2}{m\varepsilon^2}.}

Averages concentrate

Simulated \widehat p for fair coin flips (p=1/2), 20{,}000 repetitions each. The shaded band is |\widehat p-p|<0.05.

Each fourfold increase in m halves the spread: \operatorname{sd}(\widehat p)=\sigma/\sqrt m.

Chebyshev is safe, but pessimistic

Fraction of 200{,}000 simulated polls with |\widehat p-p|\geq0.05, for p=1/2.

The guarantee holds, but far fewer trials suffice. Chebyshev only uses the variance.

What we can now guarantee

Markov: a nonnegative quantity with a small mean is unlikely to be large.

Chebyshev: a small variance controls deviations from the mean.

For averages, Chebyshev gives \Pr(\text{error}\geq\varepsilon)\leq\frac{\sigma^2}{m\varepsilon^2}.

Next: what if thousands of estimates must all be accurate?