Tutorials › Statistical Theory I - Probability and Distribution Theory › Binomial Tail Bounds and Relative Entropy

Probability and Tail Inequalities · Tutorial 907 of 994

Binomial Tail Bounds and Relative Entropy

Learn to optimize binomial Chernoff bounds and interpret their exponents through the relative entropy between two Bernoulli distributions.

Intermediate 10 min read

What You'll Learn

  • Derive the moment-generating function of a binomial count from its Bernoulli trials
  • Optimize the exponential bound for upper and lower tail events
  • Express the optimized exponent as Bernoulli Kullback–Leibler divergence
  • Apply the bounds at integer thresholds and handle endpoint cases
  • Compare an exponential bound with an exact binomial tail

Why Binomial Tails Have a Relative-Entropy Exponent

A binomial random variable counts successes in repeated trials with the same success probability. When the observed success fraction is far from that probability, its tail probability can be small, often on an exponential scale in the number of trials. Chernoff’s method makes this precise: an exponential transform gives a bound, and optimizing its parameter produces an exponent with a recognizable information-theoretic form.

The key quantity is the Kullback–Leibler divergence between two Bernoulli distributions. In this setting, one Bernoulli distribution has the trial’s actual success probability \(p\); the other has success probability equal to the tail threshold \(x\). The divergence measures the exponential cost associated with a success fraction \(x\) that differs from \(p\).

Definition: Let \(0<p<1\). For \(0\leq x\leq 1\), the Bernoulli Kullback–Leibler divergence from success probability \(p\) to success probability \(x\) is $$ D(x\|p)=x\log\!\left(\frac{x}{p}\right)+(1-x)\log\!\left(\frac{1-x}{1-p}\right). $$ At \(x=0\) or \(x=1\), terms of the form \(0\log 0\) are interpreted as \(0\). In particular, \(D(0\|p)=\log(1/(1-p))\) and \(D(1\|p)=\log(1/p)\).

The order of the arguments matters: \(D(x\|p)\) is generally not the same as \(D(p\|x)\). The threshold fraction \(x\) is the first argument; the binomial model’s success probability \(p\) is the second. For \(x\) in \((0,1)\), differentiating with respect to \(x\) gives

$$ \frac{\partial}{\partial x}D(x\|p)=\log\!\left(\frac{x(1-p)}{p(1-x)}\right), \qquad \frac{\partial^2}{\partial x^2}D(x\|p)=\frac{1}{x(1-x)}>0. $$

Thus \(D(x\|p)\) is strictly convex as a function of \(x\), has its minimum at \(x=p\), and that minimum is \(D(p\|p)=0\). In particular, the divergence is positive whenever \(x\neq p\).

The Binomial Tail Bound

Suppose \(X\sim\operatorname{Bin}(n,p)\), where \(n\) is a positive integer and \(0<p<1\). Equivalently, write \(X=Y_1+\cdots+Y_n\), where the \(Y_i\) are independent Bernoulli random variables with \(P(Y_i=1)=p\) and \(P(Y_i=0)=1-p\). For any real \(t\),

$$ E[e^{tX}] =\prod_{i=1}^n E[e^{tY_i}] =(1-p+pe^t)^n. $$

This moment-generating function is the input to exponential Markov bounds. For the upper tail, take \(t>0\); for the lower tail, take \(t<0\). The sign determines which tail event implies a large value of the nonnegative variable to which Markov’s inequality is applied.

Theorem: Let \(X\sim\operatorname{Bin}(n,p)\), with \(0<p<1\). For \(p\leq x\leq1\), $$ P(X\geq nx)\leq \exp\{-nD(x\|p)\}. $$ For \(0\leq x\leq p\), $$ P(X\leq nx)\leq \exp\{-nD(x\|p)\}. $$ The thresholds \(nx\) need not be integers. If \(p=0\) or \(p=1\), then \(X\) is deterministic and its tail probabilities can be evaluated directly.

