commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1356) HypergeometricDistribution probability give NaN result
Date Wed, 13 Apr 2016 14:47:26 GMT

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

Gilles commented on MATH-1356:
------------------------------

Bug(s) indeed:
* failing to check precondition(s) that lead to computing "0 * infinity", and/or
* failing to give the correct result in partcular cases (that throw off the implementation)

The NaN is created in {{SaddleExpansion.logBinomialProbability}} and {{SaddleExpansion.getDeviancePart}}.
Both perform a computation like the above.

Case
{noformat}
double probIT = hgd.probability(0);
{noformat}
also produces NaN.


> HypergeometricDistribution probability give NaN result
> ------------------------------------------------------
>
>                 Key: MATH-1356
>                 URL: https://issues.apache.org/jira/browse/MATH-1356
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6.1
>         Environment: Windows
>            Reporter: Lacroix Thomas
>            Priority: Minor
>
> Hi,
> Unless I am mistaken the HypergeometricDistribution probability method returns NaN for
the following cases :
> HypergeometricDistribution hgd = new HypergeometricDistribution(11,11,1);
> double probIT = hgd.probability(1);
> HypergeometricDistribution hgd = new HypergeometricDistribution(11,11,11);
> double probIT = hgd.probability(11);
> I think it should return 1.0
> Thanks,
> Thomas



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message