[ https://issues.apache.org/jira/browse/MATH-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145718#comment-13145718 ]
Sébastien Brisard commented on MATH-699: ---------------------------------------- {quote} I don't think any of the currently implemented real distributions have this problem. Correct? {quote} Maybe I misunderstood, but in MATH-692 asked for a more precise definition of {{inverseCumulativeProbability}} as inf{x in R | P(X<=x) >= p}. If we exclude distribution with plateaus, I think that the current implementation is satisfactory (but for the use of the wrong tolerance I've already pointed out). But it was agreed that this implementation should be made more robust. So what was it exactly that needed improvement? What do you want me to do on this method? {quote} They are initial guesses for where to start when trying to bracket a root. That means they have to be values that can be fed into the cumulative probability function. {quote} I'm aware of that, but the current solver does fail when {{inverseCumulativeProbability(0)}} should return -inf, or {{inverseCumulativeProbability(1)}} should return +inf. See for example the implementation of {{NormalDistributionImpl}}. {code:java} public double inverseCumulativeProbability(final double p) { if (p == 0) { return Double.NEGATIVE_INFINITY; } if (p == 1) { return Double.POSITIVE_INFINITY; } return super.inverseCumulativeProbability(p); } {code} So currently, people who want to implement a distribution must be aware of the fact that the default implementation of {{inverseCumulativeProbability}} *must* be overriden. This rather unusual fact should be made clear in the Javadoc, unless a workaround can be thought of. I agree the one I proposed was far from perfect. {quote} Remember to consider convergence problems when the actual parameter to inverse cum is close to or exactly equal to 0 or 1. {quote} Thank you for pointing this out earlier. I do keep this important point in mind. But again, if we do not widen the scope of this method, I don't see what is required of me (appart from some cosmetic alterations to the Javadoc). > inverseCumulativeDistribution fails with cumulative distribution having a > plateau > --------------------------------------------------------------------------------- > > Key: MATH-699 > URL: https://issues.apache.org/jira/browse/MATH-699 > Project: Commons Math > Issue Type: Bug > Affects Versions: 3.0 > Reporter: Sébastien Brisard > Assignee: Sébastien Brisard > Priority: Minor > Attachments: AbstractContinuousDistributionTest.java > > > This bug report follows MATH-692. The attached unit test fails. As required > by the definition in MATH-692, the lower-bound of the interval on which the > cdf is constant should be returned. This is not so at the moment. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira