# Concentration inequality

In probability theory, concentration inequalities provide mathematical bounds on the probability of a random variable deviating from some value (typically, its expected value). The deviation or other function of the random variable can be thought of as a secondary random variable. The simplest example of the concentration of such a secondary random variable is the CDF of the first random variable which concentrates the probability to unity. If an analytic form of the CDF is available this provides a concentration equality that provides the exact probability of concentration. It is precisely when the CDF is difficult to calculate or even the exact form of the first random variable is unknown that the applicable concentration inequalities provide useful insight.
Another almost universal example of a secondary random variable is the law of large numbers of classical probability theory which states that sums of independent random variables, under mild conditions, concentrate around their expectation with a high probability. Such sums are the most basic examples of random variables concentrated around their mean.
Concentration inequalities can be sorted according to how much information about the random variable is needed in order to use them.

## Markov's inequality

Let $X$ be a random variable that is non-negative (almost surely). Then, for every constant $a>0$,
    $\Pr(X\geq a)\leq {\frac {\operatorname {E} (X)}{a}}.$
Note the following extension to Markov's inequality: if $\Phi$ is a strictly increasing and non-negative function, then
    $\Pr(X\geq a)=\Pr(\Phi (X)\geq \Phi (a))\leq {\frac {\operatorname {E} (\Phi (X))}{\Phi (a)}}.$

## Chebyshev's inequality

Chebyshev's inequality requires the following information on a random variable $X$:
* The expected value $\operatorname {E} [X]$ is finite.
* The variance $\operatorname {Var} [X]=\operatorname {E} [(X-\operatorname {E} [X])^{2}]$ is finite.
Then, for every constant $a>0$,
    $\Pr(|X-\operatorname {E} [X]|\geq a)\leq {\frac {\operatorname {Var} [X]}{a^{2}}},$
or equivalently,
    $\Pr(|X-\operatorname {E} [X]|\geq a\cdot \operatorname {Std} [X])\leq {\frac {1}{a^{2}}},$
where $\operatorname {Std} [X]$ is the standard deviation of $X$.
Chebyshev's inequality can be seen as a special case of the generalized Markov's inequality applied to the random variable $|X-\operatorname {E} [X]|$ with $\Phi (x)=x^{2}$.

## Vysochanskij–Petunin inequality

Let X be a random variable with unimodal distribution, mean μ and finite, non-zero variance σ$^2$. Then, for any λ>√(8/3)=1.63299…, {\textstyle \lambda >{\sqrt {\frac {8}{3}}}=1.63299\ldots , }
    ${\text{Pr}}(\left|X-\mu \right|\geq \lambda \sigma )\leq {\frac {4}{9\lambda ^{2}}}.$
(For a relatively elementary proof see e.g.).

### One-sided Vysochanskij–Petunin inequality

For a unimodal random variable $X$ and $r\geq 0$, the one-sided Vysochanskij-Petunin inequality holds as follows:
    ${\text{Pr}}(X-E[X]\geq r)\leq {\begin{cases}{\dfrac {4}{9}}{\dfrac {\operatorname {Var} (X)}{r^{2}+\operatorname {Var} (X)}}&{\text{for }}r^{2}\geq {\dfrac {5}{3}}\operatorname {Var} (X),\\[5pt]{\dfrac {4}{3}}{\dfrac {\operatorname {Var} (X)}{r^{2}+\operatorname {Var} (X)}}-{\dfrac {1}{3}}&{\text{otherwise.}}\end{cases}}$

## Paley–Zygmund inequality

In contrast to most commonly used concentration inequalities, the Paley-Zygmund inequality provides a lower bound on the deviation probability.

## Chernoff bounds

The generic Chernoff bound$^{:63–65}$ requires the moment generating function of $X$, defined as $M_{X}(t):=\operatorname {E} \!\left[e^{tX}\right].$ It always exists, but may be infinite. From Markov's inequality, for every $t>0$:
    $\Pr(X\geq a)\leq {\frac {\operatorname {E} [e^{tX}]}{e^{ta}}},$
and for every $t<0$:
    $\Pr(X\leq a)\leq {\frac {\operatorname {E} [e^{tX}]}{e^{ta}}}.$
There are various Chernoff bounds for different distributions and different values of the parameter $t$. See$^{:5–7}$ for a compilation of more concentration inequalities.

## Mill's inequality

Let $Z\sim N(0,1)$. Then$\operatorname {P} (|Z|>t)\leq {\sqrt {\frac {2}{\pi }}}{\frac {\exp(-t^{2}/2)}{t}}$

## Bounds on sums of independent bounded variables

