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 2014/07/11 21:25:05 UTC
[jira] [Resolved] (MATH-1136) BinomialDistribution deals with
degenerate cases incorrectly
[ https://issues.apache.org/jira/browse/MATH-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz resolved MATH-1136.
-------------------------------
Resolution: Fixed
Fix Version/s: 3.4
Patch applied in r1609775. Thanks for reporting this and thanks for the patch!
> BinomialDistribution deals with degenerate cases incorrectly
> ------------------------------------------------------------
>
> Key: MATH-1136
> URL: https://issues.apache.org/jira/browse/MATH-1136
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Aleksei Dievskii
> Priority: Minor
> Labels: bug, patch
> Fix For: 3.4
>
> Attachments: BINOMIAL_DEGENERATE.patch
>
>
> The following calculation returns false results:
> {{new BinomialDistribution(0, 0.01).logProbability(0)}}
> It evaluates to Double.NaN when it should be 0 (cf., for example, "dbinom(0, 0, 0.01, log=T)" in R).
> I attach a patch dealing with the problem. The patch also adds a test for this bug.
--
This message was sent by Atlassian JIRA
(v6.2#6252)