concentration-inequalities.html

Lecture 9: Concentration Inequalities

EECS 126 (UC Berkeley) · Spring 2026 · February 17, 2026

Reading: Bertsekas & Tsitsiklis, §5.1; supplementary notes on concentration inequalities.

These are my personal notes from Professor Kannan Ramchandran’s EECS 126 (Probability and Random Processes) course at UC Berkeley.

Topics: Markov’s inequality, Chebyshev’s inequality, the Chernoff bound, Jensen’s inequality, Hoeffding’s inequality, and a first look at the law of large numbers and the central limit theorem. Each bound trades more information about XX for a tighter estimate of a tail probability.

Markov’s Inequality

Theorem 9.1 (Markov’s inequality)

If X≥0X \ge 0 and a>0a > 0, then

P(X≥a)≤E[X]a.(9.1)\PP(X \ge a) \le \frac{\EE[X]}{a}. \tag{9.1}
Proof.

Compare XX with the random variable a 1{X≥a}a\,\mathbf{1}\{X \ge a\} pointwise:

  • if X≥aX \ge a:   a 1{X≥a}=a≤X\;a\,\mathbf{1}\{X \ge a\} = a \le X;
  • if X<aX < a:   a 1{X≥a}=0≤X\;a\,\mathbf{1}\{X \ge a\} = 0 \le X, since X≥0X \ge 0.

So X≥a 1{X≥a}X \ge a\,\mathbf{1}\{X \ge a\} always. Taking expectations, and using E[1A]=P(A)\EE[\mathbf{1}_A] = \PP(A),

E[X]≥a E[1{X≥a}]=a P(X≥a).\EE[X] \ge a\,\EE\bigl[\mathbf{1}\{X \ge a\}\bigr] = a\,\PP(X \ge a).

Dividing by a>0a > 0 gives (9.1).

The line x lies above the step function a·1{x ≥ a}, which jumps from 0 to a at x = a

For x≥0x \ge 0, the line xx lies above the step a 1{x≥a}a\,\mathbf{1}\{x \ge a\}; averaging both sides gives Markov.

Example 9.1 (Markov for an exponential)

Let X∼Exponential⁡(1)X \sim \operatorname{Exponential}(1), so E[X]=1\EE[X] = 1 (Lecture 8) and P(X≥a)=∫a∞e−x dx=[−e−x]a∞=e−a\PP(X \ge a) = \int_a^\infty e^{-x}\,dx = \Bigl[-e^{-x}\Bigr]_a^\infty = e^{-a}. Markov gives

P(X≥a)≤1a.\PP(X \ge a) \le \frac{1}{a}.

At a=5a = 5: Markov gives 0.20.2, while the exact value is e−5≈0.0067e^{-5} \approx 0.0067.

Markov cannot be improved using only the mean. Fix m=E[X]m = \EE[X] and a≥ma \ge m. The random variable

