You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Aleksei Dievskii (JIRA)" <ji...@apache.org> on 2014/07/11 13:32:05 UTC
[jira] [Updated] (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 ]
Aleksei Dievskii updated MATH-1136:
-----------------------------------
Description:
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.
was:
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 will attach a patch dealing with the problem shortly.
> 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
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)