Here is the full optimization for interior thresholds. When \(p<x<1\), the exponential Markov inequality gives, for every \(t>0\),

$$ P(X\geq nx) =P(e^{tX}\geq e^{tnx}) \leq e^{-tnx}(1-p+pe^t)^n. $$

The logarithm of the right-hand side, divided by \(n\), is \(-tx+\log(1-p+pe^t)\). Its derivative with respect to \(t\) is \(-x+pe^t/(1-p+pe^t)\). Setting this derivative to zero gives

$$ e^{t_*}=\frac{x(1-p)}{p(1-x)}, \qquad t_*=\log\!\left(\frac{x(1-p)}{p(1-x)}\right). $$

Since \(x>p\), the ratio inside the logarithm exceeds \(1\), so \(t_*>0\) is an admissible upper-tail parameter. Substitution gives \(1-p+pe^{t_*}=(1-p)/(1-x)\). Therefore

$$ -t_*x+\log(1-p+pe^{t_*}) =-x\log\!\left(\frac{x(1-p)}{p(1-x)}\right) +\log\!\left(\frac{1-p}{1-x}\right) =-D(x\|p). $$

This proves the upper-tail inequality for \(p<x<1\). At \(x=p\), the choice \(t=0\) gives the bound \(1\). At \(x=1\), the event is \(X=n\), which has probability \(p^n=\exp\{-nD(1\|p)\}\).

For the lower tail, let \(0<x<p\) and choose \(t<0\). If \(X\leq nx\), then \(e^{tX}\geq e^{tnx}\), so

$$ P(X\leq nx)\leq e^{-tnx}(1-p+pe^t)^n. $$

The same derivative equation gives \(t_*= \log(x(1-p)/(p(1-x)))\). This time \(x<p\), so \(t_*<0\), as required. Substitution again gives \(-D(x\|p)\) for the logarithm of the optimized bound divided by \(n\). At \(x=p\), the bound is \(1\); at \(x=0\), \(P(X\leq0)=(1-p)^n=\exp\{-nD(0\|p)\}\). This proves both claims. \(\square\)

Worked Applications

Worked Example: An Upper Tail With Threshold Fraction One-Half

Let \(X\sim\operatorname{Bin}(20,0.3)\). Bound the probability of at least 10 successes. The threshold fraction is \(x=10/20=0.5\), which exceeds \(p=0.3\), so the upper-tail result applies.

First compute the divergence:

$$ D(0.5\|0.3) =0.5\log\!\left(\frac{0.5}{0.3}\right) +0.5\log\!\left(\frac{0.5}{0.7}\right) \approx 0.08718. $$

The optimizing parameter is \(t_*=\log(0.5(0.7)/(0.3(0.5)))=\log(7/3)\approx0.84730\), which is positive. The resulting bound is

$$ P(X\geq10)\leq \exp\{-20D(0.5\|0.3)\} \approx e^{-1.7436}\approx0.175. $$

This is an upper bound, not an estimate of the exact probability. It shows that the chance of reaching at least half successes is no greater than about \(0.175\) according to this Chernoff bound.

Worked Example: A Lower Tail Below the Mean

Let \(X\sim\operatorname{Bin}(15,0.6)\). We want a bound for \(P(X\leq5)\). Here \(x=5/15=1/3\), and \(x<p\), so use the lower-tail inequality.

The divergence is

$$ \begin{aligned} D(1/3\|0.6) &=\frac13\log\!\left(\frac{1/3}{3/5}\right) +\frac23\log\!\left(\frac{2/3}{2/5}\right)\\ &=\frac13\log(5/9)+\frac23\log(5/3) \approx 0.14462. \end{aligned} $$

The optimizing parameter is \(t_*=\log((1/3)(0.4)/(0.6(2/3)))=\log(1/3)\approx-1.09861\). It is negative, as required for the lower-tail argument. Thus

$$ P(X\leq5)\leq \exp\{-15D(1/3\|0.6)\} \approx e^{-2.1693}\approx0.114. $$

