to calculate the integral of a Riemann-integrable function. This leads to the following criterion for an equidistributed sequence: Suppose (s1, s2, s3, ...) is a sequence contained in the interval [a, b]. Then the following conditions are equivalent: The sequence is equidistributed on [a, b]. For every Riemann-integrable (complex-valued) function , the following limit holds: {| class="toccolours collapsible collapsed" width="90%" style="text-align:left" !Proof |- |First note that the definition of an equidistributed sequence is equivalent to the integral criterion whenever f is the indicator function of an interval: If f = 1[c, d], then the left hand side is the proportion of points of the sequence falling in the interval [c, d], and the right hand side is exactly This means 2 ⇒ 1 (since indicator functions are Riemann-integrable), and 1 ⇒ 2 for f being an indicator function of an interval. It remains to assume that the integral criterion holds for indicator functions and prove that it holds for general Riemann-integrable functions as well. Note that both sides of the integral criterion equation are linear in f, and therefore the criterion holds for linear combinations of interval indicators, that is, step functions. To show it holds for f being a general Riemann-integrable function, first assume f is real-valued. Then by using Darboux's definition of the integral, we have for every ε > 0 two step functions f1 and f2 such that f1 ≤ f ≤ f2 and Notice that: By subtracting, we see that the limit superior and limit inferior of differ by at most ε. Since ε is arbitrary, we have the existence of the limit, and by Darboux's definition of the integral, it is the correct limit. Finally, for complex-valued Riemann-integrable functions, the result follows again from linearity, and from the fact that every such function can be written as f = u + vi, where u, v are real-valued and Riemann-integrable. ∎ |} This criterion leads to the idea of Monte-Carlo integration, where integrals are computed by sampling the function over a sequence of random variables equidistributed in the interval. It is not possible to generalize the integral criterion to a class of functions bigger than just the Riemann-integrable ones. For example, if the Lebesgue integral is considered and f is taken to be in L1, then this criterion fails. As a counterexample, take f to be the indicator function of some equidistributed sequence. Then in the