X={aw.p. ma,0w.p. 1−maX = \begin{cases} a & \text{w.p. } \frac{m}{a}, \\[2pt] 0 & \text{w.p. } 1 - \frac{m}{a} \end{cases}

has E[X]=a⋅ma=m\EE[X] = a \cdot \frac{m}{a} = m and P(X≥a)=ma=E[X]a\PP(X \ge a) = \frac{m}{a} = \frac{\EE[X]}{a}, so (9.1) holds with equality. To do better, we need more information about XX.

Chebyshev’s Inequality

Theorem 9.2 (Chebyshev’s inequality)

If XX has mean μ\mu and variance σ2\sigma^2, then for every c>0c > 0,

P(∣X−μ∣≥c)≤σ2c2.\PP\bigl(|X - \mu| \ge c\bigr) \le \frac{\sigma^2}{c^2}.

With c=kσc = k\sigma:

P(∣X−μ∣≥kσ)≤1k2.\PP\bigl(|X - \mu| \ge k\sigma\bigr) \le \frac{1}{k^2}.
Proof.

Both sides of ∣X−μ∣≥c|X - \mu| \ge c are nonnegative, so squaring does not change the event: {∣X−μ∣≥c}={(X−μ)2≥c2}\{|X - \mu| \ge c\} = \{(X - \mu)^2 \ge c^2\}. Apply Markov to the nonnegative random variable (X−μ)2(X - \mu)^2 with a=c2a = c^2:

P(∣X−μ∣≥c)=P((X−μ)2≥c2)≤E[(X−μ)2]c2=σ2c2.\PP\bigl(|X - \mu| \ge c\bigr) = \PP\bigl((X - \mu)^2 \ge c^2\bigr) \le \frac{\EE\bigl[(X - \mu)^2\bigr]}{c^2} = \frac{\sigma^2}{c^2}.
The parabola ((x − μ)/c)² lies above the indicator 1{|x − μ| ≥ c}, which is 1 outside μ ± c and 0 inside

The parabola (x−μc)2\bigl(\frac{x-\mu}{c}\bigr)^2 lies above the indicator; averaging both sides gives Chebyshev. It uses the variance, not just the mean.

Example 9.2 (Chebyshev for a uniform)

Let X∼Uniform⁡[0,1]X \sim \operatorname{Uniform}[0,1]. Then μ=12\mu = \frac12, E[X2]=∫01x2 dx=13\EE[X^2] = \int_0^1 x^2\,dx = \frac13, and

σ2=E[X2]−μ2=13−14=112.\sigma^2 = \EE[X^2] - \mu^2 = \frac13 - \frac14 = \frac{1}{12}.

With c=0.4c = 0.4, the exact value is P(∣X−12∣≥0.4)=P(X≤0.1)+P(X≥0.9)=0.1+0.1=0.2\PP(|X - \tfrac12| \ge 0.4) = \PP(X \le 0.1) + \PP(X \ge 0.9) = 0.1 + 0.1 = 0.2, while

P(∣X−12∣≥0.4)≤1/12(0.4)2=112⋅0.16=11.92≈0.52.\PP\bigl(|X - \tfrac12| \ge 0.4\bigr) \le \frac{1/12}{(0.4)^2} = \frac{1}{12 \cdot 0.16} = \frac{1}{1.92} \approx 0.52.
Example 9.3 (Polling with Chebyshev)

To estimate the fraction pp of voters who support a candidate, poll nn people independently. Let Xi∼Bernoulli⁡(p)X_i \sim \Bern(p) indicate support and Mn=1n∑i=1nXiM_n = \frac1n\sum_{i=1}^n X_i. How large must nn be so that P(∣Mn−p∣≥0.01)≤0.05\PP(|M_n - p| \ge 0.01) \le 0.05?

E[Mn]=p\EE[M_n] = p and Var⁡(Mn)=p(1−p)n\Var(M_n) = \frac{p(1-p)}{n} (Lecture 4 and Lecture 10). Since pp is unknown, bound the variance:

p(1−p)=14−(p−12)2≤14.p(1 - p) = \frac14 - \Bigl(p - \frac12\Bigr)^2 \le \frac14.

By Chebyshev with c=εc = \varepsilon,

P(∣Mn−p∣≥ε)≤p(1−p)nε2≤14nε2.\PP\bigl(|M_n - p| \ge \varepsilon\bigr) \le \frac{p(1-p)}{n\varepsilon^2} \le \frac{1}{4n\varepsilon^2}.

Setting 14nε2≤δ\frac{1}{4n\varepsilon^2} \le \delta with ε=0.01\varepsilon = 0.01, δ=0.05\delta = 0.05:

n≥14ε2δ=14 (0.01)2 (0.05)=10.00002=50,000.n \ge \frac{1}{4\varepsilon^2\delta} = \frac{1}{4\,(0.01)^2\,(0.05)} = \frac{1}{0.00002} = 50{,}000.

The Chernoff Bound

Theorem 9.3 (Chernoff bound)

For every bb and every s>0s > 0,

P(X≥b)≤e−sb MX(s),MX(s)=E[esX],\PP(X \ge b) \le e^{-sb}\, M_X(s), \qquad M_X(s) = \EE\bigl[e^{sX}\bigr],

and therefore

P(X≥b)≤min⁡s>0  e−sb MX(s).\PP(X \ge b) \le \min_{s > 0}\; e^{-sb}\, M_X(s).

For the lower tail, P(X≤b)≤min⁡s<0  e−sb MX(s)\PP(X \le b) \le \min_{s < 0}\; e^{-sb}\, M_X(s).

Proof.

For s>0s > 0, x↦esxx \mapsto e^{sx} is strictly increasing, so {X≥b}={esX≥esb}\{X \ge b\} = \{e^{sX} \ge e^{sb}\}. Apply Markov to the nonnegative random variable esXe^{sX}:

P(X≥b)=P(esX≥esb)≤E[esX]esb=e−sb MX(s).\PP(X \ge b) = \PP\bigl(e^{sX} \ge e^{sb}\bigr) \le \frac{\EE\bigl[e^{sX}\bigr]}{e^{sb}} = e^{-sb}\, M_X(s).

This holds for every s>0s > 0, so it holds for the minimizing ss. For s<0s < 0, x↦esxx \mapsto e^{sx} is strictly decreasing, so {X≤b}={esX≥esb}\{X \le b\} = \{e^{sX} \ge e^{sb}\}, and the same argument gives the lower-tail bound.

The exponential e^{s(x − b)} lies above the indicator 1{x ≥ b}, which jumps from 0 to 1 at x = b

For any s>0s > 0, the exponential es(x−b)e^{s(x-b)} lies above the indicator 1{x≥b}\mathbf{1}\{x \ge b\}; averaging gives P(X≥b)≤e−sbMX(s)\PP(X \ge b) \le e^{-sb}M_X(s), and we choose ss to make the curve hug the indicator as tightly as possible.

Example 9.4 (Gaussian tail)

Let Z∼N(0,1)Z \sim \mathcal{N}(0,1), so MZ(s)=es2/2M_Z(s) = e^{s^2/2} (Lecture 8). For t>0t > 0,

P(Z≥t)≤min⁡s>0  e−st+s2/2.\PP(Z \ge t) \le \min_{s > 0}\; e^{-st + s^2/2}.

The exponent h(s)=s22−sth(s) = \frac{s^2}{2} - st has h′(s)=s−t=0h'(s) = s - t = 0 at s⋆=ts^\star = t, and h(t)=t22−t2=−t22h(t) = \frac{t^2}{2} - t^2 = -\frac{t^2}{2}. Therefore

P(Z≥t)≤e−t2/2.\PP(Z \ge t) \le e^{-t^2/2}.

Compare with Chebyshev, which gives P(Z≥t)≤P(∣Z∣≥t)≤1t2\PP(Z \ge t) \le \PP(|Z| \ge t) \le \frac{1}{t^2}:

Log-scale plot for t from 1 to 4 of three curves: Chebyshev 1/t², Chernoff e^{−t²/2}, and the exact tail 1 − Φ(t)

Chebyshev decays polynomially; Chernoff decays like the true tail, up to a smaller factor.

Example 9.5 (Chernoff for coin flips)

Let Sn∼Binomial⁡(n,p)S_n \sim \Bin(n, p), a sum of nn independent Bernoulli⁡(p)\Bern(p) flips, so MSn(s)=(1−p+pes)nM_{S_n}(s) = \bigl(1 - p + pe^s\bigr)^n: each flip has E[esXi]=(1−p)e0+pes\EE[e^{sX_i}] = (1-p)e^{0} + pe^{s}, and the MGF of an independent sum is the product (Lecture 8). For p<q<1p < q < 1,

P(Sn≥qn)≤min⁡s>0  e−sqn(1−p+pes)n=min⁡s>0  exp⁡(n[−sq+ln⁡(1−p+pes)]).\PP(S_n \ge qn) \le \min_{s > 0}\; e^{-sqn}\bigl(1 - p + pe^s\bigr)^n = \min_{s > 0}\; \exp\Bigl(n\bigl[-sq + \ln(1 - p + pe^s)\bigr]\Bigr).

Set the derivative of the bracket to zero:

−q+pes1−p+pes=0  ⟹  pes=q(1−p+pes)  ⟹  pes(1−q)=q(1−p)  ⟹  es⋆=q(1−p)p(1−q),-q + \frac{pe^s}{1 - p + pe^s} = 0 \;\Longrightarrow\; pe^s = q(1 - p + pe^s) \;\Longrightarrow\; pe^s(1 - q) = q(1 - p) \;\Longrightarrow\; e^{s^\star} = \frac{q(1-p)}{p(1-q)},

and s⋆>0s^\star > 0 since q>pq > p. At s⋆s^\star, 1−p+pes⋆=1−p+q(1−p)1−q=(1−p)(1−q+q)1−q=1−p1−q1 - p + pe^{s^\star} = 1 - p + \frac{q(1-p)}{1-q} = \frac{(1-p)(1 - q + q)}{1 - q} = \frac{1-p}{1-q}, so the bracket equals

−qln⁡q(1−p)p(1−q)+ln⁡1−p1−q=−qln⁡qp−qln⁡1−p1−q+ln⁡1−p1−q=−qln⁡qp+(1−q)ln⁡1−p1−q=−[qln⁡qp+(1−q)ln⁡1−q1−p]≜−D(q ∥ p).\begin{aligned} -q\ln\frac{q(1-p)}{p(1-q)} + \ln\frac{1-p}{1-q} &= -q\ln\frac{q}{p} - q\ln\frac{1-p}{1-q} + \ln\frac{1-p}{1-q} \\ &= -q\ln\frac{q}{p} + (1 - q)\ln\frac{1-p}{1-q} \\ &= -\Bigl[q\ln\frac{q}{p} + (1 - q)\ln\frac{1-q}{1-p}\Bigr] \triangleq -D(q \,\|\, p). \end{aligned}

Therefore

P(Sn≥qn)≤e−n D(q∥p).\PP(S_n \ge qn) \le e^{-n\,D(q \| p)}.

Numbers. n=100n = 100 fair flips (p=12p = \frac12), at least 7575 heads (q=34q = \frac34):

D(34 ∥ 12)=34ln⁡3/41/2+14ln⁡1/41/2=34ln⁡1.5+14ln⁡0.5≈0.304−0.173=0.131.D\bigl(\tfrac34 \,\|\, \tfrac12\bigr) = \tfrac34\ln\tfrac{3/4}{1/2} + \tfrac14\ln\tfrac{1/4}{1/2} = \tfrac34\ln 1.5 + \tfrac14\ln 0.5 \approx 0.304 - 0.173 = 0.131.
MarkovE[Sn]75=5075\frac{\EE[S_n]}{75} = \frac{50}{75}≈0.67\approx 0.67
ChebyshevP(∣Sn−50∣≥25)≤Var⁡(Sn)252=25625\PP(\lvert S_n - 50\rvert \ge 25) \le \frac{\Var(S_n)}{25^2} = \frac{25}{625}=0.04= 0.04
Chernoffe−100 D(3/4∥1/2)≈e−13.1e^{-100\,D(3/4 \Vert 1/2)} \approx e^{-13.1}≈2.1×10−6\approx 2.1 \times 10^{-6}
Exact∑k=75100(100k)2−100\sum_{k=75}^{100}\binom{100}{k}2^{-100}≈2.8×10−7\approx 2.8 \times 10^{-7}

Jensen’s Inequality

Definition 9.1 (Convex function)

A function gg is convex if for all x,yx, y and λ∈[0,1]\lambda \in [0,1],

g(λx+(1−λ)y)≤λg(x)+(1−λ)g(y):(9.23)g\bigl(\lambda x + (1 - \lambda)y\bigr) \le \lambda g(x) + (1 - \lambda) g(y): \tag{9.23}

every chord lies above the graph. If gg is differentiable, convexity is equivalent to every tangent line lying below the graph:

g(x)≥g(c)+g′(c)(x−c)for all x,c.(9.24)g(x) \ge g(c) + g'(c)(x - c) \qquad \text{for all } x, c. \tag{9.24}

gg is concave if −g-g is convex. Examples: x2x^2, esxe^{sx}, ∣x∣|x| are convex; ln⁡x\ln x and x\sqrt{x} are concave on (0,∞)(0, \infty).

Theorem 9.4 (Jensen’s inequality)

If gg is convex, then

g(E[X])≤E[g(X)].g\bigl(\EE[X]\bigr) \le \EE\bigl[g(X)\bigr].

If gg is concave, the inequality reverses: g(E[X])≥E[g(X)]g\bigl(\EE[X]\bigr) \ge \EE\bigl[g(X)\bigr].

Proof.

Take the tangent line (9.24) at c=E[X]c = \EE[X] and substitute x=Xx = X:

g(X)≥g(E[X])+g′(E[X])(X−E[X]).g(X) \ge g\bigl(\EE[X]\bigr) + g'\bigl(\EE[X]\bigr)\bigl(X - \EE[X]\bigr).

Take expectations. g(E[X])g(\EE[X]) and g′(E[X])g'(\EE[X]) are constants, and E[X−E[X]]=0\EE\bigl[X - \EE[X]\bigr] = 0:

E[g(X)]≥g(E[X])+g′(E[X])⋅0=g(E[X]).\EE\bigl[g(X)\bigr] \ge g\bigl(\EE[X]\bigr) + g'\bigl(\EE[X]\bigr) \cdot 0 = g\bigl(\EE[X]\bigr).

(For a convex gg that is not differentiable, the same argument works with any supporting line through (E[X],g(E[X]))(\EE[X], g(\EE[X])).) For concave gg, apply the result to −g-g.

A convex curve g(x) with a chord between x_1 and x_2; at E[X] the chord's midpoint E[g(X)] lies above the curve's value g(E[X]), and the tangent at E[X] lies below the curve

For XX equal to x1x_1 or x2x_2 with probability 12\frac12 each, E[g(X)]\EE[g(X)] is the midpoint of the chord, which lies above g(E[X])g(\EE[X]) on the curve.

Example 9.6 (Consequences of Jensen)
  1. g(x)=x2g(x) = x^2 (convex): (E[X])2≤E[X2]\bigl(\EE[X]\bigr)^2 \le \EE[X^2], i.e. Var⁡(X)=E[X2]−(E[X])2≥0\Var(X) = \EE[X^2] - (\EE[X])^2 \ge 0.
  2. g(x)=esxg(x) = e^{sx} (convex): esE[X]≤MX(s)e^{s\EE[X]} \le M_X(s), so an MGF is never smaller than esE[X]e^{s\EE[X]}.
  3. g(x)=ln⁡xg(x) = \ln x (concave): E[ln⁡X]≤ln⁡E[X]\EE[\ln X] \le \ln \EE[X]. For XX uniform on positive numbers {x1,…,xn}\{x_1, \ldots, x_n\}, 1n∑i=1nln⁡xi≤ln⁡(1n∑i=1nxi)  ⟹  (∏i=1nxi)1/n≤1n∑i=1nxi,\frac1n \sum_{i=1}^n \ln x_i \le \ln\Bigl(\frac1n\sum_{i=1}^n x_i\Bigr) \;\Longrightarrow\; \Bigl(\prod_{i=1}^n x_i\Bigr)^{1/n} \le \frac1n \sum_{i=1}^n x_i, the arithmetic–geometric mean inequality.
  4. In the St. Petersburg game (Lecture 5), E[log⁡2W]=2\EE[\log_2 W] = 2 is finite even though E[W]=∞\EE[W] = \infty, consistent with E[log⁡2W]≤log⁡2E[W]\EE[\log_2 W] \le \log_2 \EE[W].

Hoeffding’s Inequality

Chernoff requires the MGF. For bounded random variables, we can bound the MGF without knowing the distribution.

Lemma 9.1 (Hoeffding’s lemma)

If a≤X≤ba \le X \le b and E[X]=0\EE[X] = 0, then for every s∈Rs \in \RR,

E[esX]≤es2(b−a)2/8.\EE\bigl[e^{sX}\bigr] \le e^{s^2 (b - a)^2 / 8}.
Proof.

Since E[X]=0\EE[X] = 0, we have a≤0≤ba \le 0 \le b. Write x∈[a,b]x \in [a, b] as the convex combination x=λa+(1−λ)bx = \lambda a + (1 - \lambda) b with λ=b−xb−a\lambda = \frac{b - x}{b - a}. By convexity of esxe^{sx} (9.23),

esx≤b−xb−a esa+x−ab−a esb.e^{sx} \le \frac{b - x}{b - a}\, e^{sa} + \frac{x - a}{b - a}\, e^{sb}.

Substitute x=Xx = X and take expectations, using E[X]=0\EE[X] = 0:

E[esX]≤bb−a esa−ab−a esb.\EE\bigl[e^{sX}\bigr] \le \frac{b}{b - a}\, e^{sa} - \frac{a}{b - a}\, e^{sb}.

Let p=−ab−a∈[0,1]p = \frac{-a}{b - a} \in [0, 1] and h=s(b−a)h = s(b - a), so sa=−phsa = -ph and sb=h−phsb = h - ph. The right side becomes

(1−p) e−ph+p eh−ph=e−ph(1−p+peh)=eL(h),L(h)=−ph+ln⁡(1−p+peh).(1 - p)\, e^{-ph} + p\, e^{h - ph} = e^{-ph}\bigl(1 - p + pe^h\bigr) = e^{L(h)}, \qquad L(h) = -ph + \ln\bigl(1 - p + pe^h\bigr).

Differentiate:

L′(h)=−p+peh1−p+peh,L(0)=0,L′(0)=−p+p=0,L′′(h)=peh(1−p+peh)−peh⋅peh(1−p+peh)2=peh1−p+peh⋅1−p1−p+peh=u(1−u)≤14,\begin{aligned} L'(h) &= -p + \frac{pe^h}{1 - p + pe^h}, \qquad L(0) = 0, \qquad L'(0) = -p + p = 0, \\ L''(h) &= \frac{pe^h(1 - p + pe^h) - pe^h \cdot pe^h}{(1 - p + pe^h)^2} = \frac{pe^h}{1 - p + pe^h}\cdot\frac{1 - p}{1 - p + pe^h} = u(1 - u) \le \frac14, \end{aligned}

where u=peh1−p+peh∈[0,1]u = \frac{pe^h}{1 - p + pe^h} \in [0,1] and u(1−u)≤14u(1-u) \le \frac14 (as for p(1−p)p(1-p) above). By Taylor’s theorem with remainder, for some ξ\xi between 00 and hh,

L(h)=L(0)+L′(0) h+L′′(ξ)2 h2≤0+0+18 h2=s2(b−a)28.L(h) = L(0) + L'(0)\,h + \frac{L''(\xi)}{2}\, h^2 \le 0 + 0 + \frac{1}{8}\, h^2 = \frac{s^2(b - a)^2}{8}.
Theorem 9.5 (Hoeffding’s inequality)

Let X1,…,XnX_1, \ldots, X_n be independent with ai≤Xi≤bia_i \le X_i \le b_i, and Sn=∑i=1nXiS_n = \sum_{i=1}^n X_i. For every t>0t > 0,

P(Sn−E[Sn]≥t)≤exp⁡(−2t2∑i=1n(bi−ai)2).\PP\bigl(S_n - \EE[S_n] \ge t\bigr) \le \exp\Bigl(-\frac{2t^2}{\sum_{i=1}^n (b_i - a_i)^2}\Bigr).

In particular, if the XiX_i are i.i.d. in [a,b][a, b] with mean μ\mu and Mn=SnnM_n = \frac{S_n}{n},

P(Mn−μ≥ε)≤e−2nε2/(b−a)2,P(∣Mn−μ∣≥ε)≤2e−2nε2/(b−a)2.(9.36)\PP\bigl(M_n - \mu \ge \varepsilon\bigr) \le e^{-2n\varepsilon^2/(b-a)^2}, \qquad \PP\bigl(|M_n - \mu| \ge \varepsilon\bigr) \le 2e^{-2n\varepsilon^2/(b-a)^2}. \tag{9.36}
Proof.

Let C=∑i(bi−ai)2C = \sum_i (b_i - a_i)^2. Each centered term Xi−E[Xi]X_i - \EE[X_i] has mean 00 and lies in an interval of length bi−aib_i - a_i. By Chernoff, independence (Lecture 8), and Hoeffding’s lemma, for s>0s > 0,

P(Sn−E[Sn]≥t)≤e−st E[es∑i(Xi−E[Xi])]=e−st∏i=1nE[es(Xi−E[Xi])]≤e−st∏i=1nes2(bi−ai)2/8=exp⁡(−st+s2C8).\begin{aligned} \PP\bigl(S_n - \EE[S_n] \ge t\bigr) &\le e^{-st}\, \EE\Bigl[e^{s\sum_i (X_i - \EE[X_i])}\Bigr] = e^{-st} \prod_{i=1}^n \EE\Bigl[e^{s(X_i - \EE[X_i])}\Bigr] \\ &\le e^{-st} \prod_{i=1}^n e^{s^2(b_i - a_i)^2/8} = \exp\Bigl(-st + \frac{s^2 C}{8}\Bigr). \end{aligned}

Minimize the exponent: −t+sC4=0-t + \frac{sC}{4} = 0 at s⋆=4tCs^\star = \frac{4t}{C}, giving

−4tC t+16t2C2⋅C8=−4t2C+2t2C=−2t2C.-\frac{4t}{C}\, t + \frac{16t^2}{C^2}\cdot\frac{C}{8} = -\frac{4t^2}{C} + \frac{2t^2}{C} = -\frac{2t^2}{C}.

For the sample mean, {Mn−μ≥ε}={Sn−nμ≥nε}\{M_n - \mu \ge \varepsilon\} = \{S_n - n\mu \ge n\varepsilon\}, so take t=nεt = n\varepsilon and C=n(b−a)2C = n(b-a)^2: 2t2C=2n2ε2n(b−a)2=2nε2(b−a)2\frac{2t^2}{C} = \frac{2n^2\varepsilon^2}{n(b-a)^2} = \frac{2n\varepsilon^2}{(b-a)^2}. The lower tail is the same bound applied to −Xi-X_i, and adding the two tails gives the factor 22.

Example 9.7 (Polling with Hoeffding)

Return to polling: Xi∈[0,1]X_i \in [0, 1], so b−a=1b - a = 1. By (9.36),

P(∣Mn−p∣≥ε)≤2e−2nε2≤δ  ⟺  n≥ln⁡(2/δ)2ε2.\PP\bigl(|M_n - p| \ge \varepsilon\bigr) \le 2e^{-2n\varepsilon^2} \le \delta \iff n \ge \frac{\ln(2/\delta)}{2\varepsilon^2}.

With ε=0.01\varepsilon = 0.01, δ=0.05\delta = 0.05:

n≥ln⁡402 (0.01)2=3.6890.0002≈18,445,n \ge \frac{\ln 40}{2\,(0.01)^2} = \frac{3.689}{0.0002} \approx 18{,}445,

compared with 50,00050{,}000 from Chebyshev. The two bounds as functions of nn (with ε=0.05\varepsilon = 0.05):

Log-scale plot for n from 100 to 2000: the Chebyshev bound 1/(4nε²) decays like 1/n while the Hoeffding bound 2e^{−2nε²} decays exponentially

Chebyshev decays like 1n\frac1n; Hoeffding decays exponentially in nn.

A First Look at the LLN and the CLT

Law of large numbers. For i.i.d. XiX_i with mean μ\mu and variance σ2\sigma^2, Chebyshev gives

P(∣Mn−μ∣≥ε)≤σ2nε2⟶0,\PP\bigl(|M_n - \mu| \ge \varepsilon\bigr) \le \frac{\sigma^2}{n\varepsilon^2} \longrightarrow 0,

which is the weak law of large numbers (proved in full in Lecture 10).

Central limit theorem. Zn=n (Mn−μ)σZ_n = \frac{\sqrt{n}\,(M_n - \mu)}{\sigma} is approximately N(0,1)\mathcal{N}(0,1) for large nn (Lecture 10), so

P(∣Mn−μ∣≥ε)=P(∣Zn∣≥εnσ)≈2(1−Φ(εnσ)).\PP\bigl(|M_n - \mu| \ge \varepsilon\bigr) = \PP\Bigl(|Z_n| \ge \frac{\varepsilon\sqrt{n}}{\sigma}\Bigr) \approx 2\Bigl(1 - \Phi\Bigl(\frac{\varepsilon\sqrt{n}}{\sigma}\Bigr)\Bigr).

For polling, σ2≤14\sigma^2 \le \frac14, and 2(1−Φ(1.96))=0.052(1 - \Phi(1.96)) = 0.05, so we need εnσ≥1.96\frac{\varepsilon\sqrt{n}}{\sigma} \ge 1.96:

n≥(1.96)2σ2ε2,which holds for every p oncen≥(1.96)24 (0.01)2=9,604.n \ge \frac{(1.96)^2\sigma^2}{\varepsilon^2}, \qquad\text{which holds for every } p \text{ once}\qquad n \ge \frac{(1.96)^2}{4\,(0.01)^2} = 9{,}604.

This is an approximation, not a guaranteed bound like Chebyshev or Hoeffding.

MethodRequiresDecayPolling nn
MarkovX≥0X \ge 0, E[X]\EE[X]1/a1/a—
ChebyshevVar⁡(X)\Var(X)1/c21/c^2, 1/n1/n50,00050{,}000
ChernoffMX(s)M_X(s)exponential—
Hoeffdingindependent, bounded XiX_iexponential in nn18,44518{,}445
CLTfinite variance, large nnGaussian (approximate)9,6049{,}604

2189 words