Alex Herbert created STATISTICS-46:
--------------------------------------

             Summary: TruncatedNormalDistribution
                 Key: STATISTICS-46
                 URL: https://issues.apache.org/jira/browse/STATISTICS-46
             Project: Apache Commons Statistics
          Issue Type: Improvement
          Components: distribution
    Affects Versions: 1.0
            Reporter: Alex Herbert


The TruncatedNormalDistribution computes the moments using the formulas on the 
Wikipedia page:

[https://en.wikipedia.org/wiki/Truncated_normal_distribution#Moments]

For the two sided truncation this computation is unstable. This is noted for 
the case when the bound [a, b] is far from the mean. It also effects a current 
test case for the following:
{noformat}
mean=7.1, sd=9.9, a=7.0999999, b=7.1000001
{noformat}
The implementation should be improved. I found one method based on the paper:
{noformat}
Foulley JL. A completion simulator for the two-sided truncated
normal distribution. Genetics, selection, evolution 2000
Nov-Dec;32(6): p. 631-635.
{noformat}
When the bound [a, b] is far from the mean the range is in the long flat tail 
of the normal distribution. Here the moments can be computed as if the 
distribution is a continuous uniform distribution.

Note that the mean and variance are not used by the implementation. Improving 
the computation will simply provide a better result if the moments are desired.

 



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

Reply via email to