[ 
https://issues.apache.org/jira/browse/MATH-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003103#comment-13003103
 ] 

Ole Ersoy commented on MATH-540:
--------------------------------

I'm looking at it like this.  I have very simple distribution like the one 
provided (Four sided dice).  I'm trying to write a simulation that draws values 
of x for a a set of uniform 0-1 probabilities.  So I'm expecting:

0 When p is less than or equal to 0.25
1 When p is greater than 0.25 but less than or equal to 0.50
2 When p is greater than 0.50 but less than or equal to 0.75
3 When p is greater than 0.75 but less than or equal to 1.0

So for the line 

int neverSucceeds = d.inverseCumulativeProbability(0.0001);

I'm really expecting 0 to be returned.

Make sense?

> 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

        

Reply via email to