1. Introduction
What could the locution taking at random possibly mean? In its most general sense, this would indicate that the drawing of an outcome out of a set is made according to any arbitrary (but legitimate) probability measure assigned on the subsets of , and then that the usual precepts of the probability theory are followed by the result that different probabilities are normally allotted to distinct subsets of . Traditionally, however, the meaning of the said locution is more circumscribed and stands rather for assuming that there is no reason to think that there are preferred outcomes , these instead being supposed to be equally likely. This is the meaning that we are interested in within this paper, or—if this notion is not exactly applicable—an asymptotic version of it in some acceptable limiting sense.
It is well known that for the sets of real numbers, this kind of randomness is enforced either by sheer equiprobability (on the finite sets) or by distribution uniformity (on the bounded, Lebesgue measurable, uncountable sets). On the other hand, infinite, countable sets and unbounded, uncountable sets are both excluded from these egalitarian probability attributions because their elements can be made neither equiprobable (with a non-vanishing probability, in the countable case), nor uniformly distributed (with a non-vanishing probability density, in the uncountable case). On these occasions, it is therefore advisable to start with some proper (neither equiprobable, nor uniform) probability distribution, and then to inquire if and how this can be made ever closer—in a suitable, approximate sense —either to an equiprobable distributionor to an uniform one. We will then, respectively, speak of asymptotic equiprobability and asymptotic uniformity.
The focus of the present inquiry, as will be elucidated in
Section 2, are the rational numbers that—even in a bounded interval—constitute an infinite, countable set, with a few relevant, additional peculiarities due to them also being dense everywhere among the real numbers. In
Section 3, we provide a procedure to attribute non-vanishing probabilities to
every rational number
in the interval
.
Section 4 is instead devoted to the aftermath of supposing conditionally equiprobable numerators
n, and then
Section 5 shows under which hypotheses our distributions can give rise to an asymptotic equiprobability of the rationals in
such that—without pretending to have an absolutely continuous (
ac) uniform distribution on
—the probability allotted to a single
vanishes in the limit, while that of the infinite subset of rationals falling in an interval
goes to
. Several examples of denominator distributions are explained in
Section 6, giving rise to a few closed formulas. Finally, in
Section 7, some concluding remarks are added, offering a glimpse into the open problem of sequencing all the rational numbers in
.
2. Probability on Rational Numbers
Rational numbers are famously countable, and hence they can be put in a sequence. Since they are a dense subset of the real numbers, every rational number is a cluster point, and thus no sequence encompassing all of them can ever converge, not to say be monotone. In any case, their countability certainly allows the allotment of discrete distributions with non-vanishing probabilities to every rational number; since they are infinite, however, they can never be exactly equiprobable. We will outline in the forthcoming sections a simple procedure to obtain distributions on all the rationals in , a set that we will shortly denote as , and we will investigate if and how they can be considered asymptotically equiprobable. We will refrain, for the time being, from extending these considerations to the whole of only because in our opinion, this would not add particular insight into the discussion at the present stage of the inquiry.
It is, however, advisable to remember right away that the distribution of a
rv (random variable)
Q taking values in
must anyhow be of a discrete type, allotting (possibly non-vanishing) probabilities to the individual rational numbers
: conceivable continuous set functions—namely with continuous, albeit perhaps not absolutely continuous,
cdf (cumulative distribution function)—would turn out not to be countably additive, and would hence not qualify as measures, not to say as probability distributions. Every continuous
cdf for
Q would indeed entail that, at the same time,
, and
, while
is apparently the countable union of the disjoint, negligible sets
, which is in plain conflict with the countable additivity. This in particular also rules out, for the numbers in
, the possibility of being in some sense
uniformly distributed (an imaginable surrogate of equiprobability suggested by the cited density of the rationals) for the numbers in
. This property would, in fact, require a
cdf of the uniform type for
Q:
which is apparently continuous, and would hence attribute probability 0 to every single
q, but probability 1 to
.
We would like to stress, moreover, that the problem focused on in the present paper is not how to realistically produce rational numbers that are possibly equiprobable at random; this would be performed trivially, for instance, just by taking random, uniformly distributed real numbers and then truncating them to a prefixed number n of decimal digits, as always conducted in practice in every computer simulation of random numbers in . It is indeed apparent that in so doing, we would shrink to a finite set of rational numbers (they would be exactly ) that could always be made exactly equiprobable, failing on the other hand to allot a non-vanishing probability to the remaining, overwhelmingly more numerous elements of . The aim of our inquiry is instead to find a sensible way to attribute (non-vanishing and possibly not too different from each other) probabilities to every rational number in . Their practical simulation is not considered our main purpose here, but just as an eventual side effect of this allocation.
Remark that one could be lured to think that a way around the previous snag could consist of again drawing again uniformly distributed real numbers, yet truncating the decimal digits to some random number N taking arbitrary, finite but unbounded integer values. Even in this way, however, not every rational number would have a chance to be produced; the said procedure would indeed a priori exclude all the (infinitely many) rational numbers with an infinite, periodic decimal representation, for instance, and so on. In light of this preliminary scrutiny, the best way to tackle the task of laying down a probability on seems then to be to exploit the fractional representation of every rational number by attributing some suitable joint distribution to its numerators and denominators, considered here as rvs with integer values.
3. Distributions on
Using the well-known diagram used to show how rational numbers are countable, we will explore two dependent
rvs,
M and
N, with integer values
acting, respectively, as denominator and numerator of the random rational number
. Therefore,
Q will have the values
arrayed in a triangular scheme as in
Table 1.
However, this method causes every rational number
q to appear infinitely many times because of the existence of reducible fractions. For example, using the usual notation for
repeating decimals, we have
to avoid repetitions, the rational numbers in
should be listed with blanks as in
Table 2. However, this table is not suitable for assigning probabilities directly to its elements, as there is no simple way to give them a sequential index (for example, which one is the 1000th element?). This is because the numbers
of different rationals in each row with the same irreducible denominator
m form a rather irregular sequence, as we will briefly explain in
Section 7. Therefore, it is better to use the complete
Table 1 and introduce a joint distribution of
N and
M first.
For a rational number
q, we adopt the notation
to indicate that
is the irreducible representation of
q, namely that
n and
m are co-primes. For instance, in the previous examples:
To account for the repeated entries in
Table 1, we will allot the probability (the notation used in this paper follows the usual one of probability textbooks.) to every rational
.
This apparently also defines the
cdf of
Q as (here, of course,
)
and the probability of
Q falling in
, for
real numbers, as:
Notice that the conditional
cdf of
N can also be given as
where
is the Heaviside function, while for every real number
x, the symbol
denotes the
floor of
x, namely the greatest integer less than or equal to
x. Therefore, Equations (
2) and (
3) can be written in the following form:
where the Kronecker delta considers the circumstance that when
, the expression becomes vanishing, resulting in
. Additionally, we possess expressions for both the expectations and the characteristic function:
where we have also introduced the shorthand notation
The specific joint distributions of variables N and M can be chosen in several ways and we survey a few particular cases in the next sections.
4. Equiprobable Numerators
Firstly, we suppose that for a given denominator
, the
possible values of the numerator
are equiprobable in the sense that
We then have (see [
1]
)
and hence, from (
7) and (
8),
As for the distribution, with
co-primes and
, from (
1), we have
which is independent of
n and relies solely on the value of the irreducible denominator
m. Furthermore, the characteristic Function (
9) reads
while for the
cdf (
5), we have, from (
4),
and the probability (
6) with
becomes
It is clear that, with the exception of the expected value , all these quantities are influenced by the selection of the denominator distribution. However, we will demonstrate in the subsequent section that, given reasonable conditions on the denominators M, the distribution of Q can indeed be made arbitrarily close to, though not precisely coincident with, a uniform distribution on the interval . This behavior is what we will refer to as asymptotic equiprobability.
5. Asymptotic Equiprobability
Considering the equiprobable numerators introduced in the preceding section, where we denote the distribution of
M as
and the supremum of all its values as
s, let us now consider a sequence of denominators
with corresponding distributions
. Furthermore, let
approach zero as
k tends to infinity in a manner such that
To put it differently, we examine a sequence of distributions that progressively become flatter and approach zero uniformly, consequently leading to increasingly equiprobable denominators. Illustrative examples of such sequences for various values of
k (where
k takes on the values
) include the sequence of
finite equiprobable distributions
where
and (
13) is satisfied; that of the
geometric distributions
with infinitesimal
so that
: (
13) is satisfied with a suitable choice of
; and finally, that of the
Poisson distributions
with divergent
, where again the modal values are infinitesimal: we know indeed that a Poisson distribution attains its maximum in
, so that for
, its modal value
essentially behaves as (see [
1]
)
In this case, (
13) is also fulfilled through a suitable choice of
Lemma 1. Within the aforementioned notations and under the given conditions, we have Proof. The positive series defining
is certainly convergent because
and, hence, we can write
where
is an infinitesimal remainder. Remark that here
k plays the roles of index of the distribution sequence as well as the cut-off of the series.
On the other hand, under our stated conditions,
where
denotes the
harmonic number, namely the sum of the reciprocal integers up to
. It is well known ([
1]
) that, for
,
grows as
, so using (
13), we have
, and finally
. □
Theorem 1. If and is itscdf, then, given the notation and conditions outlined above, we have Proof. Since our series have positive terms, the first result in (
15) follows from (
10) and (
14) because, with
,
As for the second result in (
15), since for every real number
x it is
, for every
, and
, we have, from (
12),
namely,
so that, since
and
, it is
and the second result (
15) follows again from (
14). Finally, in a similar way, we find, for (
16), that
namely,
and, hence,
so that, in this case, the result also follows from (
14). □
This theorem reveals that as the upper limit
k approaches infinity; although the probability associated with individual rational numbers tends to vanish, the probability of these numbers grouped into intervals remains substantial. This behavior bears a striking resemblance to the behavior observed in continuously distributed
real rvs. Nevertheless, due to the factors discussed in
Section 2, it is important to emphasize that the previous result does not imply the possibility of achieving a uniform limit distribution on
(as such a distribution does not exist). Instead, it suggests that our stochastic rational numbers
Q—at least for denominators
m distributed in a fairly flat way, and numerators
n that are conditionally equiprobable within the range of 0 to
m—tend to behave asymptotically like a uniform distribution within the interval
. This aligns well with our intuitive concept of
selecting rational numbers randomly. It is worth noting in this context that the variance is also given by
again in agreement with an approximate uniform distribution in
.
6. Denominator Distributions
6.1. Geometric Denominators
A few closed formulas about the
rv Q are available for particular denominator distributions: let us suppose, for instance, that the denominator
M is geometrically distributed as
In this case, we first find
and, hence,
while for the
cdf we can not go beyond its formal definition
As for the
Q discrete distribution instead, taking
, we find with
the analytic expression
where
is a hypergeometric function [
1] that quantifies the deviation of
from the corresponding joint probability of
This formula allows a graphic representation of
as a function of the irreducible denominators
m displayed in
Figure 1, where it is clear how the initial (
) ordering of the probabilities (increasing with the
w values going from
to
) becomes totally overturned for a large enough
m. We remark that each value of the probability (
17) should be considered to be attributed to every rational number with the same
m as the irreducible denominator. For instance, see
Table 2; for
, we obtain the probability of
and 1; for
, the probability of
alone; for
, that of
; for
, that of
; and so on. This observation enables us, in particular, to avoid a potential misinterpretation. Indeed, we note that, while it might seem at first glance that
we find instead
as can be seen from the fact that for
This is not in contradiction with the mandatory requirement that
precisely because, as previously remarked, the probability associated to an
m must be attributed to several different rational numbers
q; if
is the number of rationals
q that have
m as its irreducible denominator, then we should rather pay attention to ascertain the normalization in the form
We stress that confirming this result—which we can confidently establish through construction and definition—proves to be challenging when attempting direct calculations. This difficulty arises due to the lack of a readily available closed-form expression for the sequence
. The behavior of this sequence is rather irregular, though it demonstrates an overall upward trend on average. This can be observed from an empirical plot of its initial values, depicted in
Figure 2. We will defer a more detailed discussion on this matter to
Section 7, where we will provide additional insights. In particular, we will demonstrate how the preceding normalization condition can be employed for stepwise computations of the
values.
6.2. Poisson and Equiprobable Denominators
When the denominators are distributed according to different (albeit simple) laws, we no longer have access to elementary closed forms for
. For instance, if
M follows a Poisson distribution, we have
we find
and
while for the variance, we have
but the
cdf is
and for the discrete distribution, taking
, we find
with no closed expression readily available.
Considering, instead, denominators
M taking only a finite number
of equiprobable values
m, we have:
We then have
and, hence,
while for the
cdf it is
and the discrete distribution probabilities are
where, since
, it is always
.
Even in this case, we have no closed formulas to show. Since the sums involved are now always finite, a simple—but essentially trivial—technique for simulating an
asymptotically equiprobable sample of rational numbers within the interval
seems to emerge. The approach involves several steps. Begin by selecting a sufficiently large value
k. Then, randomly select an integer
m from the equiprobable set of numbers
. Subsequently, choose another random integer
n from the equiprobable set of numbers
, and calculate
. By repeating this process a substantial number of times, an almost uniformly distributed sample within the range
can be generated, as depicted in
Figure 3. Nevertheless, it is important to note that the approach has limitations, as mentioned earlier in
Section 2. Not every rational number in
would have an opportunity to be drawn using this method, as only a finite subset of these numbers would be taken into account. Although, in theory, this finite set of numbers could be made exactly equiprobable, the infinitely numerous remaining rational numbers would be entirely excluded and assigned a probability of precisely zero.
7. Final Remarks: Sequencing Rational Numbers
Other examples of distributions on the rational numbers in
are, of course, possible. For instance, given
and for a given denominator
, it is possible to suppose that the numerators are binomially—instead of equiprobably—distributed as
By choosing then a suitable distribution for the denominator M, we can define the global distribution of . However, rather than indulging in displaying these further examples, we would like to conclude this paper with a few remarks about a particular residual open problem.
Due to the countable nature of
, as we have already said, its elements within the range
can be systematically organized into a sequence. To simplify the process of assigning a distribution to
, it would be immensely advantageous if this sequence could encompass all rational numbers within
without any repetitions. Achieving this arrangement, however, requires identifying patterns that govern such sequence. This, in turn, would enable us to easily determine both the rational number
q associated with a given index
k and, conversely, the index
k corresponding to a specific rational number
q. Yet, this endeavor is complicated by the inherent irregularity present in the sequence of entries in the triangular table, such as the unpredictable occurrences of prime numbers among the denominators
m. Notably, even the presence of prime numbers—which uniquely identify rows without gaps between the extremes—does not follow a readily discernible pattern. Nonetheless, it is evident that effectively sequencing all numbers in
hinges on obtaining insights into
—specifically, the count of non-blank entries in the
row of
Table 3.
While not attempting an exhaustive treatment of this topic, we will focus on several observations concerning some basic properties of the numbers
(representing the count of rational numbers with a common irreducible denominator
m in a row of
Table 3) and
(indicating the sum of these rational numbers). To begin, it is worth noting that the normalization condition (
18) can be employed to derive a systematic method for iteratively computing the values of
. For example, as detailed in
Section 6.1, when denominators follow a geometric distribution and numerators are conditionally equiprobable, the distribution of
Q is expressed by (
17). To satisfy the normalization (
18), the number
of equiprobable numbers sharing the same irreducible denominator must be taken into consideration. It is apparent that by setting
in (
17), the normalization condition (
18) transforms into
namely, with a power expansion
This relation can be used to find the values of
by equating the coefficients of the identical powers of
z. Indeed, writing the first terms of (
19), we find
and, hence, we progressively have
and so on, in agreement with the corresponding entries of
Table 3. It is crucial to emphasize that this procedure cannot rely on the specific distribution of
Q since the sequence
remains constant, and the normalization condition (
18) must hold for any valid distribution.
To conclude, we will outline a few elementary properties of
and
that can be instrumental for future advancements. Here,
represents the denominators and
represents the numerators. We term them
accepted when
appears in
Table 3, meaning it is an irreducible fraction. Here are the properties:
for : in our table and are accepted only for so that, in every row with , the first and last number are always missing; then, apparently, ; in particular, only, for prime number.
For , if is accepted, then is also accepted because, if is irreducible, then is also irreducible, namely, the accepted values always show up in pairs; in particular, since is always accepted, then is also always accepted, and hence, for (the two numbers coincide for , so that ).
always is an even number for because, according to point 2, the accepted numerators n always show up in pairs; moreover, if is even, then is not accepted because, for (and ), the numerator would be , and would be a reducible fraction.
For , the sum of an accepted pair always is because we are adding
and
; as a consequence,
the sum of the irreducible fractions sharing a common denominator is because there are
accepted pairs; looking, moreover, at
Table 3, we see that this last result also holds for
(
) and
(
).
8. Conclusions (Written by Giovanni M. Cicuta)
Let us summarize the findings of this work. The goal of the work is to define a uniform probability distribution to every rational number . This does not seem to have practical applications today, but it is an intriguing problem. Indeed, it may only be achieved as a limiting process. The main steps are:
For every ratio of pair of random variables , with , a uniform distribution for the random variable N is chosen, for fixed m. Next, a sequence, indexed by a parameter k of distributions, is chosen for the random variable M, the denominator.
The k-dependent distribution is increasingly more flat as .
In terms of these distributions, a
k-dependent probability distribution
is defined in Equation (
1), for any
,
, where the pair
n,
m are co-primes. It is defined as
asymptotically equiprobable. Theorem 1 asserts that all the desired properties for the probability distribution are achieved through this procedure.
Section 6 provides examples of the distributions for the denominator and detailed evaluations.
Section 7 is not probabilistic. The proof of the countability of rational numbers by G. Cantor provides a sequence of all fractions
. Several other sequences were written in the decades following this proof. In all of them, every rational number
q appears several times (an infinite number of times). One would like to define a sequence of all rational numbers
, such that the sequence of fractions
would only include the pair
n,
m as co-primes. In
Section 7, some properties of the occurrence of repeated fractions are obtained.
If the desired sequence of rationals numbers without repetitions could be built, many probability distributions could be proposed for the elements of the sequence.