Testing $k$-Modal Distributions: Optimal Algorithms via Reductions
Constantinos Daskalakis, Ilias Diakonikolas, Rocco A. Servedio, Gregory Valiant, Paul Valiant
Introduction
While it is surprising that these tasks can be performed using a sublinear number of samples, for many real-world applications using , , or samples is still impractical. As these bounds characterize worst-case instances, one might hope that drastically better performance may be possible for many settings typically encountered in practice. Thus, a natural research direction, which we pursue in this paper, is to understand how structural properties of the distributions in question may be leveraged to yield improved sample complexities.
In this work we consider monotone, unimodal, and more generally -modal distributions. Monotone, unimodal, and bimodal distributions abound in the natural world. The distribution of many measurements—heights or weights of members of a population, concentrations of various chemicals in cells, parameters of many atmospheric phenomena–often belong to this class of distributions. Because of their ubiquity, much work in the natural sciences rests on the analysis of such distributions (for example, on November 1, 2011 a Google Scholar search for the exact phrase “bimodal distribution” in the bodies of papers returned more than 90,000 hits). Though perhaps not as pervasive, -modal distributions for larger values of commonly arise as mixtures of unimodal distributions and are natural objects of study. On the theoretical side, motivated by the many applications, monotone, unimodal, and -modal distributions have been intensively studied in the probability and statistics literatures for decades, see e.g. [Gre56, Rao69, BBBB72, CKC83, Gro85, Bir87a, Bir87b, Kem91, Fou97, CT04, JW09].
Our main results are algorithms, and nearly matching lower bounds, that give a complete picture of the sample complexities of identity testing and estimating distance for monotone and -modal distributions. We obtain such results in both the setting where the two distributions are given via samples, and the setting where one of the distributions is given via samples and the other is described explicitly.
We view the equivalence between the sample complexity of each of the above tasks on a monotone or unimodal distribution of domain and the sample complexity of the same task on an unrestricted distribution of domain as a surprising result, because such an equivalence fails to hold for related estimation tasks. For example, consider the task of distinguishing whether a distribution on is uniform versus far from uniform. For general distributions this takes samples, so one might expect the corresponding problem for monotone distributions to need samples; in fact, however, one can test this with a constant number of samples, by simply comparing the empirically observed probability masses of the left and right halves of the domain. An example in the other direction is the problem of finding a constant additive estimate for the entropy of a distribution. On domains of size this can be done in samples, and thus one might expect to be able to estimate entropy for monotone distributions on using samples. Nevertheless, it is not hard to see that samples are required.
The reduction-like techniques which we use to establish both our algorithmic results and our lower bounds (discussed in more detail in Section 1.2 below) reveal an unexpected relationship between the class of -modal distributions of support and the class of general distributions of support . We hope that this reduction-based approach may provide a framework for the discovery of other relationships that will be useful in future work in the extreme sublinear regime of statistical property estimation and property testing.
Comparison with prior work. Our results significantly extend and improve upon the previous algorithmic results of Batu et al [BKR04] for identity testing of monotone or unimodal () distributions, which required samples. More recently, [DDS11] established the sample complexity of learning -modal distributions to be essentially . Such a learning algorithm easily yields a testing algorithm with the same sample complexity for all four variants of the testing problem (one can simply run the learner twice to obtain hypotheses and that are sufficiently close to and respectively, and output accordingly).
While the [DDS11] result can be applied to our testing problems (though giving suboptimal results), we stress that the ideas underlying [DDS11] and this paper are quite different. The [DDS11] paper learns a -modal distribution by using a known algorithm for learning monotone distributions [Bir87b] times in a black-box manner; the notion of reducing the domain size—which we view as central to the results and contributions of this paper—is nowhere present in [DDS11]. By contrast, the focus in this paper is on introducing the use of reductions as a powerful (but surprisingly, seemingly previously unused) tool in the development of algorithms for basic statistical tasks on distributions, which, at least in this case, is capable of giving essentially optimal upper and lower bounds for natural restricted classes of distributions.
2 Techniques.
Our main conceptual contribution is a new reduction-based approach that lets us obtain all our upper and lower bounds in a clean and unified way. The approach works by reducing the monotone and -modal distribution testing problems to general distribution testing and estimation problems over a much smaller domain, and vice versa. For the monotone case this smaller domain is essentially of size , and for the -modal case the smaller domain is essentially of size By solving the general distribution problems over the smaller domain using known results we get a valid answer for the original (monotone or -modal) problems over domain . More details on our algorithmic reduction are given in Section A.
The inspiration for our results is an observation of Birgé [Bir87b] that given a monotone-decreasing probability distribution over , if one subdivides into an exponentially increasing series of consecutive sub-intervals, the th having size , then if one replaces the probability mass on each interval with a uniform distribution on that interval, the distribution changes by only in total variation distance. Further, given such a subdivision of the support into intervals, one may essentially treat the original monotone distribution as essentially a distribution over these intervals, namely a distribution of support . In this way, one may hope to reduce monotone distribution testing or estimation on to general distribution testing or estimation on a domain of size , and vice versa. See Section B for details.
Notation and Preliminaries
We write to denote the set , and for integers we write to denote the set . We consider discrete probability distributions over , which are functions such that . For we write to denote . We use the notation for the cumulative distribution function (cdf) corresponding to , i.e. is defined by .
A distribution over is non-increasing (resp. non-decreasing) if (resp. ), for all ; is monotone if it is either non-increasing or non-decreasing. Thus the “orientation” of a monotone distribution is either non-decreasing (denoted ) or non-increasing (denoted ).
We call a nonempty interval a max-interval of if for all and . Analogously, a min-interval of is an interval with for all and . We say that is -modal if it has at most max-intervals and min-intervals. We note that according to our definition, what is usually referred to as a bimodal distribution is a -modal distribution.
Finally, a sub-distribution is a function which satisfies For a distribution over and , the restriction of to is the sub-distribution defined by if and otherwise. Likewise, we denote by the conditional distribution of on , i.e. if and otherwise.
2 Basic tools from probability.
We will require the Dvoretzky-Kiefer-Wolfowitz (DKW) inequality ([DKW56]) from probability theory. This basic fact says that samples suffice to learn any distribution within error with respect to the Kolmogorov distance. More precisely, let be any distribution over Given independent samples drawn from the empirical distribution is defined as follows: for all , . The DKW inequality states that for , with probability the empirical distribution will be -close to in Kolmogorov distance. This sample bound is asymptotically optimal and independent of the support size.
Another simple result that we will need is the following, which is easily verified from first principles:
Let be an interval and let denote the uniform distribution over Let denote a non-increasing distribution over . Then for every initial interval of , we have
3 Testing and estimation for arbitrary distribution
If then with probability at least the algorithm outputs “accept;” and
If then with probability at least the algorithm outputs “accept;” and
Testing and Estimating Monotone Distributions
Our main tool for testing monotone distributions is an oblivious decomposition of monotone distributions that is a variant of a construction of Birgé [Bir87b]. As we will see it enables us to reduce the problem of testing a monotone distribution to the problem of testing an arbitrary distribution over a much smaller domain.
The following simple lemma, proved in Section A, shows why reduced distributions are useful for us:
We now state our oblivious decomposition result for monotone distributions:
There is an analogous version of Theorem 5, asserting the existence of an “oblivious” partition for non-decreasing distributions (which is of course different from the “oblivious” partition for non-increasing distributions of Theorem 5); this will be useful later.
While our construction is essentially that of Birgé, we note that the version given in [Bir87b] is for non-increasing distributions over the continuous domain , and it is phrased rather differently. Adapting the arguments of [Bir87b] to our discrete setting of distributions over is not conceptually difficult but requires some care. For the sake of being self-contained we provide a self-contained proof of the discrete version, stated above, that we require in Appendix E.
2 Efficiently testing monotone distributions
From Monotone to k𝑘k-modal
In this section we establish our main positive testing results for -modal distributions, the upper bounds stated in the final four rows of Table 1. In the previous section, we were able to use the oblivious decomposition to yield a partition of into relatively few intervals, with the guarantee that the corresponding flattened distribution is close to the true distribution. The main challenge in extending these results to unimodal or -modal distributions, is that in order to make the analogous decomposition, one must first determine–by taking samples from the distribution–which regions are monotonically increasing vs decreasing. Our algorithm Construct-Flat-Decomposition performs this task with the following guarantee:
The following terminology will be useful: Let and be two partitions of into and intervals respectively. The common refinement of and is the partition of into intervals obtained from and in the obvious way, by taking all possible nonempty intervals of the form It is clear that is both a refinement of and of and that the number of intervals in is at most We prove the following lemma in Section A:
Let be any distribution over , let be a -flat decomposition of , and let be a refinement of Then is a -flat decomposition of .
We describe the Test-Identity-Known-kmodal algorithm below.
The modifications required to obtain algorithms Test-Identity-Unknown-kmodal, -Estimate-Known-kmodal and -Estimate-Unknown-kmodal, and the analysis of these algorithms, are completely analogous to the modifications and analyses of Section 3.2 and are omitted.
We present Construct-Flat-Decomposition followed by an intuitive explanation. Note that it employs a procedure Orientation, which uses no samples and is presented and analyzed in Section 4.2.
Roughly speaking, when Construct-Flat-Decomposition constructs a partition , it initially breaks up into two types of intervals. The first type are intervals that are “okay” to include in a flat decomposition, either because they have very little mass, or because they consist of a single point, or because they are close to uniform. The second type are intervals that are “not okay” to include in a flat decomposition – they have significant mass and are far from uniform – but the algorithm is able to ensure that almost all of these are monotone distributions with a known orientation. It then uses the oblivious decomposition of Theorem 5 to construct a flat decomposition of each such interval. (Note that it is crucial that the orientation is known in order to be able to use Theorem 5.)
In more detail, Construct-Flat-Decomposition works as follows. The algorithm first draws a batch of samples from and uses them to construct an estimate of the CDF of (this is straightforward using the DKW inequality). Using the algorithm partitions into a collection of disjoint intervals in the following way:
A small collection of the intervals are “negligible”; they collectively have total mass less than under . Each negligible interval will be an element of the partition
Some of the intervals are “heavy points”; these are intervals consisting of a single point that has mass under . Each heavy point will also be an element of the partition
The remaining intervals are “moderate” intervals, each of which has mass under .
2 The Orientation algorithm.
The Orientation algorithm takes as input an explicit distribution of a distribution over and an interval Intuitively, it assumes that is close (in Kolmogorov distance) to a monotone distribution , and its goal is to determine the orientation of : it outputs either , or (the last of which means “close to uniform”). The algorithm is quite simple; it checks whether there exists an initial interval of on which ’s weight is significantly different from (the weight that the uniform distribution over assigns to ) and bases its output on this in the obvious way. A precise description of the algorithm (which uses no samples) is given below.
Orientation Inputs: explicit description of distribution over ; interval 1. If (i.e. for some ) then return “”, otherwise continue. 2. If there is an initial interval of that satisfies then halt and output “”. Otherwise, 3. If there is an initial interval of that satisfies then halt and output “”. Otherwise, 4. Output “”.
We proceed to analyze Orientation. We show that if is far from uniform then Orientation outputs the correct orientation for it. We also show that whenever Orientation does not output “”, whatever it outputs is the correct orientation of . The proof is given in Section C.3.
Let be a distribution over and let interval be such that is monotone. Suppose , and suppose that for every interval we have that Then
If is non-decreasing and is -far from the uniform distribution over , then Orientation outputs “”;
if Orientation outputs “” then is non-decreasing;
if is non-increasing and is -far from the uniform distribution over , then Orientation outputs “”;
if Orientation outputs “” then is non-increasing.
Lower Bounds
Our algorithmic results follow from a reduction which shows how one can reduce the problem of testing properties of monotone or -modal distributions to the task of testing properties of general distributions over a much smaller support. Our approach to proving lower bounds is complementary; we give a canonical scheme for transforming “lower bound instances” of general distributions to related lower bound instances of monotone distributions with much larger supports.
Definitions 2 and 3, given below, define a two-stage transformation of a generic distribution into a related -modal distribution over a much larger support. This transformation preserves total variation distance: for any pair of distributions, the variation distance between their transformations is identical to the variation distance between the original distributions. Additionally, we ensure that given access to independent samples from an original input distribution, one can simulate drawing samples from the related -modal distribution yielded by the transformation. Given any lower–bound construction for general distributions, the above transformation will yield a lower–bound instance for -modal distributions (so monotone distributions correspond to ) defined by selecting a pair of distributions then outputting the pair of transformed distributions. This transformed ensemble of distributions is a lower–bound instance, for if some algorithm could successfully test pairs of -modal distributions from then that algorithm could be used to test pairs from , by simulating samples drawn from the transformed versions of the distributions. The following proposition, proved in Section D, summarizes the above discussion:
Before proving this proposition, we state various corollaries which result from applying the Proposition to known lower-bound constructions for general distributions. The first is for the “testing identity, is unknown” problem:
This Corollary gives the lower bounds stated in lines 2 and 6 of Table 1. It follows from applying Proposition 6 to a (trivially modified) version of the lower bound construction given in [BFR+00, Val08b], summarized by the following theorem:
Our second corollary is for estimation, in the case that one of the distributions is explicitly given. This trivially also yields an equivalent lower bound for the setting in which both distributions are given via samples.
This Corollary gives the lower bounds claimed in lines 3, 4, 7 and 8 of Table 1. It follows from applying Proposition 6 to the lower bound construction given in [VV11a], summarized by the following theorem:
Note that the above theorem can be expressed in the language of Proposition 6 by defining the distribution over pairs of distributions which chooses a distribution according to for the first distribution of each pair, and always selects for the second distribution of each pair.
Our third corollary, which gives the lower bounds claimed in lines 1 and 5 of Table 1, is for the “testing identity, is known” problem:
The above corollary follows from applying Proposition 6 to the following trivially verified lower bound construction:
As noted previously (after Theorem 7), this fact can also be expressed in the language of Proposition 6.
Conclusions
We have introduced a simple new approach for tackling distribution testing problems for restricted classes of distributions, by reducing them to general-distribution testing problems over a smaller domain. We applied this approach to get new testing results for a range of distribution testing problems involving monotone and -modal distributions, and established lower bounds showing that all our new algorithms are essentially optimal.
A general direction for future work is to apply our reduction method to obtain near-optimal testing algorithms for other interesting classes of distributions. This will involve constructing flat decompositions of various types of distributions using few samples, which seems to be a natural and interesting algorithmic problem. A specific goal is to develop a more efficient version of our Construct-Flat-Decomposition algorithm for -modal distributions; is it possible to obtain an improved version of this algorithm that uses samples?
References
Appendix A Shrinking the domain size: Reductions for distribution-testing problems
In this section we present the general framework of our reduction-based approach and sketch how we instantiate this approach for monotone and -modal distributions.
The following useful lemma relates closeness of and to closeness of the reduced distributions:
We close this section with a result about partitions and flat decompositions which will be useful later. Let be two partitions of . We say that is a refinement of if for every there is a subset of such that (note that for this to hold we must have ). Note that forms a partition of . We prove the following useful lemma:
Lemma 4. Let be any distribution over , let be a -flat decomposition of , and let be a refinement of Then is a -flat decomposition of .
We now proceed to establish (1). Let and consider a partition of into nonempty sets , . Denote and . Then, (1) can be re-expressed as follows
We shall prove the above statement for all sequences of numbers . Since adding or subtracting the same quantity from each number does not change the validity of (2), for the sake of convenience we may assume all the numbers average to , that is, . Consider the -th term on the right hand side, . We can bound this quantity from above as follows:
where the inequality follows from the triangle inequality (applied term by term), the first equality is by the definition of , the second equality is trivial, and the final equality uses the assumption that . The lemma follows by summing over , using the fact that the ’s form a partition of . ∎
Appendix B Efficiently Testing Monotone Distributions
Our main tool for testing monotone distributions is an oblivious decomposition of monotone distributions that is a variant of a construction of Birgé [Bir87b]. As we will see it enables us to reduce the problem of testing a monotone distribution to the problem of testing an arbitrary distribution over a much smaller domain. The decomposition result is given below:
There is a dual version of Theorem 5, asserting the existence of an “oblivious” partition for non-decreasing distributions (which is of course different from the “oblivious” partition for non-increasing distributions of Theorem 5); this will be useful later.
While our construction is essentially that of Birgé, we note that the version given in [Bir87b] is for non-increasing distributions over the continuous domain , and it is phrased rather differently. Adapting the arguments of [Bir87b] to our discrete setting of distributions over is not conceptually difficult but requires some care. For the sake of being self-contained we provide a self-contained proof of the discrete version, stated above, that we require in Appendix E.
B.2 Efficiently testing monotone distributions
Appendix C Efficiently Testing k𝑘k-modal Distributions
In this section we establish our main positive testing results for -modal distributions, the upper bounds stated in the final four rows of Table 1. The key to all these results is an algorithm Construct-Flat-Decomposition. We prove the following performance guarantee about this algorithm:
The following terminology will be useful: Let and be two partitions of into and intervals respectively. The common refinement of and is the partition of into intervals obtained from and in the obvious way, by taking all possible nonempty intervals of the form It is clear that is both a refinement of and of and that the number of intervals in is at most
The modifications required to obtain algorithms Test-Identity-Unknown-kmodal, -Estimate-Known-kmodal and -Estimate-Unknown-kmodal, and the analysis of these algorithms, are completely analogous to the modifications and analyses of Appendix B.2 and are omitted.
We present Construct-Flat-Decomposition followed by an intuitive explanation. Note that it employs a procedure Orientation, which uses no samples and is presented and analyzed in Section 4.2.
Roughly speaking, when Construct-Flat-Decomposition constructs a partition , it initially breaks up into two types of intervals. The first type are intervals that are “okay” to include in a flat decomposition, either because they have very little mass, or because they consist of a single point, or because they are close to uniform. The second type are intervals that are “not okay” to include in a flat decomposition – they have significant mass and are far from uniform – but the algorithm is able to ensure that almost all of these are monotone distributions with a known orientation. It then uses the oblivious decomposition of Theorem 5 to construct a flat decomposition of each such interval. (Note that it is crucial that the orientation is known in order to be able to use Theorem 5.)
In more detail, Construct-Flat-Decomposition works as follows. The algorithm first draws a batch of samples from and uses them to construct an estimate of the CDF of (this is straightforward using the DKW inequality). Using the algorithm partitions into a collection of disjoint intervals in the following way:
A small collection of the intervals are “negligible”; they collectively have total mass less than under . Each negligible interval will be an element of the partition
Some of the intervals are “heavy points”; these are intervals consisting of a single point that has mass under . Each heavy point will also be an element of the partition
The remaining intervals are “moderate” intervals, each of which has mass under .
C.2 Performance of Construct-Flat-Decomposition: Proof of Lemma 3.
The claimed sample bound is obvious from inspection of the algorithm, as the only step that draws any samples is Step 2. The bound on the number of intervals in the flat decomposition follows directly from the upper bounds on the number of heavy points, negligible intervals and moderate intervals shown below, using also Theorem 5. It remains to show that the output of the algorithm is a valid flat decomposition of . First, by the DKW inequality (Theorem 1) we have that with probability at least it is the case that
We make some preliminary observations about the weight that has on the intervals constructed in Steps 4 and 5. Since every atomic interval constructed in Step 4 has (except potentially the rightmost one), it follows that the number of atomic intervals constructed in Step 3 satisfies
We now establish bounds on the probability mass that assigns to the moderate intervals, heavy points, and negligible intervals that are constructed in Step 4. Using (3), each interval that is declared to be a moderate interval in Step 4(a) must satisfy
By virtue of the greedy process that is used to construct atomic intervals in Step 3, each point that is declared to be a heavy point in Step 4(b) must satisfy and thus using (3) again
Moreover, each interval that is declared to be a negligible interval must satisfy and thus using (3) again
It is clear that (the number of moderate intervals) and (the number of heavy points) are each at most Next we observe that the number of negligible intervals satisfies
This is because at the end of each negligible interval we have (observing that each negligible interval must be nonempty) that while . Since is -modal, there can be at most points satisfying this condition. Since each negligible interval satisfies we have that the total probability mass under of all the negligible intervals is at most
Thus far we have built a partition of into a collection of moderate intervals (which we denote ), a set of heavy points (which we denote ) and a set of negligible intervals (which we denote ). Let denote the set of those indices such that Orientation outputs in Step 6. The partition that Construct-Flat-Decomposition constructs consists of , , , and We can thus write as
Using Lemma 15 (proved in Appendix F) we can bound the total variation distance between and by
Since for every , this simplifies to
Recalling from (6) that for each negligible interval , and recalling that , the first summand in (9) is at most
Let be such that, for all , is monotone. Summing the above over all gives:
Given that is -modal, the cardinality of the set is at most . So we have the bound:
C.3 The Orientation algorithm.
The Orientation algorithm takes as input an explicit distribution of a distribution over and an interval Intuitively, it assumes that is close (in Kolmogorov distance) to a monotone distribution , and its goal is to determine the orientation of : it outputs either , or (the last of which means “close to uniform”). The algorithm is quite simple; it checks whether there exists an initial interval of on which ’s weight is significantly different from (the weight that the uniform distribution over assigns to ) and bases its output on this in the obvious way. A precise description of the algorithm (which uses no samples) is given below.
Orientation Inputs: explicit description of distribution over ; interval 1. If (i.e. for some ) then return “”, otherwise continue. 2. If there is an initial interval of that satisfies then halt and output “”. Otherwise, 3. If there is an initial interval of that satisfies then halt and output “”. Otherwise, 4. Output “”.
We proceed to analyze Orientation. We show that if is far from uniform then Orientation outputs the correct orientation for it. We also show that whenever Orientation does not output “”, whatever it outputs is the correct orientation of . For ease of readability, for the rest of this subsection we use the following notation:
Lemma 5. Let be a distribution over and let interval be such that is monotone. Suppose , and suppose that for every interval we have that
If is non-decreasing and is -far from the uniform distribution over , then Orientation outputs “”;
if Orientation outputs “” then is non-decreasing;
if is non-increasing and is -far from the uniform distribution over , then Orientation outputs “”;
if Orientation outputs “” then is non-increasing.
Let be any initial interval of We first establish the upper bound
as this will be useful for the rest of the proof. Using (10) we have
Now using the fact that and , we get that (12) is at least
So we have established the lower bound For the upper bound, similar reasoning gives
and so we have shown that as desired. Now we proceed to prove the lemma.
and thus Orientation outputs “” in Step 3 as claimed.
Now we turn to Part 2 of the lemma. Suppose that Orientation outputs “”. Then it must be the case that there is an initial interval of that satisfies By (11) we have that . But Observation 1 tells us that if were non-increasing then we would have ; so cannot be non-increasing, and therefore it must be non-decreasing.
Finally, Part 4 of the lemma follows from analogous arguments as Part 2.∎
Appendix D Proof of Proposition 6
We start by defining the transformation, and then prove the necessary lemmas to show that the transformation yields -modal distributions with the specified increase in support size, preserves distance between pairs, and has the property that samples from the transformed distributions can be simulated given access to samples from the original distributions.
The transformation proceeds in two phases. In the first phase, the input distribution is transformed into a related distribution with larger support; has the additional property that the ratio of the probabilities of consecutive domain elements is bounded. Intuitively the distribution corresponds to a “reduced distribution” from Section A. In the second phase, the distribution is transformed into the final -modal distribution . Both stages of the transformation consist of subdividing each element of the domain of the input distribution into a set of elements of the output distribution; in the first stage, the probabilities of each element of the set are chosen according to a geometric sequence, while in the second phase, all elements of each set are given equal probabilities.
We now define this two-phase transformation and prove Proposition 6.
Fix and a distribution over such that for all We define the distribution in two steps. Let be the distribution on support with that is defined by The distribution has support , and for and it assigns probability to domain element
It is convenient for us to view the operator as giving an output in , so that “” equals
Given and access to independent samples from distribution , one can generate independent samples from and from
To generate a sample according to one simply takes a sample and then draws according to the distribution as defined in Definition 2 (note that this draw according to only involves and ). We then output the value It follows immediately from the above definition that the distribution of the output value is
and thus is indeed 0-modal since it is monotone non-increasing. For the above arguments apply to each of the equally-sized contiguous regions of the support, so there are modes, namely the local maxima occurring at the right endpoint of each region, and the local minima occurring at the left endpoint of each region. ∎
For any distributions with support , and any we have that
Both equalities follow immediately from the fact that the transformations of Definitions 2 and 3 partition each element of the input distribution in a manner that is oblivious to the probabilities. To illustrate, letting and letting be as in Definition 2, we have the following:
If has support then for any the distribution is supported on , where is at most .
The support of is Letting and and defining and we have that for all . Additionally, , since all and thus the ceiling operation can increase the value of by at most . Putting these two observations together, we have
For any we have that the support of is at most
The proof is now a simple matter of assembling the above parts. Given a distribution over pairs of distributions of support as specified in the proposition statement, the distribution is defined via the process of taking then applying the transformation of Definitions 2 and 3 with and to yield a pair . We claim that this satisfies all the properties claimed in the proposition statement. Specifically, Lemmas 12 and 14, respectively, ensure that every distribution in the support of has at most modes, and has support size at most Additionally, Lemma 13 guarantees that the transformation preserves distance, namely, for two distributions with support we have Finally, Lemma 11 guarantees that, given independent samples from , one can simulate drawing independent samples according to Assuming for the sake of contradiction that one had an algorithm that could distinguish whether is less than versus greater than with the desired probability given samples, one could take samples from distributions , simulate having drawn them from and and then run the hypothesized tester algorithm on those samples, and output the answer, which will be the same for as for This contradicts the assumption that no algorithm with these success parameters exists for ∎
Appendix E Proof of Theorem 5
We first note that we can assume that . Otherwise, the decomposition of into singleton intervals , , trivially satisfies the statement of the theorem. Indeed, in this case we have that and .
Let be any non-increasing distribution over . We will now show that the above described decomposition satisfies
where denotes the (sub-distribution) restriction of over .
Let with . Then we have that
Recall that is by definition constant within each and in particular equal to . Also recall that is non-increasing, hence . Therefore, we can bound from above the variation distance within as follows
To bound the above quantity we analyze summands with and with separately.
Consider the short intervals and cluster them into groups according to their length; that is, a group contains all intervals in of the same length. We denote by the th group, which by definition contains all intervals in of length ; note that these intervals are consecutive. The cardinality of a group (denoted by ) is the number of intervals it contains; the length of a group is the number of elements it contains (i.e. the sum of the lengths of the intervals it contains).
Note that (the group containing all singleton intervals) has (this follows from the assumption that ). Hence has length . Let be the maximum length of any short interval in . It is easy to verify that each group for is nonempty, and that for all , we have , which implies that the length of is .
To bound the contribution to (13) from the short intervals, we consider the corresponding sum for each group, and use the fact that makes no contribution to the error. In particular, the contribution of the short intervals is
where (resp. ) is the probability mass of the leftmost (resp. rightmost) point in . Given that is non-increasing, we have that . Therefore, we can upper bound (14) by
Now note that , since has length (total number of elements) and is non-increasing. Similarly, for , we have that , since has length . Therefore, the above quantity can be upper bounded by
We consider two cases: The first case is that . In this case, we are done because the above expression (15) is . The second case is that (we note in passing that in this case the total number of elements in all short intervals is , which means that we must have ). In this case we bound the contribution of the long intervals using the same argument as Birgé. In particular, the contribution of the long intervals is
Given that and , it follows that the second summand in (16) is at most . Therefore, the total variation distance between and is at most (15) + (16), i.e.
Finally, note that and . (The latter holds because is the probability mass of the rightmost point in ; recall that has length at least and is decreasing.) This implies that (17) is at most , and this completes the proof of Theorem 5.
Appendix F Bounding variation distance
As noted above, our tester will work by decomposing the interval into sub-intervals. The following lemma will be useful for us; it bounds the variation distance between two distributions and in terms of how and behave on the sub-intervals in such a decomposition.
Let be partitioned into . Let be two distributions over . Then
We assume that and prove (19) under this assumption. This gives the bound in general since if we have
where the first inequality is by (19). The triangle inequality gives us
Summing this over all we get
We can rewrite the first term on the RHS as
so to prove the desired bound it suffices to show that
So we indeed have (20) as required, and the lemma holds. ∎