The threshold of five is well below the mean \(15(0.6)=9\), and the positive divergence produces a nontrivial exponential bound.

Worked Example: Checking a Bound Against an Exact Tail

Let \(X\sim\operatorname{Bin}(10,0.2)\), and consider \(P(X\geq8)\). The threshold fraction is \(x=0.8\). In this case,

$$ D(0.8\|0.2) =0.8\log 4+0.2\log(1/4) =0.6\log4. $$

Therefore the Chernoff bound is

$$ P(X\geq8)\leq e^{-10(0.6\log4)} =4^{-6} =\frac{1}{4096} \approx0.00024414. $$

For comparison, the exact tail is the sum of the probabilities for 8, 9, and 10 successes:

$$ \begin{aligned} P(X\geq8) &=\binom{10}{8}(0.2)^8(0.8)^2 +\binom{10}{9}(0.2)^9(0.8) +(0.2)^{10}\\ &=0.000073728+0.000004096+0.0000001024\\ &=0.0000779264. \end{aligned} $$

The exact probability is below the bound, as required, and is about one-third of its value. A Chernoff bound need not equal the exact tail; its appeal is that it gives an explicit exponential bound without summing all the relevant binomial probabilities.

Thresholds, Interpretation, and a Common Pitfall

For integer thresholds, set \(x=k/n\). If \(k\) is an integer with \(k\geq np\), then \(P(X\geq k)\leq\exp\{-nD(k/n\|p)\}\). If \(k\leq np\), then \(P(X\leq k)\leq\exp\{-nD(k/n\|p)\}\). If a requested threshold is not an integer, the event still has its literal meaning: for example, \(X\geq nx\) is equivalent to \(X\geq\lceil nx\rceil\). The theorem’s bound at the real threshold \(nx\) remains valid because the event itself implies \(X\geq nx\).

The exponent scales linearly with \(n\). For a fixed threshold fraction \(x\neq p\), the bound is \(\exp\{-nD(x\|p)\}\), so increasing the number of trials makes the bound decrease exponentially. The divergence is the rate in this bound: larger separation between the threshold fraction and \(p\) generally means a larger exponent. This connects the binomial tail calculation to the convex rate-function perspective of Chernoff optimization.

Common mistake: using the wrong sign for the exponential parameter. For an upper tail, a student might take \(t<0\) and write \(P(X\geq nx)\leq e^{-tnx}E[e^{tX}]\). But when \(t<0\), \(X\geq nx\) implies \(e^{tX}\leq e^{tnx}\), not \(e^{tX}\geq e^{tnx}\); the Markov step does not follow. The correction is to use \(t>0\) for the upper tail. For the lower tail, use \(t<0\), because \(X\leq nx\) then implies \(e^{tX}\geq e^{tnx}\).

A second useful check is that the bound is \(1\) when \(x=p\), since \(D(p\|p)=0\). A threshold on the wrong side of the mean does not give the corresponding one-sided exponential bound by this optimization: for instance, an upper-tail threshold below \(p\) is not a rare upper-tail event, and the claimed rate would not describe it.

Key takeaway: For a binomial count, optimizing exponential Markov bounds gives the upper- and lower-tail exponents \(nD(x\|p)\). The threshold fraction \(x\) and model probability \(p\) must be placed in the correct order in the Bernoulli divergence.

Check Your Understanding

Use the definitions and optimization above to answer these questions.

  1. For \(X\sim\operatorname{Bin}(n,p)\), which sign of \(t\) makes exponential Markov applicable to \(P(X\geq nx)\), and why?
  2. Write \(D(0\|p)\) and \(D(1\|p)\) explicitly for \(0<p<1\).
  3. For \(n=12\), \(p=0.4\), and the event \(X\leq3\), identify \(x\) and state which tail inequality applies.
  4. Explain why the optimized parameter is negative when \(0<x<p\).
  5. In the worked exact-tail comparison, why is the Chernoff result an upper bound rather than an exact probability?