commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (MATH-280) bug in inverseCumulativeProbability() for Normal Distribution
Date Tue, 07 Jul 2009 09:22:14 GMT

     [ https://issues.apache.org/jira/browse/MATH-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Luc Maisonobe resolved MATH-280.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0
         Assignee: Luc Maisonobe

fixed in subversion repository as of r791766
thanks for the report

> bug in inverseCumulativeProbability() for Normal Distribution
> -------------------------------------------------------------
>
>                 Key: MATH-280
>                 URL: https://issues.apache.org/jira/browse/MATH-280
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Java 1.5
>            Reporter: Michael Borcherds
>            Assignee: Luc Maisonobe
>             Fix For: 2.0
>
>
>  * @version $Revision: 617953 $ $Date: 2008-02-02 22:54:00 -0700 (Sat, 02 Feb 2008) $
>  */
> public class NormalDistributionImpl extends AbstractContinuousDistribution 
>  * @version $Revision: 506600 $ $Date: 2007-02-12 12:35:59 -0700 (Mon, 12 Feb 2007) $
>  */
> public abstract class AbstractContinuousDistribution
> This code:
>         	DistributionFactory factory = app.getDistributionFactory();
>         	NormalDistribution normal = factory.createNormalDistribution(0,1);
>         	double result = normal.inverseCumulativeProbability(0.9772498680518209);
> gives the exception below. It should return (approx) 2.0000...
> normal.inverseCumulativeProbability(0.977249868051820); works fine
> These also give errors:
> 0.9986501019683698 (should return 3.0000...)
> 0.9999683287581673 (should return 4.0000...)
> org.apache.commons.math.MathException: Number of iterations=1, maximum iterations=2,147,483,647,
initial=1, lower bound=0, upper bound=179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
final a value=0, final b value=2, f(a)=-0.477, f(b)=0
> 	at org.apache.commons.math.distribution.AbstractContinuousDistribution.inverseCumulativeProbability(AbstractContinuousDistribution.java:103)
> 	at org.apache.commons.math.distribution.NormalDistributionImpl.inverseCumulativeProbability(NormalDistributionImpl.java:145)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message