commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele De Stefano (JIRA)" <>
Subject [jira] [Commented] (MATH-1401) Exception at IntervalUtils.getClopperPearsonInterval
Date Sun, 14 Apr 2019 17:28:00 GMT


Michele De Stefano commented on MATH-1401:

Dear all, this issue is still present.

I've found an elegant solution (from another developer) that requires very few modifications.

Look here: [|]

Basically, it is sufficient to set the default for the upper bound to 1, and to perform the
computation of the upper bound only when the number of successes is less than the number of
trials (this is a check to be added).

I checked the correctness of the results against the same computation performed by the statsmodels
Python package.

> Exception at IntervalUtils.getClopperPearsonInterval
> ----------------------------------------------------
>                 Key: MATH-1401
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6.1
>            Reporter: Art
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>             Fix For: 4.0
> IntervalUtils.getClopperPearsonInterval throws an exception when number of successes
equals to zero or number of successes = number of trials.
> IntervalUtils.getClopperPearsonInterval(1, 0, 0.95) or IntervalUtils.getClopperPearsonInterval(1,
1, 0.95) throws org.apache.commons.math3.exception.NotStrictlyPositiveException despite that
its input parameters are valid. 

This message was sent by Atlassian JIRA

View raw message