Let $X_{1},X_{2},\dots ,X_{n}$ be independent random variables such that, for all i:
    $a_{i}\leq X_{i}\leq b_{i}$ almost surely.
    $c_{i}:=b_{i}-a_{i}$
    $\forall i:c_{i}\leq C$
Let $S_{n}$ be their sum, $E_{n}$ its expected value and $V_{n}$ its variance:
    $S_{n}:=\sum _{i=1}^{n}X_{i}$
    $E_{n}:=\operatorname {E} [S_{n}]=\sum _{i=1}^{n}\operatorname {E} [X_{i}]$
    $V_{n}:=\operatorname {Var} [S_{n}]=\sum _{i=1}^{n}\operatorname {Var} [X_{i}]$
It is often interesting to bound the difference between the sum and its expected value. Several inequalities can be used.
1. Hoeffding's inequality says that:
       $\Pr \left[|S_{n}-E_{n}|>t\right]\leq 2\exp \left(-{\frac {2t^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right)\leq 2\exp \left(-{\frac {2t^{2}}{nC^{2}}}\right)$
2. The random variable $S_{n}-E_{n}$ is a special case of a martingale, and $S_{0}-E_{0}=0$. Hence, the general form of Azuma's inequality can also be used and it yields a similar bound:
       $\Pr \left[|S_{n}-E_{n}|>t\right]<2\exp \left(-{\frac {2t^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right)<2\exp \left(-{\frac {2t^{2}}{nC^{2}}}\right)$
This is a generalization of Hoeffding's since it can handle other types of martingales, as well as supermartingales and submartingales. See Fan et al. (2015). Note that if the simpler form of Azuma's inequality is used, the exponent in the bound is worse by a factor of 4.
3. The sum function, $S_{n}=f(X_{1},\dots ,X_{n})$, is a special case of a function of n variables. This function changes in a bounded way: if variable i is changed, the value of f changes by at most $b_{i}-a_{i}<C$. Hence, McDiarmid's inequality can also be used and it yields a similar bound:
       $\Pr \left[|S_{n}-E_{n}|>t\right]<2\exp \left(-{\frac {2t^{2}}{\sum _{i=1}^{n}c_{i}^{2}}}\right)<2\exp \left(-{\frac {2t^{2}}{nC^{2}}}\right)$
This is a different generalization of Hoeffding's since it can handle other functions besides the sum function, as long as they change in a bounded way.
4. Bennett's inequality offers some improvement over Hoeffding's when the variances of the summands are small compared to their almost-sure bounds C. It says that:
       $\Pr \left[|S_{n}-E_{n}|>t\right]\leq 2\exp \left[-{\frac {V_{n}}{C^{2}}}h\left({\frac {Ct}{V_{n}}}\right)\right],$ where $h(u)=(1+u)\log(1+u)-u$
5. The first of Bernstein's inequalities says that:
       $\Pr \left[|S_{n}-E_{n}|>t\right]<2\exp \left(-{\frac {t^{2}/2}{V_{n}+C\cdot t/3}}\right)$
This is a generalization of Hoeffding's since it can handle random variables with not only almost-sure bound but both almost-sure bound and variance bound.
6. Chernoff bounds have a particularly simple form in the case of sum of independent variables, since $\operatorname {E} [e^{t\cdot S_{n}}]=\prod _{i=1}^{n}{\operatorname {E} [e^{t\cdot X_{i}}]}$.
For example, suppose the variables $X_{i}$ satisfy $X_{i}\geq E(X_{i})-a_{i}-M$, for $1\leq i\leq n$. Then we have lower tail inequality:
       $\Pr[S_{n}-E_{n}<-\lambda ]\leq \exp \left(-{\frac {\lambda ^{2}}{2(V_{n}+\sum _{i=1}^{n}a_{i}^{2}+M\lambda /3)}}\right)$
If $X_{i}$ satisfies $X_{i}\leq E(X_{i})+a_{i}+M$, we have upper tail inequality:
       $\Pr[S_{n}-E_{n}>\lambda ]\leq \exp \left(-{\frac {\lambda ^{2}}{2(V_{n}+\sum _{i=1}^{n}a_{i}^{2}+M\lambda /3)}}\right)$
If $X_{i}$ are i.i.d., $|X_{i}|\leq 1$ and $\sigma ^{2}$ is the variance of $X_{i}$, a typical version of Chernoff inequality is:
       $\Pr[|S_{n}|\geq k\sigma ]\leq 2e^{-k^{2}/4n}{\text{ for }}0\leq k\leq 2\sigma .$
7. Similar bounds can be found in: Rademacher distribution#Bounds on sums

## Efron–Stein inequality

The Efron–Stein inequality (or influence inequality, or MG bound on variance) bounds the variance of a general function.
Suppose that $X_{1}\dots X_{n}$, $X_{1}'\dots X_{n}'$ are independent with $X_{i}'$ and $X_{i}$ having the same distribution for all $i$.
Let $X=(X_{1},\dots ,X_{n}),X^{(i)}=(X_{1},\dots ,X_{i-1},X_{i}',X_{i+1},\dots ,X_{n}).$ Then
    $\mathrm {Var} (f(X))\leq {\frac {1}{2}}\sum _{i=1}^{n}E[(f(X)-f(X^{(i)}))^{2}].$
A proof may be found in e.g.,.

## Bretagnolle–Huber–Carol inequality

Bretagnolle–Huber–Carol Inequality bounds the difference between a vector of multinomially distributed random variables and a vector of expected values. A simple proof appears in(Appendix Section).
If a random vector $(Z_{1},Z_{2},Z_{3},\ldots ,Z_{n})$ is multinomially distributed with parameters $(p_{1},p_{2},\ldots ,p_{n})$ and satisfies $Z_{1}+Z_{2}+\dots +Z_{n}=M,$ then
       $\Pr \left(\sum _{i=1}^{n}|Z_{i}-Mp_{i}|\geq 2M\varepsilon \right)\leq 2^{n}e^{-2M\varepsilon ^{2}}.$
This inequality is used to bound the total variation distance.

## Mason and van Zwet inequality

The Mason and van Zwet inequality for multinomial random vectors concerns a slight modification of the classical chi-square statistic.
Let the random vector $(N_{1},\ldots ,N_{k})$ be multinomially distributed with parameters $n$ and $(p_{1},\ldots ,p_{k})$ such that $p_{i}>0$ for $i<k.$ Then for every $C>0$ and $\delta >0$ there exist constants $a,b,c>0,$ such that for all $n\geq 1$ and $\lambda ,p_{1},\ldots ,p_{k-1}$ satisfying $\lambda >Cn\min\{p_{i}|1\leq i\leq k-1\}$ and $\sum _{i=1}^{k-1}p_{i}\leq 1-\delta ,$ we have
       $\Pr \left(\sum _{i=1}^{k-1}{\frac {(N_{i}-np_{i})^{2}}{np_{i}}}>\lambda \right)\leq ae^{bk-c\lambda }.$

## Dvoretzky–Kiefer–Wolfowitz inequality

The Dvoretzky–Kiefer–Wolfowitz inequality bounds the difference between the real and the empirical cumulative distribution function.
Given a natural number $n$, let $X_{1},X_{2},\dots ,X_{n}$ be real-valued independent and identically distributed random variables with cumulative distribution function F(·). Let $F_{n}$ denote the associated empirical distribution function defined by
    $F_{n}(x)={\frac {1}{n}}\sum _{i=1}^{n}\mathbf {1} _{\{X_{i}\leq x\}},\qquad x\in \mathbb {R} .$
So $F(x)$ is the probability that a single random variable $X$ is smaller than $x$, and $F_{n}(x)$ is the average number of random variables that are smaller than $x$.
Then
       $\Pr \left(\sup _{x\in \mathbb {R} }{\biglF_{n}(x)-F(x){\bigr )}>\varepsilon \right)\leq e^{-2n\varepsilon ^{2}}{\text{ for every }}\varepsilon \geq {\sqrt {{\tfrac {1}{2n}}\ln 2}}.$

## Anti-concentration inequalities

Anti-concentration inequalities, on the other hand, provide an upper bound on how much a random variable can concentrate, either on a specific value or range of values. A concrete example is that if you flip a fair coin $n$ times, the probability that any given number of heads appears will be less than ${\frac {1}{\sqrt {n}}}$. This idea can be greatly generalized. For example, a result of Rao and Yehudayoff implies that for any $\beta ,\delta >0$ there exists some $C>0$ such that, for any $k$, the following is true for at least $2^{n(1-\delta )}$ values of $x\in \{\pm 1\}^{n}$:
       $\Pr \left(\langle x,Y\rangle =k\right)\leq {\frac {C}{\sqrt {n}}},$
where $Y$ is drawn uniformly from $\{\pm 1\}^{n}$.
Such inequalities are of importance in several fields, including communication complexity (e.g., in proofs of the gap Hamming problem) and graph theory.
An interesting anti-concentration inequality for weighted sums of independent Rademacher random variables can be obtained using the Paley–Zygmund and the Khintchine inequalities.