Kolmogorov-Smirnov distance and discrepancies versus Wasserstein distances
Abstract
We establish inequalities that compare the -Wasserstein distance to distances which are built as suprema of box measures. More precisely, when the measures are supported on , we obtain sharp upper-bounds of the -Wasserstein distance by (powers of) the (uniform) discrepancy. As an application, we retrieve the Proïnov Theorem. When the two distributions are supported by the whole , their -Wasserstein distance is upper bounded by the product of a (power of) their Kolmogorov–Smirnov (–) distance with the sum of their -moments. Reverse inequalities are established when one of the two distributions has a density, depending on its -integrability with respect to the Lebesgue measure for some .
Mathematics Subject Classification: Primary: 60E15, 60F25 Secondary 65C05, 11K38, 65D32.
Keywords: Wasserstein distance ; Kolmogorov-Smirnov distance ; star discrepancy ; uniform discrepancy.
1 Introduction
For a given norm on , the -Wasserstein distance is defined when by: for all , , the space of probability distributions on (Borel sets of ) having (at least) -finite moments,
where and denote the distributions of and respectively. In the sequel, we will only write (and assume throughout the paper that ).
It is well-known that metrizes weak convergence with convergence of the -moments on (see [Vil09] for details). The -Wasserstein distance is now widely used in probabilistic and statistical applications. In statistics, this distance usually produces a robust alternative to Kullback-Leibler divergence taking into account the underlying metric structure. In probability theory, the Wasserstein distance is also widely used for quantifying the rate of convergence to equilibrium or analyzing the robustness of stochastic algorithms.
In this paper we establish inequalities that compare the -Wasserstein distance to the Kolmogorov-Smirnov (–) distance and its avatars on the state space , usually called discrepancies: for some probability distributions and on , we denote by the distance defined by
where . When both distributions of interest are supported by unit hypercubes , the – distance is called the star discrepancy (which explains our notation). We will also consider the uniform discrepancy between and defined by
where when for every and otherwise. Discrepancy is an important setting, closely related with Quasi-Monte Carlo method (and optimal quantization theory, see Section 3.3 of [LP23]) where the empirical measure(s) associated to an -tuple or a sequence of -valued vectors is used to approximate the uniform distribution in order to replace sequences of pseudo-random numbers for the computation of integrals or expectations in Numerical Probability (see [Nie92, Pag26]). In these inequalities, special attention is paid to the constant to challenge specific results from QMC theory like Proïnov’s Theorem when one of the two distributions is the empirical measure associated to an -tuple. As well, –-distance, is certainly connected with the non parametric goodness of fit Kolmogorov-Smirnov test which is devoted to testing equality between two distributions, one being known or not (see e.g. [LR21, Sec 16.2]).
The objective is thus to provide precise estimates between and or . Before stating our results, let us remark that the topologies induced by these distances are slightly different. While is a metric for the weak convergence in with convergence of -moments, and apply without conditions on the moments but their induced topology is finer than the weak convergence topology as illustrated by the following counterexample: if
| (1.1) |
then weakly converges toward but for every . Consequently, controlling discrepancies by Wasserstein distances will require an absolute continuity assumption on one of the two distributions under consideration. Conversely, we will need some additional moment assumptions when controlling the Wasserstein distance by or .
Contributions and plan of the paper. We first focus on the control of the Wasserstein distance by discrepancies (or –-distance). For this part, we will rely on the inspiring papers by [DSS13] and [FG15] which establish universal upper-bounds for the Wasserstein distances based on a telescopic splitting of the distributions. Section 2 is devoted to upper-bounding the Wasserstein distance by the uniform discrepancy for -supported distributions with a special attention paid to the values of the semi-universal constants depending on and the dimension . In view of the optimization of the inequalities, we provide a variant of the estimates of [DSS13] and [FG15] (see Inequality (2.6) of Proposition 2.2) based on a slight modification of the coupling scheme proposed in [DSS13]. These estimates allow us to state our first estimate in Theorem 2.3 for -supported distributions. At first reading, it can be summed up as follows: for a given norm on and a given , a constant (which is made explicit in the result) exists such that
Owing to an optimization strategy, the constant is then refined in Theorem 2.6 in the special case . Extending to with the help of the standard inequality (see (2.2) for background), this result allows to retrieve a celebrated inequality from Quasi-Monte-Carlo theory with some slightly larger but more universal constants (see Section 2.4 and Remark 2.2 for details) a.k.a. Proïnov’s theorem (see [Pro88]).
In Section 3.1 , we extend the bounds to the whole space and obtain the following typical bound when and have finite moments or order (see Theorem 3.2 for a precise setting)
With the inequality (which also holds on ), the above bound also holds with respect to the –-distance .
Finally, we consider the reverse problem in Section 3.2, : bounding or by the Wasserstein distance. In Theorem 3.4, we show that if or has a density w.r.t. the Lebesgue measure on , the following type of result holds:
where depends on the moments of and if is bounded. This bounded case has been already proved in [GL23] but with non-explicit constants. This reverse inequality is only written for -distance since it is based on the dual Kantorovich-Rubinstein representation but certainly extends to since .
2 Discrepancies for -supported distributions
As mentioned in the introduction, we first consider -supported distributions and will investigate the more general case of non-compactly supported probability measures in Section 3.
2.1 Definitions, notation and a technical lemma
We define the partial order on as follows: for , , ,
We can define the closed and semi-open boxes as follows: when ,
and otherwise (i.e. if ), .
Note that is also empty whenever for some index .
When and are two probability measures on , the uniform and star discrepancy between and (introduced in the first section) take the form:
and
It is classical background (see e.g [Nie92]) that both and are -valued strongly equivalent distances on the set of probability measures on since
| (2.2) |
(see e.g. [Nie92]) but whose induced topology is not that of weak convergence of distributions on , as emphasized in (1.1). However if the generalized c.d.f of defined by is continuous then
| (2.3) |
The continuity of is equivalent to the fact that, if denotes the canonical basis of
where . Note that for convenience we may extend any measure on into a measure on by setting .
The particular case where has a continuous c.d.f., especially when , and is the empirical measure of a random or deterministic -tuple whose components are -valued, has been extensively investigated since the 1950s motivated by the so-called Quasi-Monte Carlo method (QMC, see [KN74, Nie92]).
This suggests and justifies to compare in a general framework discrepancies and Wasserstein distances , in a strong sense. To be more precise we will upper-bound these Wasserstein distances without any a priori restrictions on the distributions beyond the existence of finite -moments whereas, for the reverse bounds, we will assume that (at least) one of the two distributions is absolutely continuous (w.r.t. the Lebesgue measure) to avoid the above counterexample (1.1).
First we need the following technical lemma whose proof is postponed to Appendix A.
Lemma 2.1.
Let and two probability measures on . Then
If furthermore, , then
Without the additional assumption of , we have:
where is defined by
2.2 Bounding Wasserstein distances by the uniform discrepancy
To achieve our first goal, we will rely on the following bounds for the Wasserstein distances: (2.4) is mainly adapted from Lemma 5 in [FG15] whereas (2.6) also uses ideas from former results contained in [DSS13].
Proposition 2.2 (Existing upper-bound and a variant).
Let and two probability measures on be such that . Then,
| (2.4) |
where depends on , and the norm on and
| (2.5) |
with . Note that . We also have for any ,
| (2.6) |
When and are probability measures on , then (2.4) still holds with the family of , where is a partition of which only differs from for the semi-open boxes with a multi-index for which there exists such that . When such is the case, the semi-open box is replaced11 1 More simply, when a semi-open box of has one or several faces which are included in the faces of , we add them to define the elements of . by
Proof.
Step 0. Inequality (2.4) is a straightforward adaptation of [FG15, Lemma 5] written for the canonical Euclidean norm in the set . For Inequality (2.6), one needs to slightly modify [DSS13, Lemma 2] by introducing a sequence of partitions built as follows:
- •
For , ,
- •
For and a given integer , is deduced from by dividing each element of into new elements. More precisely,
(2.7)
We have . Since for any , is built by partitioning each set of , the proof of [DSS13, Lemma 2] still works. More precisely, noting that the diameter of an element of is when and when .
Step 1. First assume that and satisfy the condition
with the convention . Then, a careful reading of the proof of [DSS13, Lemma 2] leads to (where denotes a stopping time defined in the proof of this lemma):
At this stage, we use the argument from [FG15, Lemma 5]: noting that
and setting
we get
where, in the last line, we used that for any . The result follows by letting go to .
Step 2. To get rid of the above weak absolute continuity assumption on and , we introduce for , . Then
It is clear that converges in total variation to so that the finite sum in the right hand side of the above inequality converges to that of (2.6). On the other hand, as where , and , independent of , has distribution , one checks that
Hence as which establishes (2.6).
From Proposition 2.2, we can deduce the following upper-bounds of the -Wasserstein distance by the uniform discrepancy.
Theorem 2.3 (Bounding Wasserstein distance by the uniform discrepancy).
Let and two probability measures on . Then,
- •
If then
If furthermore, , i.e. , then
- •
If then
- •
If then
Proof.
We first prove the result when and are supported by .
Step 1: . In this case, the elements of (defined by (2.5)) are all semi-open boxes. Hence, we deduce using Lemma 2.1 that, for every ,
| (2.8) |
Hence by (2.4) and (2.6), for any ,
| (2.9) |
Note that for the case , the above inequality is true with the convention (since the inequality is always true).
Case 1 . We first apply (2.9) with and obtain:
| (2.10) |
Second, we apply (2.9) with where
One can check that
since . As a consequence, applying (2.9) with , we get
| (2.11) |
with
For a given , one can check that
| (2.12) |
Plugging these inequalities into (2.11), this leads to:
One can check that
This provides the second announced estimate.
Case 2 . Here, (2.9) again applied with yields
Using that and (2.12) (applied with ), we obtain
The estimate follows.
Case 3 (). By (2.9) applied with , we obtain similarly to (2.11)
By the second inequality of (2.12) and the one below (applied with ),
we deduce that
Step 2 (General case). Here, we have to use Proposition 2.2 and thus to consider the elements of . These elements take the form defined in Lemma 2.1. Hence, from this result and from (2.4) and (2.6), we deduce that (2.9) still holds true with . The sequel of the above proof being entirely based on this inequality, we deduce that the conclusions also hold true in the general case. ∎
When , the above bounds are sub-optimal due to the following proposition (where the norm is the absolute value).
Proposition 2.4 (One dimensional setting for ).
If , then
Proof.
This relies on the Koksma-Hlawka inequality, which reads as follows in one dimension in the version established in [BL94] or [Pag26]. For every function with finite variation in the measure sense, meaning that there is a signed measure on such that and , one has
where stands for the total variation measure of . In one dimension, a Lipschitz continuous function has finite variation in the above sense since it is - differentiable with a bounded derivative satisfying
so that and . Then and . Consequently for every Lipschitz function
The Monge-Kantorovich representation of the -distance
yields the announced result. ∎
This result suggests that the -term in the upper-bound obtained in Theorem 2.3 for the case is possibly superfluous. At least such is the case when . Proïnov’s Theorem in the following section also leads in favor of the same direction. An extension of this result to general – distance based on another method is proposed in Section 3.1 .
In order to partially synthesize Proposition 2.2, we derive the following corollary.
Corollary 2.5.
If ( and ) or (), there exists a real constant depending on , such that, for every ,
Toward a Law of Iterated Logarithm (Monte Carlo simulation). Let be an i.i.d. sequence of uniformly distributed vectors on . Then Chung’s Law of Iterated Logarithm (see [Chu49, Kie61]) for the star discrepancy reads
Combining this result with that of Corollary 2.5 yields that, if ( and ) or (), then there exists a real constant only depending on , such that, under the assumptions of this corollary
where is a finite real constant from Corollary 2.5.
2.3 A refinement when and
In view of the connection with Proïnov’s Theorem recalled in Section 2.4, we propose a refined result for the -distance when the dimension is greater than . By an optimization strategy on the choice of defined in Proposition 2.2, we get the sharper upper-bound with an explicit smaller constant.
Theorem 2.6.
Let and two probability measures on . Then, for any integer ,
In particular,
Remark 2.1.
One can check that .
The optimization of proposed in the proof below is not completely natural in view of the proof of Theorem 2.3 where the integer is precisely defined to optimize the bounds. However, the definition of involves an upper integer part which may have bad effects on the constants.
Such a strategy may also be applied in the other cases which may slightly improve the results at the price of technicalities that we considered useless for the paper.
Proof.
We only treat the case where . The extension to the general case can be done exactly as in the proof of Theorem 2.3. We start from (2.9) when , namely
We introduce a parameter and define by
Note that when . In order to ensure that , we first assume that
| (2.13) |
In this case, following the strategy of the proof of Theorem 2.3 when with (instead of ), we get
This suggests to minimize the function defined by:
One checks that this functions attains its minimum at the point
The result follows if satisfies the condition (2.13). Otherwise,
and using that , we get
The previous bound is thus still available in this case. ∎
2.4 Connections with QMC & MC methods
The discrepancy is mostly used in the theory of uniformly distributed sequences and their applications to Quasi-Monte Carlo simulation (QMC). A distribution being fixed on – mostly the uniform distribution – it is commonly used to measure the way the empirical measure induced by a -valued -tuple approximates the original measure . To be more precise one considers
or its counterpart defined accordingly w.r.t. . For an introduction to QMC methods in Numerical Probability, we refer among others to [Nie92] or [Pag26]. One important theoretical result in this field is Proïnov’s theorem (see [Pro88]) which can be formulated as follows.
Proposition 2.7 (Proïnov Theorem (1984)).
Let , and let -valued -tuple . Then there exists a real constant such that
where denotes the Wasserstein distance w.r.t. the -norm on . Moreover when , then and both error moduli attain their minimum, being fixed, at with a common resulting value .
Remark 2.2.
The definition of the star discrepancy in [Pro88] is slightly different from that of , namely , but this modulus turns out to be lower or equal to using arguments similar to those used to prove Lemma 2.1.
Since , we can compare the improved general constant from Theorem 2.6 the (bounds known on) constant appearing in Proïnov’s Theorem (which holds in a more restricted framework), having in mind that for the -norm. Let us recall that this constant is given by
Numerical computations for medium values of are as follows: if , , if , , if , , if , , if , , if , , if , , if , , if , , if , , if , , if , . if , , if , .
Our constants are thus slightly larger than those of the original theorem (which lie into ) but it is worth noting that our bounds are universal: they do not hold only for the uniform distribution but also for any distribution on (and any empirical measure).
Toward a Law of Iterated Logarithm. Let be an i.i.d. sequence of uniformly distributed vectors on . Then Chung’s Law of Iterated Logarithm (see [Chu49]) for the star discrepancy reads
Combining this results with that of Corollary 2.5 yields that, if and or (), then there exists a real constant only depending on , such that, under the assumptions of this corollary
where is a finite real constant from Corollary 2.5.
2.5 Bounding the star discrepancy by the -Wasserstein distance
We refer to Section 3.2 devoted to Kolmogorov-Smirnov distance between distributions with possibly unbounded supports. Note that these bounds require that at least one of the two distributions under consideration is absolutely continuous. The obtained bound cannot be improved in the case of -supported distributions, at least in a reasonably general framework.
3 Kolmogorov-Smirnov distance vs -Wasserstein distance on
3.1 Bounding the -Wasserstein distance by the – distance
We consider now probability distributions on the whole space and we straightforwardly update the definitions of the star and uniform discrepancies. The first one is then also known as the Kolmogorov-Smirnov distance (– distance). This section allows to treat the -supported distributions but with worse constants where the – distance is commonly known as (star) discrepancy.
Definition 3.1.
Let and two probability measures on . We define the Kolmogorov -Smirnov distance, denoted –, by
where, by an abuse of notation, we also denote . This distance can be simply seen as star discrepancy defined in a more general setting. We also define the uniform discrepancy between and by
One easily checks like in Lemma 2.1 that, with these definitions,
| (3.14) |
since and that the bounds (2.2)
| (3.15) |
between these quantities still hold.
The following Proposition, which is the combination of Lemmas 5 and 6 from [FG15], is the key result on which we rely in this section. We set:
Proposition 3.1.
Let and let . There exists a positive constant such that for every pair ,
| (3.16) |
where , and, for every ,
Note that and (with obvious notation) .
Theorem 3.2.
Let and , two probability measures with finite -moments. There exist real constants such that
| (3.17) |
where .
Remarks. The above result can be partially summed up into: if and then
This is in line with what was obtained for -supported distributions (for which ).
If our approach fails to provide a direct bound. However , for every , one has
| (3.18) |
However, in one dimension, a specific approach is possible based on the representation formula (see e.g. [Vil03])
where and denote the cumulative distribution functions of and respectively. Then, for every ,
| (3.19) |
where and are and -distributed respectively. If and both have finite moments of order , one has
which yields after an obvious optimization
If and have exponential moments in the sense that for some , then it follows from (3.19) that,
Setting yields
If , are (uniform) empirical measures of the form here . Then
Proof. Step 1. Let . It is clear that is a semi-open box so that, for every , either for semi-open boxes or, for the others
owing to (3.14).
If , .
Consequently, if we set
one has
| (3.20) |
where we used the triangle inequality to establish the left bound in the min of the first line.
Step 2 (Technical lemma).
Lemma 3.3.
Let . Let be fixed and let be defined by
The function satisfies the following upper-bounds depending on and the dimension where denotes a positive constant only depending on , , that may vary from line to line.
- •
If , then
- •
If then,
- •
If , then
Proof.
If , one has
If there are two sub-cases. If , then . Otherwise so that and
If either and . Otherwise defined as above is nonnegative and
∎
Step 3. It follows from (3.16), Step 1 and the definition of the function that
Now we inspect the usual three cases. The letters and denote positive constants depending only on its indices that may vary from line to line.
If then and one easily checks using that that
3.2 Bounding the –-distance by the -Wasserstein distance
Let us denote by the -norm and let us define, for every and , . The key property of this section is the Monge-Kantorovich representation of the - Wasserstein distance, namely
| (3.21) |
where .
Having in mind that the topology induced by the – distance is finer than that induced by , as emphasized by the counterexample (see (1.1)), we need an additional assumption on one of the two probability measures under consideration to bound the first distance by the second one. Thus, we will assume in the proposition below that at least one of the two measures is absolutely continuous with respect to the Lebesgue measure.
Theorem 3.4 (Bounding star discrepancy discrepancy by -Wasserstein distance).
Let be an absolutely continuous distribution on with density for some and finite first moment. Then, for every probability distribution on with finite first moment,
| (3.22) |
with for . If is bounded, one has:
Remark. Note the case of a bounded density corresponds to and is consistent with the general formula for . Also note that this constant goes to as .
Proof.
Let , let and, for every , and (with the convention on boxes). The functions and are clearly -Lipschitz for the -norm. It is clear that .
Let us compute for every . First, note that he continuous convex function attains its minimum on the boundary of the box namely
First note that hence is nonempty. If not included in , let and let ), . The function is nonnegative, continuous and convex and there exists such that for . Hence the right derivative by definition of . As is convex, it is also non-decreasing. Noting that implies that is identically . Then so that which is impossible since does not belong to . Hence, one easily checks that
Then
| (3.23) |
owing to (3.21). Now it follows from the expression for that, for every ,
Assume . It follows from Hölder inequality that
| (3.24) |
Now
Inserting this in (3.24) and then in (3.23) yields
one shows likewise using that satisfies the same inequality since . Consequently, for every ,
with . One concludes by setting at which the above function of attains its minimum. The case follows likewise. ∎
Remarks. Assume . Based on (3.17) and (3.22) with , with for some , one easily deduces that for and every small enough
where stands for “lower up to a constant” (possibly depending on , , ). This suggests that this upper-bound is not sharp, having in mind that if and , then, for every ,
In [GL23], a similar upper bound is established for more general “smooth Wasserstein” distances defined by
where is the space of differentiable functions with -Lipschitz partial derivatives or order in the case where the distribution has a bounded density. The above appears as an extension of the setting to and .
Fundings. The first author benefited for this research of the support of the “Chaire Risques Financiers”, Fondation du Risque. The second author thanks the Henri Lebesgue Center (ANR-11-LABX-0020-01) and the ANR project RAWABRANCH (ANR-23-CE40-0008).
References
- [BL94] Nicolas Bouleau and Dominique Lépingle. Numerical methods for stochastic processes. Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics. John Wiley & Sons, Inc., New York, 1994. A Wiley-Interscience Publication.
- [Chu49] Kai-Lai Chung. An estimate concerning the Kolmogoroff limit distribution. Trans. Amer. Math. Soc., 67:36–50, 1949.
- [DSS13] Steffen Dereich, Michael Scheutzow, and Reik Schottstedt. Constructive quantization: approximation by empirical measures. Ann. Inst. Henri Poincaré Probab. Stat., 49(4):1183–1203, 2013.
- [FG15] Nicolas Fournier and Arnaud Guillin. On the rate of convergence in Wasserstein distance of the empirical measure. Probab. Theory Relat. Fields, 162(3-4):707–738, 2015.
- [GL23] Robert E. Gaunt and Siqi Li. Bounding kolmogorov distances through wasserstein and related integral probability metrics. Journal of Mathematical Analysis and Applications, 522(1):126985, 2023.
- [Kie61] Jack C. Kiefer. On large deviations of the empiric D. F. of vector chance variables and a law of the iterated logarithm. Pacific J. Math., 11:649–660, 1961.
- [KN74] Lauwerens Kuipers and Harald Niederreiter. Uniform distribution of sequences. Pure and Applied Mathematics. Wiley-Interscience [John Wiley & Sons], New York-London-Sydney, 1974.
- [LP23] Harald Luschgy and Gilles Pagès. Marginal and functional quantization of stochastic processes, volume 105 of Probability Theory and Stochastic Modelling. Springer, Cham, 2023.
- [LR21] E. L. Lehmann and Joseph P. Romano. Testing statistical hypotheses. Springer Texts in Statistics. Springer, Cham, fourth edition, [2021] ©2021.
- [Nie92] Harald Niederreiter. Random number generation and quasi-Monte Carlo methods, volume 63 of CBMS-NSF Regional Conference Series in Applied Mathematics. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 1992.
- [Pag26] Gilles Pagès. Numerical probability. An introduction with applications to finance. Universitext. Cham: Springer, 2nd edition edition, 2026.
- [Pro88] Petko D. Proïnov. Discrepancy and integration of continuous functions. J. Approx. Theory, 52(2):121–131, 1988.
- [Vil03] Cédric Villani. Topics in optimal transportation, volume 58 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, 2003.
- [Vil09] Cédric Villani. Optimal transport, volume 338 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 2009. Old and new.
Appendix A Proof of Lemma 2.1.
Let , , and let such that and for every such that (if for some then so that ). We set . It is clear that for the inclusion so that . Idem for . Hence
from which we derive the announced statement.
Let , , and let so that and for every, such that and if . Then
Then . The same for . Consequently
Combined with Claim this completes the proof.
(c) With the notations of , one checks that the sequence decreases to so that, with the same monotone convergence argument as in , one obtains that
For the reverse inequality, we adapt by assuming that when . In this case, the sequence and the sequel is identical to .