[ 
https://issues.apache.org/jira/browse/RNG-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Herbert resolved RNG-166.
------------------------------
    Fix Version/s: 1.5
       Resolution: Fixed

Fixed in commit:

f46c00179c928f14846323caa9eee3e518fe829a

Changed parameter names to mu and sigma for the mean and standard deviation of 
the logarithm of the distribution values.

Changed to allow a negative mu parameter.

Note: This change was also applied to the BoxNormalLogNormalSampler.

> LogNormalSampler should allow negative scale (mean of the natural logarithm 
> of the distribution values)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: RNG-166
>                 URL: https://issues.apache.org/jira/browse/RNG-166
>             Project: Commons RNG
>          Issue Type: Bug
>          Components: sampling
>    Affects Versions: 1.4
>            Reporter: Alex Herbert
>            Priority: Trivial
>             Fix For: 1.5
>
>
> The [Log-normal 
> distribution|https://en.wikipedia.org/wiki/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.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to