[
https://issues.apache.org/jira/browse/MATH-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003178#comment-13003178
]
Phil Steitz commented on MATH-540:
----------------------------------
Reading your last comment a little more carefully, it looks like what you are
trying to do is implement sampling. IIUC, something like what you are
suggesting should work - you just have an off-by-one problem vis-s-vis the
contract of inverse cumulative probabilities as we define them. I would be +1
for adding direct support for sampling from discrete distributions, but we
should open a separate ticket for that.
> AbstractIntegerDistribution.inverseCumulativeProbability(...) Bug
> -----------------------------------------------------------------
>
> Key: MATH-540
> URL: https://issues.apache.org/jira/browse/MATH-540
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: Ole Ersoy
> Fix For: 3.0
>
> Attachments: DummyDiscreteDistribution.java,
> DummyDiscreteDistributionTest.java
>
>
> The AbstractIntegerDistribution.inverseCumulativeProbability(...) function
> attempts to decrement the lower bound of discrete distributions to values
> that go below the lower bound.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira