On 17/01/2020 17:21, Alex Herbert wrote:

A uniform sampler of the IEEE 754 finite doubles would sample from a log-uniform distribution as the limiting distribution and I don't think that is actually what people require when creating random double data. So either it: (a) is discarded as an idea; (b) is well documented and put in examples; (c) is actually formalised to correctly sample from the log-uniform distribution using the PDF:

1 / (x (log(b) - log(a)))

for x in the interval [a, b] from a uniform deviate (U) in the range of the natural logarithm of the interval:

X = exp(U(log(a), log(b)))

I think that adding a LogUniformSampler may be of use.

It would allow creation of data approximately uniform in the distribution of exponents. The numbers would be uniform on a log scale. The implementation is simple and I don't see the harm in adding it since it is a valid distribution with known PDF and CDF.

Likewise the LogUniformDistribution can be added to commons-statistics distribution. There already is a vaguely related LogNormalDistribution/NormalDistribution pair so this would be and the LogUniformDistribution/UniformContinuousDistribution pair. I don't see the need to name it LogUniformContinuousDistribution as there is no discrete version that I could find documented.

Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to