A ladder of deviation bounds: start with the mean, add variance, then use moment generating functions to get exponentially small bounds for sums of independent Bernoulli variables.
Randomized algorithms — and randomized proposals for compression — need probabilistic analysis. Typical random variables of interest:
We need a way to understand how large these quantities can become. Instead of asking for the exact distribution of $X$, we often only ask for an upper bound on a tail probability such as $\Pr(X \ge a)$.
Running example throughout: independent coin tosses (Bernoulli / Poisson trials)
The weakest useful information about a nonnegative random variable is its expectation. Markov’s inequality says that even this alone limits how much probability mass can sit far out in the tail.
Fix $\mu = E(X)$ and $X \ge 0$. To maximize $\Pr(X \ge a)$ under this mean constraint, push mass to the extremes: put mass $1-p$ at $0$ and mass $p$ at $a$. Then $ap=\mu$, so $p=\mu/a$. That worst-case probability is exactly Markov’s bound.
Divide by $a > 0$ to finish.
Take unbiased coins: $E(X)=np=n/2$. Then
This is a constant bound. It is valid with very little information, but it does not improve as $n$ grows. To get decay with $n$, we need more information than just the mean.
The next piece of information is the variance. It measures how much $X$ typically deviates from its mean. Variance is the centered second moment: $\mathrm{Var}(X)=E((X-\mu)^2)=E(X^2)-E(X)^2$.
Proof: apply Markov to $Y=(X-\mu)^2 \ge 0$.
Equality is achievable. Take a three-point law for $X-\mu$:
Then $E((X-\mu)^2)=a^2 p$, and Chebyshev’s bound is tight for this $Y$. (Equivalently: $X=\mu$, $\mu-a$, $\mu+a$ with probabilities $1-v$, $v/2$, $v/2$.)
For $X_i\sim\mathrm{Bern}(1/2)$: $E(X)=n/2$, $\mathrm{Var}(X)=n/4$.
This is the bound Chebyshev actually gives (two-sided). For the one-sided event $X \ge 3n/4$, the notes write $\tfrac{4}{n}\cdot\tfrac12=\tfrac{2}{n}$ by symmetry — that is a heuristic, not a consequence of Chebyshev alone. Either way we already improve from Markov’s constant $2/3$ to an $O(1/n)$ guarantee.
Instead of choosing one moment at a time, Chernoff bounds package exponential moments into one object: the moment generating function.
We mainly care that $M_X(t)$ exists in a neighborhood of $t=0$. Differentiating under the expectation (under mild conditions),
Thus the derivatives of the MGF at zero recover the moments of $X$. We use $r$ for derivative order here to avoid confusing it with the number of Bernoulli trials $n$.
The Chernoff trick is simple: exponentiate $X$, apply Markov to the nonnegative random variable $e^{tX}$, and then choose the best $t$. The sign of $t$ selects which tail we control.
This holds for every $t > 0$, so we may optimize:
The same calculation with $t < 0$ bounds $\Pr(X \le a)$, again minimizing $M_X(t)/e^{ta}$ over $t < 0$.
Now specialize to independent Bernoulli variables. This is the setting where Chernoff becomes especially useful: independence makes the MGF of the sum factor into a product.
using $1+x \le e^x$.
Plugging the MGF bound into the optimized Markov bound gives the following standard upper-tail forms.
Choose $t=\ln(1+\delta)$ (with $\delta > 0$) to obtain
Unbiased coins: $\mu=n/2$. The event $X\ge 3n/4$ is $X\ge(1+\delta)\mu$ with $\delta=1/2$. Bound (2) gives
Compare: Markov $\le 2/3$, Chebyshev $\le O(1/n)$, Chernoff $\le e^{-\Theta(n)}$. More structure $\Rightarrow$ sharper tails.
Standard reference: Mitzenmacher and Upfal, Probability and Computing, Chapters 3–4.