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

Thomas Neidhart commented on MATH-1086:
---------------------------------------

Running the following code on the latest trunk

{noformat}
        BinomialConfidenceInterval interval = new BinomialConfidenceInterval();
        
        ConfidenceInterval i1 = interval.getWilsonScoreInterval(10,9,0.95);
        System.out.println(i1.getLowerBound());
        
        ConfidenceInterval i2 = interval.getWilsonScoreInterval(10,10,0.95);
        System.out.println(i2.getLowerBound());
{noformat}

produces:

{noformat}
0.5958499732047616
0.7224672001371106
{noformat}

which looks like the correct result. Can you verify this?

btw. I wonder why the getXXXXInterval methods in BinomialConfidenceInterval are 
not static.

> Incorrect results from BinomialConfidenceInterval#getWilsonScoreInterval
> ------------------------------------------------------------------------
>
>                 Key: MATH-1086
>                 URL: https://issues.apache.org/jira/browse/MATH-1086
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Siarhei Khamenka
>             Fix For: 3.3
>
>
> It looks like BinomialConfidenceInterval#getWilsonScoreInterval produces not 
> accurate results for interval lower bound.
> E.g. for input (10,9,0.95) it returns 0.818 instead of 0.596; 
>        for input (10,10,0.95) it returns 0.856 instead of 0.722.
> Used also 
> http://epitools.ausvet.com.au/content.php?page=CIProportion&SampleSize=10&Positive=9&Conf=0.95&Digits=3
>  and http://www.measuringusability.com/wald.htm to verify it.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to