commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard (Updated) (JIRA) <>
Subject [jira] [Updated] (MATH-699) inverseCumulativeDistribution fails with cumulative distribution having a plateau
Date Tue, 22 Nov 2011 07:34:40 GMT


Sébastien Brisard updated MATH-699:


please find attached a proposal for a new implementation of {{inverseCumulativeDistribution}}.
For the time being, this new implementation is implemented as a static (utility) class, as
I would like you to check the logics before committing it.
Highlights are
* use of Chebyshev's inequality (thanks Phil) to bracket the root
* in cases where the random variable has no mean or no variance, and is not compactly supported,
the method falls back to geometric bracketing, instead of arithmetic bracketing.
* removal of calls to {{getDomainLowerBound(p)}}, {{getDomainUpperBound(p)}}, {{getInitialDomain(p)}}.

The attached class has a main() method which runs some performance checks (new impl vs old
impl). The report on my machine (Intel Core i5 M540 @2.53GHz, 4Go RAM) tends to indicate that
the new implementation is slightly quicker than the old one.

Commented out is also a plateau detection which proves fairly robust (although I'm sure we
can fail it), but induces a slight decrease of the overall performances. I'm just wondering
if we should set a flag in the constructor, to indicate whether or not plateaux should be
detected ? Alternatively, we could remove plateau detection altogether, and clearly state
in the javadoc that the default impl *fails* with plateaux.

Looking forward to reading your comments,
> inverseCumulativeDistribution fails with cumulative distribution having a plateau
> ---------------------------------------------------------------------------------
>                 Key: MATH-699
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>            Priority: Minor
>         Attachments:,
> 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:!default.jspa
For more information on JIRA, see:


View raw message