[ https://issues.apache.org/jira/browse/MATH-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13895658#comment-13895658 ]
Phil Steitz edited comment on MATH-1065 at 2/8/14 6:11 PM: ----------------------------------------------------------- By contract in RealDistribution (same actually in IntegerDistribution), what the inverse cum needs to return is {code} inf{x in R | P(X<=x) >= p} for 0 < p <= 1} inf{x in R | P(X<=x) > 0} for p = 0. {code} Looks to me like your algorithm returns {code} sup{x in R | P(X <= x) < p} {code} which is not the same. The key is to be consistent with the way we have defined the inverse cum for both discrete ("Integer") and continuous ("Real") distributions. was (Author: psteitz): By contract in RealDistribution (same actually in IntegerDistribution), what the inverse cum needs to return is inf{x in R | P(X<=x) >= p} for 0 < p <= 1} inf{x in R | P(X<=x) > 0} for p = 0. Looks to me like your algorithm returns sup{x in R | P(X <= x) < p} which is not the same. The key is to be consistent with the way we have defined the inverse cum for both discrete ("Integer") and continuous ("Real") distributions. > EnumeratedRealDistribution.inverseCumulativeProbability returns values not in > the samples set > --------------------------------------------------------------------------------------------- > > Key: MATH-1065 > URL: https://issues.apache.org/jira/browse/MATH-1065 > Project: Commons Math > Issue Type: Bug > Affects Versions: 3.2 > Reporter: matteodg > Fix For: 3.3 > > Attachments: EnumeratedRealDistributionTest.java > > > The method EnumeratedRealDistribution.inverseCumulativeProbability() > sometimes returns values that are not in the initial samples domain... > I will attach a test to exploit this bug. -- This message was sent by Atlassian JIRA (v6.1.5#6160)