The non-asymptotic central limit theorem: a gentle introduction to concentration inequalities
Published:
Introduction and the asymptotic setting
Consider the fundamental statistical problem of estimating a mean. In the simplest possible setting, we have at our disposal some i.i.d. random variables \((X_i)\) with mean \(\mu = \bdE \br{X_1}\) whose variance \(\sigma^2 > 0\) is finite. A very natural estimator of \(\mu\) is the empirical mean of the \(X_i\)’s, that is
\[\bar{X}_n = \frac{1}{n} \sumn X_i. \tag{1}\]The law of large numbers (LLN) tells us that \(\bar{X}_n \xrightarrow[n \to \infty]{a.s.} \mu\), i.e. \(\bar{X}_n\) correctly estimates the desired quantity asymptotically. However, the LLN alone does not give us much more information, namely
- How fast is the convergence of \(\bar{X}_n\) towards \(\mu\)? This is a first question, the LLN only tells us that \(\bar{X}_n\) does converge towards \(\mu\), but the rate at which this happens is not provided.
- For finite sample sizes, how close is \(\bar{X}_n\) to \(\mu\)? This is strongly linked to the first question, if the convergence of \(\bar{X}_n\) towards \(\mu\) is very fast in the sample size, then we can expect that for a finite number of samples, the estimation of \(\mu\) by \(\bar{X}_n\) to be very good.
In this setting, the variables have a finite variance, hence the CLT applies and yields
\[\sqrt n (\bar{X}_n - \mu ) \xrightarrow[n \to \infty]{(\mathcal{L})} \bcN(0, \sigma^2).\]This result answers our question about the rate of convergence in part: on one hand \(\bar{X}_n - \mu \underbrace{=}_{n \to \infty} O_P(n^{-1/2})\), i.e. for any \(\eps > 0\), we can find \(M \in \bdR\) (which is actually the quantile \(q_{1 - \eps/2}\) of \(\bcN(0, \sigma^2)\)) such that
\[\limsup_{n \to \infty} \bdP \p{ \abs{ \sqrt n (\bar{X}_n - \mu ) } > M} < \eps.\]Moreover, the order is sharp, indeed, for any \(\eps > 0\),
\[\bdP \p{ \bar{X}_n - \mu > \frac{\eps}{\sqrt{n}} } \xrightarrow[n \to \infty]{} \bdP ( \bcN(0, \sigma^2 ) > \eps ) > 0,\]so that \(\bar{X}_n - \mu \ne o_P(n^{-1/2})\). As a consequence, \(n^{-1/2}\) is exactly the right order of the convergence of \(\bar{X}_n\) to \(\mu\). This is a remarkable consequence of the CLT and it should be appreciated, intuitively, \(\bar{X}_n \to \mu\) and the size of the fluctuations of \(\bar{X}_n\) around \(\mu\) are roughly of size \(1/\sqrt n\) whenever \(n\) is large enough. The issue however, is that this is a result of purely asymptotic nature, and it does not tell us much about what happens for finite values of \(n\). This is the unfortunate part: the CLT will not help us in obtaining deviation bounds at finite sample sizes. There is a fortunate part however: this asymptotic result provides us with a benchmark regarding what we can hope for (and what we cannot hope for) in the finite sample setting.
Concretely, if we apply the CLT in our case with a confidence parameter \(z \ \ge \ 0\) we obtain
\[\bdP \p{ \bar{X}_n - \mu \ \ge \ \sqrt{ \frac{2 \sigma^2 z}{n} } } \xrightarrow[n \to \infty]{} \bdP \p{ \bcN( 0,\sigma^2 ) \ \ge \ \sqrt{2 \sigma^2 z }} \ \le \ \exp(-z),\]so that the convergence in distribution provides us with the optimal rate \(n^{-1/2}\), as a consequence, if we manage to obtain a finite sample analogue of the form,
\[\bdP \p{ \bar{X}_n - \mu \ \ge \ \sqrt{ \frac{2 \nu^2 z }{n} } } \ \le \ \exp(-z),\]which holds for any \(n \in \mathbb{N}\) (or at least for \(n\) large enough but finite) and with \(\nu^2 \ \ge \ \sigma^2\) that plays the role of a variance, we would have won, having obtained a deviation bound sharing the same structure as the limiting one given by the CLT which is known to be optimal.
The goal of this article is to show that we can, in fact, obtain similar bounds in finite sample settings in some cases, and to highlight some of the basic tools used to do so. In particular, Chernoff’s method, sub-Gaussian and sub-Gamma random variables will be discussed. The standard reference on all of this is the classic (and excellent) book by Boucheron, Lugosi and Massart [1]. If in the future I start writing some follow up articles on more specific topics in theoretical statistics, this first post on concentration will also serve as a gentle introduction to some tools that are ubiquitous in statistics.
The non-asymptotic setting
To make our lives easier, before diving into more general ideas, let’s consider the specific setting in which we work with Gaussian random variables first. Precisely: we assume the \(X_i\)’s to be i.i.d. \(X_i \sim \bcN(0,\sigma^2)\).
Under this assumption, something surprising happens, first we obtain by the stability of the Gaussian distribution that for any \(n \in \mathbb{N}^*\),
\[\bar{X}_n \sim \bcN \p{ 0, \frac{\sigma^2}{n} }.\]Thus, for any \(z \ \ge \ 0\)
\[\bdP \p{ \bar{X}_n \ \ge \ \sqrt{ \frac{2 \sigma^2 z }{n} } } = \bdP \p{ \frac{1}{\sqrt n } \bcN ( 0, \sigma^2 ) \ \ge \ \sqrt{ \frac{2 \sigma^2 z }{n} }} = \bdP \p{ \bcN(0,\sigma^2 ) \ \ge \ \sqrt{ 2 \sigma^2 z } } \ \le \ \exp(-z),\]due to the standard tail bound on the Gaussian: \(\bdP (\bcN(0, \sigma^2) \ \ge \ \sigma \sqrt{2 z} ) \ \le \ \exp(-z)\). In fact, even more can be said, by the symmetry of the Gaussian, we can also obtain
\[\bdP \p{ \bar{X}_n \ \le \ - \sqrt{ \frac{2 \sigma^2 z }{n} } } \ \le \ \exp(-z),\]which, combined with a standard union bound gives us the following concentration inequality:
\[\bdP \p{ \abs{ \bar{X}_n } \ \ge \ \sqrt{ \frac{2 \sigma^2 z }{n} } } \ \le \ 2\exp(-z) \tag{★}\](★) is very interesting as the inequality holds for all integers \(n \ \ge \ 1\) and is sharp due to the central limit theorem, as per the discussion before. Indeed, applying (★) for any fixed \(z > 0\) to (non-necessarily centered) i.i.d. Gaussians \(\bcN(\mu, \sigma^2)\) gives
\[\abs{ \bar{X}_n - \mu } \ \le \ \sqrt{ \frac{2 \sigma^2 z }{n} } \quad \text{with probability at least } 1 - 2\exp(-z).\]This precisely yields, in the fully finite sample setting, the \(n^{-1/2}\) convergence rate of \(\bar{X}_n\) to \(\mu\) given by the CLT. This result can be seen, in a sense, as a quantitative version of the LLN: it quantifies how close the empirical mean is from the true mean with (controllable) high probability for any finite \(n \ \ge \ 1\).
While this is very nice, the main problem is that the argument relied heavily on the stability of the distribution under summation, which is a property that is clearly not satisfied by all distributions. As a consequence the result only holds for sums of Gaussian random variables for now, which is very restrictive.
This does not change that we could reasonably expect random variables that behave similarly to Gaussian random variables, particularly random variables that have similar tails; to satisfy similar concentration bounds. This is the motivation behind sub-Gaussian random variables i.e. random variables that are not necessarily Gaussian, but are sufficiently light tailed to satisfy similar concentration properties so that we can extend our result to them.
sub-Gaussian random variables
In plain words, sub-Gaussian random variables are variables whose tails are light enough that we can expect them to behave “as if they were Gaussian” in terms of the deviations from their mean.
A simple, yet convenient definition of sub-Gaussian random variables uses their Laplace transform. Before giving this definition, it is instructive to consider the example of Gaussians once again, so that when sub-Gaussian random variables will be introduced, why we define them that way will seem obvious.
Let \(X \sim \bcN(0, \sigma^2)\), we define the (centered) Laplace transform of \(X\) for any \(t \in \bdR\) by \(F_X(t) = \bdE \br{ \exp(t (X - \bdE\br{X}))}\); since \(X\) is centered here, this is simply \(\bdE \br{ \exp(tX)}\). In our case, we have
\[\begin{align*} \bdE \br{ e^{tX} } &= \frac{1}{\sqrt{2 \pi \sigma^2 }} \int_{-\infty}^{+\infty} e^{tx - \frac{x^2}{2 \sigma^2}} dx \\ &= e^{\frac{\sigma^2 t^2}{2}} \cdot \underbrace{\frac{1}{\sqrt{2 \pi \sigma^2 }} \int_{-\infty}^{+\infty} e^{- \frac{\sigma^2 t^2}{2} + tx - \frac{x^2}{2 \sigma^2}} dx}_{\text{Gaussian integral} \, = \, 1} \\ &= \exp \p{ \frac{\sigma^2 t^2}{2}}. \end{align*}\]Hence, when \(X \sim \bcN(\mu, \sigma^2)\), \(F_X(t) = \bdE \br{ \exp(t (X - \mu))} = \exp \p{ \frac{\sigma^2 t^2}{2} }\) for any real \(t\). So why is this useful for our purposes? Let’s have a look at the tails of this Gaussian (assume \(\mu = 0\), otherwise center), for any \(z \ \ge \ 0\)
\[\bdP ( X \ \ge \ z) \underbrace{=}_{\text{for any } t > 0} \bdP \br{e^{tX} \ \ge \ e^{tz} } \underbrace{\le}_{\text{Markov}} e^{-zt} \bdE \br{ e^{tX} } = \exp \p{ - zt + \frac{\sigma^2 t^2}{2} }.\]And since this is true for any \(t > 0\), we can minimize the right hand side in \(t\) over \((0, + \infty)\) to obtain the best possible bound; doing so, we pick \(t = z/\sigma^2\) and find
\[\bdP ( X \ \ge \ z ) \ \le \ \exp \p{ - \frac{z^2}{2 \sigma^2} } \implies \bdP (X \ \ge \ \sigma \sqrt{2z}) \ \le \ \exp(-z).\]Clearly, for Gaussian random variables, we already knew that. What is interesting however, is that we just obtained this result by applying Markov’s inequality, using the form of the Laplace transform of the Gaussian random variable \(X\) and optimizing over \(t\). This method, which is one of the most fundamental and well known method in the theory of deviation inequalities is called Chernoff’s method, named after Herman Chernoff who introduced it in a 1952 paper [2]. In particular, Chernoff’s method applies whenever we have a control of the Laplace transform, regardless of the true distribution of \(X\).
This last observation motivates us to mimic the form of the Laplace transform of a Gaussian (2) to define sub-Gaussian random variables:
Definition (sub-Gaussian random variables). For a random variable \(X\) taking values in \(\bdR\) with \(\bdE \br{X} = 0\), we say that \(X\) is sub-Gaussian with variance proxy \(\sigma^2\) if
\[\forall t \in \bdR, \ \bdE \br{ e^{tX} } \ \le \ \exp \p{ \frac{\sigma^2 t^2}{2} }. \tag{3}\]In particular a centered Gaussian random variable is sub-Gaussian with \(\sigma^2 = \Var(X)\). Note that if \(\bdE \br{X} \ne 0\), the definition applies to \(X - \bdE \br{X}\) which is centered.
From this definition, a sub-Gaussian random variable is a random variable whose Laplace transform is upper bounded by the Laplace transform of a Gaussian random variable.
Note that there are a lot of equivalent definitions/characterizations of sub-Gaussian random variables, all of which have their use case and their interpretations.
Two properties are immediate from this definition, first:
The tails of sub-Gaussian random variables have Gaussian-like decay:
This is why we did all this, this is immediate from Chernoff’s method, indeed, let \(X\) be sub-Gaussian with variance proxy \(\sigma^2 > 0\), let \(t > 0\):
\[\bdP (X \ \ge \ z) = \bdP ( e^{tX} \ \ge \ e^{tz}) \ \le \ \exp \p{ - tz + \frac{\sigma^2 t^2}{2} } \underbrace{\implies}_{\text{optimize in } t > 0} \bdP (X \ \ge \ z) \ \le \ \exp \p{ - \frac{z^2}{2 \sigma^2}}.\]In particular, applying the same process to \(-X\), the definition being symmetric in \(t\) and \(-t\), we obtain the same bound for the lower tail, for \(z \ \ge \ 0\):
\[\bdP ( X \ \le \ - z ) \ \le \ \exp \p{ - \frac{z^2}{2 \sigma^2} }.\]Combining those results with a union bound, we get the following concentration result:
\[\bdP \p{ \abs X \ \le \ \sigma \sqrt{2z} } \ \ge \ 1 - 2 \exp(-z).\]sub-Gaussian random variables concentrate like Gaussian random variables. This is a very nice fact.
Why we call \(\sigma^2\) the variance proxy:
Some justification for the expression “variance proxy” is in order. First, recall that in the case of a (truly) Gaussian random variable, \(\sigma^2\) is exactly the variance, as seen in equation (2). Now, if \(X\) is a sub-Gaussian random variable but is not Gaussian, note first that (3) makes \(t \mapsto \bdE \br{e^{tX}}\) finite on all of \(\bdR\), so that \(X\) has moments of all orders and the map is smooth at \(0\) with derivatives obtained by differentiating under the expectation; the expansion below is therefore legitimate. We get
\[\begin{align*} \bdE \br{ e^{tX} } &\ \le \ \exp \p{ \frac{\sigma^2 t^2}{2} } \implies \bdE \br{ e^{tX} } - 1 \ \le \ \exp \p{ \frac{\sigma^2 t^2}{2} } - 1 \\ & \underbrace{\implies}_{t \to 0 \text{ on both sides}} t \, \bdE \br{ X } + \frac{t^2}{2} \bdE \br{X^2} + o(t^2) \ \le \ \frac{\sigma^2 t^2}{2} + o(t^2) \\ & \implies \bdE \br{X^2} = \Var(X) \ \le \ \sigma^2. \end{align*}\]As \(\bdE \br{X} = 0\), by comparison in a neighborhood of \(0\). Thus, \(\sigma^2\) is an upper bound on the variance of the random variable which coincides with the true variance in the Gaussian case. This justifies (hopefully) the name “variance proxy”.
Examples of sub-Gaussian random variables
- From the definition: any random variable whose Laplace transform is upper bounded by the Laplace transform of a Gaussian random variable, as in (3), is sub-Gaussian. In particular, Gaussian random variables are sub-Gaussian.
- Random variables with Gaussian tails: any centered random variable \(X\) satisfying \(\forall z \ \ge \ 0, \bdP ( \abs X \ \ge \ z) \ \le \ 2 \exp(-z^2/2\sigma^2)\) for some \(\sigma > 0\) is sub-Gaussian.
- Random variables satisfying \(\lVert X \rVert_p = O(\sqrt p)\): any random variable for which there exists \(\sigma > 0\) such that \(\forall p \ \ge \ 1, \ \lVert X \rVert_p = \bdE \br{\abs{X}^p}^{1/p} \ \le \ \sigma \sqrt p\) is sub-Gaussian. Notice also that this is precisely the moment structure of centered Gaussian random variables.
Those conditions turn out to be equivalent (up to constant rescalings of the variance proxy), and there exists other equivalent characterizations using Orlicz norms (among other things); see [1] and [3] for the details. The third characterization is very useful in practice, if we manage to upper bound the moments of a given random variable and show that they satisfy a growth controlled by \(\sqrt p\), we immediately obtain very nice concentration properties. More about the rate of growth of the moments will be discussed in the near future (hopefully).
Properties of sub-Gaussian random variables
The definition in terms of the Laplace transform is very convenient as it behaves in an ideal way when we sum independent sub-Gaussian random variables. Concretely, coming back to the example from the introduction, say we want to estimate the mean of a distribution and have at our disposal i.i.d. random variables with mean \(\mu\), we estimate \(\mu\) by the empirical mean as in (1) and want to estimate how good the estimation is for a finite \(n\). If all the random variables are sub-Gaussian with variance proxy \(\sigma^2\) then we have for any \(t \in \bdR\)
\[\begin{align*} \bdE \br{ \exp \p{t (\bar{X}_n - \mu) } } &= \bdE \br{ \exp \p{ t \p{\frac{1}{n} \sumn X_i - \mu } } } \underbrace{=}_{\text{independence}} \prod_{i = 1}^n \bdE \br{ \exp \p{\frac{t}{n} (X_i - \mu) } } \\ & \underbrace{\le}_{X_i \text{ sub-G}} \prod_{i = 1}^n \exp \p{ \frac{t^2 \sigma^2}{2 n^2} } = \exp \p{ \frac{t^2 \sigma^2}{2n} }. \end{align*}\]Hence, an empirical mean of sub-Gaussian random variables with variance proxy \(\sigma^2\) is still sub-Gaussian with variance proxy \(\sigma^2 / n\). Notice also that we do not actually need the variables to be i.i.d., we just need the independence to obtain the sub-Gaussianity of the empirical mean, although the variance proxy does not necessarily simplify as nicely if the variables have different distributions.
Applying what we know so far, we can convert this to the following concentration bound
\[\bdP \p{ \abs{ \bar{X}_n - \mu } \ \ge \ \sqrt{ \frac{2\sigma^2 z}{n} } } \ \le \ 2\exp(-z).\]At this point, we should be very happy. Indeed, we managed to obtain the optimal CLT rate \(n^{-1/2}\) for any finite value of \(n\) and for variables that are not necessarily Gaussian, just sub-Gaussian! A slight difference here that should be noted however is that \(\sigma^2\) is an upper bound on the variance, and not necessarily the true variance of the summands. In some cases, the variance and \(\sigma^2\) do not coincide, for instance, in the case of a Bernoulli random variable with parameter \(p \ne 1/2\), the optimal variance proxy \(\sigma^2\) is strictly greater than the variance.
While we had a lot of success with sub-Gaussian random variables, we should not rest too much on our laurels for now. Indeed, to define sub-Gaussian random variables, we need the random variables to have a finite Laplace transform for all \(t \in \bdR\), there are many examples of very common distributions for which this is not the case, for instance, if \(X\) has an exponential distribution, \(X\) does not have a finite Laplace transform for all real \(t\). The next section aims to close this gap (in part).
sub-Gamma random variables
A second main class of random variables is the class of sub-Gamma random variables. They add to the entire concentration picture by dealing with random variables that are too heavy tailed to be sub-Gaussian, yet, are light tailed enough to be compared to Gamma random variables (a class that includes exponential random variables). Once again, before giving the definition, let us first take a look at exponential random variables. Hopefully the example is instructive and will make the definition look obvious a posteriori:
Let \(X \sim \bcE(\lambda)\) for some \(\lambda > 0\), i.e. \(X\) follows an exponential distribution with parameter \(\lambda\), which is just the Gamma distribution with parameters \((1, \lambda)\). Then, since \(X\) has a trivial lower tail, we restrict ourselves to \(t \ \ge \ 0\) and obtain
\[\bdE \br{ \exp (tX) } = \int_{0}^{+\infty} e^{tx} \lambda e^{- \lambda x } dx = \lambda \int_0^{+\infty} e^{-(\lambda - t) x } dx < + \infty \quad \text{iff } 0 \ \le \ t < \lambda.\]It turns out that for exponential random variables (and Gamma in consequence) the Laplace transform only exists in a finite region that depends on the parameter \(\lambda\). It is worth doing some calculations to upper bound the MGF once, as this will, once again, make the definition of sub-Gamma random variables appear natural.
Recall that we are working with \(X \sim \bcE(\lambda)\), for \(0 \ \le \ t < \lambda\), we have
\[\bdE \br{ \exp ( t ( X - \bdE \br{X} )) } = \bdE \br{ \exp ( t ( X - 1/\lambda )) } = \exp(-t/\lambda) \bdE \br{ \exp(tX) } = \exp(-t/\lambda) \frac{\lambda}{\lambda - t},\]by straightforward calculations. We now take the log on both sides to simplify our lives, writing \(F_X(t) = \bdE \br{ \exp ( t ( X - \bdE \br{X} )) }\) and \(u = t/\lambda \in [0,1)\):
\[\log F_X(t) = - u - \log(1 - u) = \sum_{n = 2}^{+\infty} \frac{u^n}{n} \ \le \ \frac{1}{2}\sum_{n = 2}^{+\infty} u^{n} = \frac{u^2}{2(1-u)} = \frac{t^2/\lambda^2}{2(1 - t/\lambda)},\]where we used
\[\frac{1}{n} \ \le \ \frac 1 2 \ \text{ for } n \ \ge \ 2, \quad \sum_{n = 2}^{+\infty} u^n = \frac{u^2}{1-u} \quad \text{for } 0 \ \le \ u < 1.\]Note that the restriction \(u \ \ge \ 0\) matters here: for \(u < 0\) the inequality above may fail (at \(u = -1\) the left hand side equals \(1 - \log 2 > 1/4\)), the relevant bound on the negative side being \(-u - \log(1-u) \ \le \ u^2/2\). This is why the definition below is stated for the right tail only.
Keep in mind that this bound holds only for \(0 \ \le \ t < \lambda\), this motivates us to mimic this idea for other random variables, that do not necessarily follow a Gamma distribution but have similar tails, much like what we did with Gaussians; this leads to our definition:
Definition (sub-Gamma random variables). For a random variable \(X\) taking values in \(\bdR\) with \(\bdE \br{X} = 0\), we say that \(X\) is sub-Gamma with parameters \((\sigma^2, b)\) if
\[\forall t \in \left[0, \tfrac{1}{b}\right), \ \log \bdE \br{ e^{tX} } \ \le \ \frac{\sigma^2 t^2}{2(1 - bt)}. \tag{4}\]We say that \(X\) is sub-Gamma on both tails with parameters \((\sigma^2,b)\) if both \(X\) and \(-X\) satisfy (4).
Notice that this parametrization, in terms of \((\sigma^2,b)\) is convenient because in our case, \(\sigma^2 = 1/\lambda^2 = \Var(X)\) and \(b = 1/\lambda = \bdE \br{X}\).
The condition can also be read as a Gaussian-type control of the MGF near \(0\), up to constants: for \(0 \ \le \ t \ \le \ 1/(2b)\) we have \(1 - bt \ \ge \ 1/2\), hence \(\frac{\sigma^2 t^2}{2(1 - bt)} \ \le \ \sigma^2 t^2\), i.e. the MGF is bounded by that of a Gaussian with variance proxy \(2\sigma^2\) on a neighborhood of \(0\); conversely, such a control implies (4) up to a rescaling of the constants. Once again, the definition applies verbatim to \(X - \bdE \br{X}\) if \(X\) is not centered.
Notice also that if the MGF inequality holds for any possible \(b > 0\), then if we let \(b \to 0\) we recover the sub-Gaussian behaviour, which is nice.
Examples of sub-Gamma random variables
- From the definition: any centered random variable whose log-Laplace transform is upper bounded as in (4) near \(0\) is sub-Gamma. In particular, Gamma random variables are sub-Gamma.
- Random variable with controlled moment growth: any random variables for which there exists \(\sigma,b > 0\) such that \(\forall p \ \ge \ 2, \ \bdE \br{\abs{X}^p} \ \le \ \frac{p!}{2} \, \sigma^2 \, b^{p-2}\) is sub-Gamma on both tails (with parameters \(\asymp (\sigma^2, b)\)). Notice also that this is precisely the moment structure of centered Gamma random variables.
- sub-Gaussian random variables: any random variable that is sub-Gaussian is sub-Gamma, the converse is not true.
There are tail conditions that are heavier to write, so we will omit them here. The central concentration result for sub-Gamma random variables is the following:
Theorem 1 (Bernstein’s inequality). Let \(X\) be a centered random variable which is sub-Gamma with parameters \((\sigma^2, b)\). Then, for any \(z \ \ge \ 0\):
\[\bdP (X \ \ge \ z) \ \le \ \exp \p{ - \frac{z^2}{2(\sigma^2 + bz)} }.\]In particular, if \(X\) is sub-Gamma on both tails with parameters \((\sigma^2,b)\), then for any \(z \ \ge \ 0\),
\[\bdP (\abs{X} \ \ge \ z) \ \le \ 2 \exp \p{ - \frac{1}{4} \min \p{ \frac{z^2}{\sigma^2}, \frac{z}{b} } }.\]The theorem can be proven using Chernoff’s method, in a similar way as the sub-Gaussian result, although we need to be a bit more delicate since we cannot blindly optimize over \(\bdR\) here for instance. What is interesting is the interpretation of the result and to distinguish between the two possible concentration regimes.
Small deviations:
By small deviations, we mean that we are interested in deviations of order \(z\) such that \(z^2/\sigma^2 \ \le \ z/b\) i.e. \(z \lesssim \sigma^2/b\) so that we do get sub-Gaussian concentration with variance proxy \(\asymp \sigma^2\). In this regime, the small variations around the mean decay as if the variable were sub-Gaussian. This describes how concentrated \(X\) is near its mean.
Large deviations:
Past the threshold \(\asymp \sigma^2/b\), \(\bdP(\abs X \ \ge \ z)\) decays like \(\exp(-z/4b)\). The idea is that since \(X\) has heavier tails than in the Gaussian case, we cannot guarantee that the probability of observing very large values decays as fast as in the Gaussian case, hence tails are exponential-shaped instead of Gaussian-shaped.
We now put Bernstein’s inequality into perspective by comparing what it gives to the asymptotic optimality. The discussion that ensues is, I think, very interesting as, in a specific sense, it highlights an intermediate regime that happens for empirical means before the CLT kicks in.
The bridge between Bernstein’s inequality and the CLT
We first need the following short result, which will help us greatly in obtaining concentration bounds for empirical means of sub-Gamma random variables. Roughly, the sum of independent sub-Gamma random variables behaves very nicely under summation, much like in the Gaussian case:
Lemma (Tensorization for sub-Gamma random variables). Let \(X_1, \dots, X_n\) be centered independent sub-Gamma random variables with parameters \((\sigma_i^2, b_i)\) each. Then,
\[S_n = \sumn X_i \quad \text{is sub-Gamma with parameters } (\bar \sigma^2, b_*),\]where \(\bar \sigma^2 = \sumn \sigma_i^2\), \(b_* = \max_i b_i\).
Proof. The proof uses the MGF method, let \(0 \ \le \ t < 1/b_*\), we have
\[\log \bdE \br{ \exp ( t S_n ) } = \log \prod_{i = 1}^n \bdE \br{ \exp ( t X_i ) } \ \le \ \sumn \frac{\sigma_i^2 t^2}{2(1 - b_i t)} \ \le \ \frac{\bar{\sigma}^2 t^2}{2(1 - b_* t)},\]where the last inequality uses \(b_i \ \le \ b_*\) together with \(t \ \ge \ 0\). \(\square\)
In particular, if we apply the lemma to an empirical mean of i.i.d. sub-Gamma random variables with mean \(\mu\) and with parameters \((\sigma^2, b)\). We find
\[\bar{X}_n - \mu \quad \text{is sub-Gamma with parameters } (\sigma^2 / n, b/n).\]Note that the above result is applied to \(\bar{X}_n - \mu\) because we need our random variables to be centered. Assuming the summands are sub-Gamma on both tails, Bernstein’s inequality thus yields that for any \(z \ \ge \ 0\),
\[\bdP ( \abs{\bar{X}_n - \mu } \ \ge \ z) \ \le \ 2 \exp \p{ - \frac 1 4 \min \p{ \frac{n z^2}{\sigma^2}, \frac{nz}{b} } },\]and now, something interesting happens if we plug in the CLT scale for the confidence level in (5), namely, up to constants,
\[\bdP \p{ \abs{\bar{X}_n - \mu} \ \ge \ \sqrt{ \frac{2 \sigma^2 z}{n} } } \ \le \ 2 \exp \p{ - \frac{1}{2}\min \p{z, \frac{\sqrt{2n \sigma^2 z }}{b} } } \asymp 2 \exp(-z), \tag{6}\]whenever \(n \gtrsim \frac{b^2}{\sigma^2} z\).
We find that the deviations around the mean become Gaussian-like once \(n\) is large enough but finite! In a sense, this complements the CLT, as this gives the finite sample threshold the sample size has to cross for the Gaussian concentration regime to “kick in”.
Interpretation of the result:
A potential way to understand intuitively this phenomenon is to interpret the averaging process as something that smoothes out the potential outliers. Say that we have very few samples at our disposal, when we average them, we do not have a lot of terms in our empirical mean and the large deviations can dominate the mean if we got unlucky. Once we have many more samples however, the proportion of those outliers becomes small compared to the proportion of “usual samples” whose deviations are driven by the variance. The empirical mean thus concentrates around the mean sharply and its deviations are Gaussian like of order the variance, explaining why (6) gives Gaussian like concentration for the mean.
It makes sense to understand this phenomenon as two possible regimes:
- The small sample size regime: The mean is driven by the large deviations, there are not enough samples yet to smooth out the outliers present in the sum.
- The large sample size regime: The sample size is now large enough to smooth out the outliers, and since the natural scale of the deviations is the variance, most of the observations deviate from the mean by \(\asymp \sqrt{\Var(X)}\).
Hoeffding vs Bernstein
As a last section, I wanted to compare Hoeffding’s inequality with Bernstein’s inequality in the simple case of almost surely bounded random variables. Except for the fact that sub-Gaussian and sub-Gamma random variables are involved, this discussion is pretty much orthogonal to the previous one; however I found it interesting enough that I wanted to discuss it here.
In a few words, Hoeffding’s inequality tells us that bounded random variables are sub-Gaussian and gives the variance proxy as a function of the bounds, concretely:
Theorem 2 (Hoeffding’s inequality). Let \(X\) be a real valued random variable such that \(X \in [a,b]\) almost surely. Then, for any \(t \in \bdR\),
\[\bdE \br{ \exp (t (X - \bdE \br{X} ) )} \ \le \ \exp \p{ \frac{t^2(b-a)^2}{8}},\]i.e. \(X\) is sub-Gaussian with variance proxy \(\sigma^2 = (b-a)^2/4\).
It is also convenient to rewrite Bernstein’s inequality in a slightly different form, which will simplify our lives a bit here,
Corollary (Another form of Bernstein’s inequality). Let \(X\) be a centered random variable, sub-Gamma on both tails with parameters \((\sigma^2, b)\). Then for any \(z \ \ge \ 0\),
\[\bdP \p{ \abs X \ \ge \ \sqrt{2 \sigma^2 z } + bz } \ \le \ 2 \exp(-z).\]It turns out that if we want to obtain concentration on an empirical mean of bounded random variables, we can apply both theorems, and they do not necessarily yield the same result.
To simplify, assume that the summands \(X_i\) are i.i.d. with mean \(\mu > 0\) and satisfy \(\abs{X_i} \ \le \ B\) for some \(B > 0\) (i.e. we do not burden ourselves with distinct upper and lower bounds on the \(X_i\)’s).
What Hoeffding’s inequality buys us:
Ignoring constants, Hoeffding’s inequality tells us that the variance proxy of each \(X_i\) is upper bounded by \(B^2\), so that tensorization on the empirical mean and sub-Gaussian concentration gives:
\[\bdP \p{ \abs{\bar{X}_n - \mu} \ \ge \ \sqrt{\frac{2 B^2 z}{n} } } \ \le \ 2\exp(-z).\]We obtain sub-Gaussian concentration directly with \(B^2\) playing the role of the variance of the summands. Let us keep that in mind and look at what Bernstein’s inequality buys us now.
What Bernstein’s inequality buys us:
The idea is to apply the moment definition (second point of Examples of sub-Gamma random variables) to find our sub-Gamma parameters. Let \(p \ \ge \ 2\) and \(X\) be an i.i.d. copy of the \(X_i\)’s; the condition has to be applied to the centered variable \(X - \mu\), which satisfies \(\abs{X - \mu} \ \le \ 2B\) almost surely, so that
\[\bdE \br{ \abs{X - \mu}^p } \ \le \ (2B)^{p-2} \bdE \br{ (X-\mu)^2 } \ \le \ \frac{p!}{2} \, \sigma^2 \, (2B)^{p-2},\]writing \(\sigma^2 = \Var(X) = \bdE \br{(X - \mu)^2}\). Thus, we find that \(X - \mu\) is also sub-Gamma with parameters \(\asymp (\sigma^2, B)\), tensorization gives that \(\bar{X}_n - \mu\) is sub-Gamma with parameters \(\asymp (\sigma^2/n, B/n)\) and Bernstein’s inequality in the second form (Corollary above) gives, up to constants,
\[\bdP \p{ \abs{\bar{X}_n - \mu} \ \ge \ \sqrt{ \frac{2 \sigma^2 z }{n} } + \frac{Bz}{n} } \ \le \ 2 \exp(-z). \tag{7}\]Using those two guarantees, a natural question is to ask for which value of \(n\), our estimate of \(\mu\) is reliable with (controllable) high probability. For that purpose, because we have inequalities of the form \(\abs{\bar{X}_n - \mu } \ \le \ T_n\), we want to determine the value of \(n\) that makes \(T_n \asymp \mu\), for instance \(T_n \ \le \ \mu/2\) so that
\[\frac{\mu}{2} \ \le \ \bar{X}_n \ \le \ \frac{3}{2} \mu \quad \text{with high probability}.\]Sample size condition, Hoeffding’s:
We solve
\[\sqrt{ \frac{2B^2 z }{n} } \lesssim \mu \iff n_H \gtrsim \frac{B^2}{\mu^2} z. \tag{8}\]Sample size condition, Bernstein’s:
\[\sqrt{ \frac{2 \sigma^2 z }{n} } \lesssim \mu \iff n \gtrsim \frac{\sigma^2}{\mu^2} z,\]and
\[\frac{Bz}{n} \lesssim \mu \iff n \gtrsim \frac{B}{\mu} z,\]which yields
\[n_B \gtrsim \max \p{ \frac{\sigma^2}{\mu^2} z, \frac{B}{\mu} z }. \tag{9}\]We obtain, by dividing thresholds (8) and (9):
\[\frac{n_H}{n_B} = \frac{B^2}{\mu^2} \min \p{\frac{\mu^2}{\sigma^2}, \frac{\mu}{B} } = \min \p{ \frac{B^2}{\sigma^2}, \frac{B}{\mu}} \ \ge \ 1.\]Thus \(n_H \ \ \ge \ \ n_B\) in all cases, as clearly \(0 < \mu = \bdE \br{X} \ \le \ \bdE \br{ \abs{X}} \ \le \ B\). For the first term in the minimum, Popoviciu’s inequality on variances gives \(\sigma^2 \ \le \ B^2\), which makes both terms in the minimum greater than one.
Conclusion: It turns out that Bernstein’s inequality is never worse than Hoeffding’s inequality when controlling empirical means. The reason is that Hoeffding’s uses the upper bound \(B\) as the proxy for the variance, which, as shown by Popoviciu’s inequality is the worst case in a sense. On the other hand, the leading term in Bernstein’s inequality (7) captures the correct order of the deviations by using the variance in our case.
In our case, Bernstein’s inequality and Hoeffding’s inequality would have given similar results if the variance of \(X\) was comparable to the upper bound on \(X\). For instance, if \(X\) is Bernoulli \(X \sim \mathcal{B}(1/2)\) then \(B = 1\) and \(\Var(X) = 1/4 \asymp B\) (both of constant order). On the other hand, consider the case where \(p\) is very small and we want to estimate it by
\[\bar{X}_n = \frac{1}{n} \sumn \ind{X_i = 1}\]as in the previous setting, we want to determine the threshold of \(n\) for which our estimation is precise with high probability (given a specified confidence interval). In this case then, the variance is \(p(1-p)\) which is truly of order \(p \ll 1 = B\) so that using Hoeffding’s inequality, which gives \(B\) for the variance proxy, leads to the condition \(n \gtrsim p^{-2}\) which is much much larger than the \(n \gtrsim p^{-1}\) condition that Bernstein’s gives us in this setting.
References
[1] S. Boucheron, G. Lugosi and P. Massart. Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press, 2013. doi:10.1093/acprof:oso/9780199535255.001.0001
[2] H. Chernoff. A Measure of Asymptotic Efficiency for Tests of a Hypothesis Based on the Sum of Observations. The Annals of Mathematical Statistics, 23(4), 493–507, 1952. doi:10.1214/aoms/1177729330
[3] M. Lerasle. High dimensional statistics - Lecture notes. Unpublished.
