Concentration inequalities for sampling without replacement
Rémi Bardenet, Odalric-Ambrym Maillard
Introduction
Few results exist on the concentration properties of sampling without replacement from a finite population . However, potential applications are numerous, from historical applications such as opinion surveys (Kish ) and ecological counting procedures (Bailey ), to more recent approximate Monte Carlo Markov chain algorithms that use subsampled likelihoods (Bardenet, Doucet and Holmes ). In a fundamental paper on sampling without replacement, Serfling introduced an efficient Hoeffding bound, that is, one which is a function of the range of the population. Bernstein bounds are typically tighter when the variance of the random variable under consideration is small, as their leading term is linear in the standard deviation of , while the range only influences higher-order terms. This paper is devoted to Hoeffding and Bernstein bounds for sampling without replacement.
Let be a finite population of real points. We use capital letters to denote random variables on , and lower-case letters for their possible values. Sampling without replacement a list of size from can be described sequentially as follows: let first , sample an integer uniformly on , and set to be . Then, for each , sample uniformly on the remaining indices . Hereafter, we assume that .
Previous work
There have been a few papers on concentration properties of sampling without replacement; see, for instance, Hoeffding , Serfling , Horvitz and Thompson , McDiarmid . One notable contribution is the following reduction result in Hoeffding’s seminal paper (Hoeffding , Theorem 4):
Lemma 1.1 implies that the concentration results known for sampling with replacement as Chernoff bounds (Boucheron, Lugosi and Massart ) can be transferred to the case of sampling without replacement. In particular, Proposition 1.2, due to Hoeffding , holds for the setting without replacement.
Let be a finite population of points and be a random sample drawn without replacement from . Let
where is the mean of .
The proof of Proposition 1.2 (see, e.g., Boucheron, Lugosi and Massart ) relies on a classical bound on the moment-generating function of a random variable, which we restate here as Lemma 1.3 for further reference.
When the variance of is small compared to the range , another Chernoff bound, known as Bernstein’s bound (Boucheron, Lugosi and Massart ), is usually tighter than Proposition 1.2.
With the notations of Proposition 1.2, let
be the variance of . Then, for all ,
Although these are interesting results, it appears that the bounds in Propositions 1.2 and 1.4 are actually very conservative, especially when is large, say, . Indeed, Serfling proved that the term in the RHS of (1) can be replaced by ; see Theorem 2.4 below, where the result of Serfling is restated in our notation and slightly improved. As approaches , the bound of Serfling improves dramatically, which corresponds to the intuition that when sampling without replacement, the sample mean becomes a very accurate estimate of as approaches .
Contributions and outline
In Section 2, we slightly modify Serfling’s result, yielding a Hoeffding–Serfling bound in Theorem 2.4 that dramatically improves on Hoeffding’s in Proposition 1.2. In Section 3, we contribute in Theorem 3.5 a similar improvement on Proposition 1.4, which we call a Bernstein–Serfling bound. To allow practical applications of our Bernstein–Serfling bound, we finally provide an empirical Bernstein–Serfling bound in Section 4, in the spirit of Maurer and Pontil , which does not require the variance of to be known beforehand. In Section 5, we discuss direct applications and potential further improvements of our results.
Illustration
A reminder of Serfling’s fundamental result
In this section, we recall an initial result and proof by Serfling , and slightly improve on his final bound.
We start by identifying the following martingales structures. Let us introduce, for ,
Note that by definition , so that the -algebra is equal to .
The following forward martingale structure holds for :
Similarly, the following reverse martingale structure holds for :
We first prove (3). Let . We start by noting that
Since is uniformly distributed on the remaining elements of after have been drawn, its conditional expectation given is the average of the remaining points in . Since points in add up to , we obtain
We now turn to proving (4). First, let . Since
is equal to . Now, let us remark that the indices of are uniformly distributed on the permutations of , so that and have the same marginal distribution. Consequently,
where we introduced the sum . Finally, we prove (4) along the same lines as (3):
Let us now state the main result of Serfling . This is a key result to derive a concentration inequality, a maximal concentration inequality and a self-normalized concentration inequality, as explained in Serfling .
Let us denote , and . Then, for any , it holds that
Moreover, for any , it also holds that
First, (2) yields that for all ,
Furthermore, we know from (2) that is the conditional expectation of given . Thus, since , Lemma 1.3 applies and we get that, for all ,
Similarly, we can apply Lemma 1.3 to to obtain
Upon noting that , and combining (8) and (9) together with the decomposition (7), we eventually obtain the bound
In particular, for such that , the RHS of this equation contains the quantity
where we used in the second line the following approximation from (Serfling , Lemma 2.1): for , it holds
This concludes the proof of the first result of Proposition 2.2. The second result follows from applying Doob’s maximal inequality for martingales combined with the previous derivation. ∎
The result of Proposition 2.2 reveals a powerful feature of the no replacement setting: the factor in the exponent, as opposed to in the case of sampling with replacement. This leads to a dramatic improvement of the bound when is large, as can be seen on Figure 1. Serfling mentioned that a factor would be intuitively more natural, as indeed when the mean is known exactly, so that is deterministically zero.
Serfling did not publish any result with . However, it appears that a careful examination of the previous proof and of the use of equation (4), in lieu of (3), allows us to get such an improvement. We detail this in the following proposition. More than a simple cosmetic modification, it is actually a slight improvement on Serfling’s original result when .
Let be defined by (2). For any , it holds that
Moreover, for any , it also holds that
Let us introduce the notation for . From (4), it comes
By a change of variables, this can be rewritten as
Now we remark that the following decomposition holds:
Since is the conditional mean of , Lemma 1.3 yields that, for all ,
On the other hand it holds by definition of that
Along the lines of the proof of Proposition 2.2, we obtain
Combining equations (12) and (13) with the decomposition (2), it comes
where in the last line we made use of (2). Rewriting this inequality in terms of , we obtain that, for all ,
that is, by resorting to a new change of variable,
The second part of the proposition follows from applying Doob’s maximal inequality for martingales to , similarly to Proposition 2.2. ∎
Let be a finite population of real points, and be a list of size sampled without replacement from . Then for all , the following concentration bounds hold
where and .
Applying Proposition 2.3 together with Markov’s inequality, we obtain that, for all ,
We now optimize the previous bound in . The optimal value is given by
This gives the first inequality of Theorem 2.4. The proof of the second inequality follows the very same lines. ∎
Inverting the result of Theorem 2.4 for and remarking that the resulting bound still holds for , we straightforwardly obtain the following result.
For all , for all , with probability higher than , it holds
A Bernstein–Serfling inequality
In this section, we consider is known, and extend Theorem 2.4 to that situation.
Similarly to Lemma 2.1, the following structural lemma will be useful:
where the ’s are defined in (2). Similarly, it holds
We simply remark again that, conditionally on , the variable is distributed uniformly over the remaining points in , so that
The second equality of Lemma 3.1 follows from the same argument, as in the proof of Lemma 2.1. ∎
Let us now introduce the following notations:
We are now ready to state Proposition 3.2, which is a Bernstein version of Proposition 2.2.
The key point is to replace equations (8) and (9) in the proof of Proposition 2.2, which make use of the range of , by equivalent ones that involve the variance. We only detail the proof of the first inequality, the proof of the three others follows the same steps.
A standard result from the proof of Bennett’s inequality (see Lugosi , page 11, or Boucheron, Lugosi and Massart , proof of Theorem 2.9) applied to the random variable , with conditional mean and conditional variance , yields
where we used the notation of Proposition 2.3, and the function defined in the statement of the proposition
where is deterministic.
Thus, combining (3) and (16) together with the decomposition (2), we eventually get the bound
Using the result of Proposition 3.2, we could immediately derive a simple Bernstein inequality for sampling without replacement via an application of Theorem 2.4 to the random variables . However, Maurer and Pontil and Audibert, Munos and Szepesvári showed that, in the case of sampling with replacement, a careful use of self-bounded properties of the variance yields better bounds. We now explain how to get a similar improvement on the naive Bernstein inequality in the case of sampling without replacement. We start with a technical lemma.
For all , with probability larger than , it holds
Similarly, with probability larger than , it holds
When , the upper bound on reduces to . Indeed, this limit case intuitively corresponds to sampling with replacement, for which the conditional variance equals .
Proof of Lemma 3.3 We first prove (17). By definition and Lemma 3.1, it holds that
Let . Equation (3) yields
The rest of the proof proceeds by establishing a suitable maximal concentration bound for the quantity , the mean of which is .
We remark that is a martingale. Indeed, it satisfies
where we applied Lemma 3.1 in the third line. Doob’s maximal inequality thus yields that, for all ,
At this point, we fix and apply Lemma 1.1 to the random variables and function . We deduce that, for all and ,
Now, we check that the assumptions of Theorem 13 of Maurer hold. We first introduce the modification
and, on the other hand, that the following self-bounded property holds:
Finally, we have proven that for all , with probability higher than ,
We now turn to proving (18). First, we remark that
where in the second line we used that , and in the third line we used the change of variables . It follows that
Now has the same marginal distribution as , so that the proof of (17) applies and yields the result.
We emphasize that we used Hoeffding’s reduction Lemma 1.1 in the proof of Lemma 3.3. This allowed us to apply the key result from Maurer . We will discuss alternatives to this proof in Section 5. We can now state our Bernstein–Serfling bound.
Let be a finite population of real points, and be a list of size sampled without replacement from . Then, for all and , the following concentration inequality holds
, and . Similarly, it holds
We first prove (22). Applying Proposition 3.2 together with Markov’s inequality, we obtain that for all ,
Thus, combining equations (23) and (18) with a union bound, we get that for all for all , with probability higher than , it holds that
where we used in the second line the fact that is nondecreasing and where we applied (2) in the last line. For convenience, let us now introduce the quantities and
The previous bound can be rewritten in terms of and only, in the form
We now optimize the bound (24) in . Let us introduce the function
corresponding to the term in brackets in (24). By definition of , it comes
and the value that optimizes is given by
where we introduced in the last line the function . Now, using the identify for , we obtain
which concludes the proof of (22). The proof of (21) follows the very same lines, simply using (17) instead of (18). ∎
Inverting the bounds of Theorem 3.5, we obtain Corollary 3.6.
Let and . With probability larger than , it holds that
where we remind the definition of (14)
Let . From (21) in Theorem 3.5, it comes that, with probability higher than ,
where we introduced for convenience and
Solving this equation in leads to
On the other hand, following the same lines but starting from (22) in Theorem 3.5, it holds that, with probability higher than ,
Thus, when , we deduce that for all , with probability higher than , it holds
whereas when , it holds, with probability higher than , that
Finally we note that when , and . So the bound is still satisfied. ∎
An empirical Bernstein–Serfling inequality
In this section, we derive a practical version of Theorem 3.5 where the variance is replaced by an estimate. A natural (biased) estimator is given by
We also define, for notational convenience, the quantity .
Before proving our empirical Bernstein–Serfling inequality, we first need to control the error between and . For instance, in the standard case of sampling with replacement, it can be shown (Maurer and Pontil ) that, for all ,
We now show an equivalent result in the case of sampling without replacement.
When sampling without replacement from a finite population of size , with range and variance , the empirical variance defined in (26) using samples satisfies the following concentration inequality (using the notation of Corollary 2.5)
We conjecture that it is possible, at the price of a more complicated analysis, to reduce the term to , which would then be consistent with the analogous result for sampling with replacement in Maurer and Pontil . We further discuss this technically involved improvement in Section 5.
Proof of Lemma 4.1 In order to prove Lemma 4.1, we again use Lemma 1.1, which allows us to relate the concentration of the quantity to that of its equivalent
The first line results of the application of Markov’s inequality. The second line follows from the application of Lemma 1.1 to and . The last steps are the same as in the proof of Lemma 3.3.
So far, we have shown that, with probability at least ,
that is, . In order to complete the proof, we thus resort twice to Theorem 2.4 to obtain that, with probability higher than , it holds
Combining equations (27) and (28) with a union bound argument yields that, with probability at least ,
Eventually, combining Theorem 3.5 and Lemma 4.1 with a union bound argument, we finally deduce the following result.
Let be a finite population of real points, and be a list of size sampled without replacement from . Then for all , with probability larger than , it holds
where we remind the definition of (14)
and .
First, Theorem 4.3 has the familiar form of Bernstein bounds. The alternative definition of guarantees that we get the best reduction out of the no replacement setting. In particular, when is large, the factor replaces and the corresponding factor eventually equals when , a feature that was missing in Proposition 2.2. Second, the constant is to relate to the constant in Maurer and Pontil , Theorem 11, for sampling with replacement.
Proof of Theorem 4.3 First, by application of Corollary 3.6, it holds for all that, with probability higher than ,
where we remind the definition of (14)
We then apply Lemma 4.1 to get that, with probability higher than , if , then
We now simplify this result. Assume first that . We thus get
Assume now that . In this case, it holds
Respectively combining (31) and (32) with equations (4) and (4) concludes the proof.
Discussion
In this section, we discuss the bounds of Theorem 3.5 and Theorem 4.3 from the perspective of both theory and application.
First, both bounds involve either the factor or , thus leading to a dramatic improvement on the usual Bernstein or empirical Bernstein bounds, which do not make use of the no replacement setting. This is crucial, for instance, when the user needs to rapidly compute an empirical mean from a large number of samples up to some precision level. To better understand the improvement of Serfling bounds, we plot in Figure 2 the bounds of Corollaries 2.5 and 3.6, and Theorem 4.3 for an example where is a sample of size from each of the following four distributions: unit centered Gaussian, log-normal with parameters , and Bernoulli with parameter 110 and 12. As increases, we keep sampling without replacement from until exhaustion, and report the corresponding bounds. Note that all our bounds have their leading term exactly equal to zero when , though our Hoeffding–Serfling bound only is exactly zero. In all experiments, the loss of tightness as a result of using the empirical variance is small. Our empirical Bernstein–Serfling demonstrates here a dramatic improvement on the Hoeffding–Serfling bound of Corollary 2.5 in Figures 2(a) and 2(b). A slight improvement is demonstrated in Figure 2(c) where the standard deviation of is roughly a third of the range. Finally, Bernstein–Serfling itself does not improve on Hoeffding–Serfling in Figure 2(d), where the standard deviation is roughly half of the range, again indicating that Bernstein bounds are not uniformly better than Hoeffding bounds.
There is a number of nontrivial applications of our bounds. Scratch games, for instance, were introduced in Féraud and Urvoy as a variant of the multi-armed bandit problem, to model two real world problems: selecting ads to display on web pages and optimizing e-mailing campaigns. In particular, Féraud and Urvoy discuss practical situations where an upper confidence bound algorithm based on a Hoeffding–Serfling inequality outperforms a standard algorithm based on Hoeffding’s inequality. Similar improvements should appear in practice when using our empirical Bernstein–Serfling inequality. As another application, our results could be useful in optimization. The stochastic dual-coordinate ascent algorithm (SDCA; Shalev-Shwartz and Zhang ) is a state-of-the-art optimization algorithm used in machine learning. Shalev-Shwartz and Zhang introduce a variant of SDCA called SDCA-Perm, which – unlike SDCA – relies on sampling without replacement, and achieves better empirical performance than SDCA. However, the analysis in Shalev-Shwartz and Zhang does not cover SDCA-Perm. We believe that the use of Serfling bounds is an appropriate tool for that purpose.
To conclude, we discuss potential improvements of our bounds. A careful look at Lemmas 3.3 and 4.1 indicates that our bounds may be further improved, though at the price of a more intricate analysis. Indeed, these two lemmas both resort to Hoeffding’s reduction Lemma 1.1, in order to be able to apply concentration results known for self-bounded random variables to the setting of sampling without replacement. As a result, we lose here a potential factor for the confidence bound around the variance, and we conjecture that the term in Lemma 4.1 could ultimately be replaced with . A natural tool for this would be a dedicated tensorization inequality for the entropy in the case of sampling without replacement (Boucheron, Lugosi and Massart , Maurer , Bousquet ). Indeed, it is not difficult to show that satisfies a self-bounded property similar to that of Maurer and Pontil , Theorem 11, involving the factor . Thus, in order to be able to get a version of Maurer and Pontil , Theorem 11, in our setting, a specific so-called tensorization inequality would be enough. Unfortunately, we are unaware of the existence of such an inequality for sampling without replacement, where the samples are strongly dependent. We are also unaware of any tensorization inequality designed for -statistics, which could be another possible way to get the desired result. Although we believe this is possible, developing such tools goes beyond the scope of this paper, and the current results of Theorem 3.5 and Theorem 4.3 are already appealing without resorting to further technicalities, which would only affect second-order terms in the end.
Acknowledgements
This work was supported by both the 2020 Science program, funded by EPSRC grant number EP/I017909/1, and the Technion.