You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sung Park <SP...@midwestiso.org> on 2006/02/03 20:55:10 UTC
[MATH] inversecumulativeProbability function fails for normal distribution with std dev less than 0.0273
Hi all,
There is a normal distribution implementation in the package org.apache.commons.math.distribution.
When calling the inversecumulativeProbability(double p) method for a normal distribution of a specific mean and standard deviation, I am receiving the error below whenever the standard deviation of the normal distribution is less than or equal to 0.0273. I tried the microsoft excel imiplemenation (NormInv(probability, mean, standard dev)), and that implementation ran fine with std dev. of value less than or equal to 0.027. Is this something known or a limitation of the java implementation of the normal inverse function? If anyone else experienced a similar problem and knows how to remedy, please help!
====== error trace =====
org.apache.commons.math.FunctionEvaluationException: Error computing cdf Evaluation failed for argument=1.0345
at org.apache.commons.math.distribution.AbstractContinuousDistribution$1.value(AbstractContinuousDistribution.java:73)
at org.apache.commons.math.analysis.UnivariateRealSolverUtils.bracket(UnivariateRealSolverUtils.java:193)
at org.apache.commons.math.analysis.UnivariateRealSolverUtils.bracket(UnivariateRealSolverUtils.java:127)
at org.apache.commons.math.distribution.AbstractContinuousDistribution.inverseCumulativeProbability(AbstractContinuousDistribution.java:84)
at org.apache.commons.math.distribution.NormalDistributionImpl.inverseCumulativeProbability(NormalDistributionImpl.java:131)
at org.miso.tools.credit.NormalInverse.getNormalInverse(NormalInverse.java:110)
at org.miso.tools.credit.NormalInverse.main(NormalInverse.java:55)
Caused by: org.apache.commons.math.ConvergenceException: maximum number of iterations reached
at org.apache.commons.math.special.Gamma.regularizedGammaP(Gamma.java:176)
at org.apache.commons.math.special.Erf.erf(Erf.java:52)
at org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability(NormalDistributionImpl.java:105)
at org.apache.commons.math.distribution.AbstractContinuousDistribution$1.value(AbstractContinuousDistribution.java:71)
... 6 more
Thank you in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org