Description
The Log-normal distribution is defined with respect to the mean and standard deviation of the natural logarithm of the distribution values. The mean can be any number in (-inf, inf).
Currently the LogNormalSampler only allows the mean to be in [0, inf).
The sampler also refers to the parameters as shape and scale. They should be updated to:
- shape -> mu : Mean of the natural logarithm of the distribution values.
- scale -> sigma : Standard deviation of the natural logarithm of the distribution values.
This bug was discovered when testing the LogNormalDistribution in Commons Statistics.
Note the original distribution in Commons Math 3 allowed a negative mean. The parameters in CM3 used the terms shape and scale. These were ported to Commons RNG but have been corrected to mu and sigma in Commons Statistics.
I have verified that if the condition for a positive mean is dropped from the LogNormalSampler then the LogNormalDistribution can create a sampler and satisfy a chi-squared test on the samples.