You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sébastien Brisard (Issue Comment Edited JIRA)" <ji...@apache.org> on 2011/12/05 07:53:40 UTC

[jira] [Issue Comment Edited] (MATH-718) inverseCumulativeProbability of BinomialDistribution returns wrong value for large trials.

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

Sébastien Brisard edited comment on MATH-718 at 12/5/11 6:53 AM:
-----------------------------------------------------------------

Hi Yuji,
thanks for reporting this. For version 3.0, we are currently reshaping the package distribution, and this will probably get resolved once we are over with MATH-692.
Best regards,
Sébastien
                
      was (Author: celestin):
    Hi Yuji,
thanks for reporting this. For version 3.0, we are currently reshaping the package distribution, and the next item on the list was inverseCumulativeProbability for discrete distributions (see MATH-699). So I'll gladly look into the reported bug.
As for version 2.2, I don't really know how to include the correction (if possible).
Sébastien
                  
> inverseCumulativeProbability of BinomialDistribution returns wrong value for large trials.
> ------------------------------------------------------------------------------------------
>
>                 Key: MATH-718
>                 URL: https://issues.apache.org/jira/browse/MATH-718
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.2, 3.0
>            Reporter: Yuji Uchiyama
>
> The inverseCumulativeProbability method of the BinomialDistributionImpl class returns wrong value for large trials.  Following code will be reproduce the problem.
> {{System.out.println(new BinomialDistributionImpl(1000000, 0.5).inverseCumulativeProbability(0.5));}}
> This returns 499525, though it should be 499999.
> I'm not sure how it should be fixed, but the cause is that the cumulativeProbability method returns Infinity, not NaN.  As the result the checkedCumulativeProbability method doesn't work as expected.

--
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