You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2011/03/06 06:33:45 UTC

[jira] Commented: (MATH-540) AbstractIntegerDistribution.inverseCumulativeProbability(...) Bug

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

Phil Steitz commented on MATH-540:
----------------------------------

I don't think this is a bug.  Per the javadoc, the contract for inverse cum is
{code}
/**
 * For a random variable {@code X} whose values are distributed according
 * to this distribution, this method returns the largest {@code x}, such
 * that {@code P(X < x) < p}.
{code}

This implies that if the first non-zero mass point has probability greater than p, the right value to return is one less than that value, which is whet the method will do.  Your example distribution throws NPE when trying to compute probabilities outside of its domain of support. 


> 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