Inverse erfc function
y = distfun_erfcinv ( x )
a matrix of doubles, in the range [0,2].
a matrix of doubles
This function computes the inverse of the erfc function. This function is ill-conditioned when x is close to 1 or when x is close to 2: this might lead to inaccurate results.
The implementation is based on cdfnor, which suffers from inaccuracies when x is close to 0.5: http://bugzilla.scilab.org/show_bug.cgi?id=9030
distfun_erfcinv(1.e-3) expected = 2.326753765513525 // Plot the function scf(); x = linspace(1.e-5,2-1.e-5,1000); y = distfun_erfcinv(x); plot(x,y); // This implementation is accurate, even if x is small: distfun_erfcinv ( 10^-20 ) expected = 6.60158062235514256 // By contrast, the mathematically correct erfinv(1-x) // formula gives poor results: x = 10^-20 erfinv(1-x) expected = 6.60158062235514256 // erfcinv is ill-conditioned when x is close to 1. distfun_erfcinv(1-1.e-15) expected = 8.855185839123727168e-16 // erfcinv is ill-conditioned when x is close to 2. distfun_erfcinv(2-1.e-12) expected = -5.04202109411347248 | ![]() | ![]() |
Dider Pelat, "Bases et méthodes pour le traitement de données", section 8.2.8, "Loi log-normale".
Wikipedia, Lognormal probability distribution function, http://en.wikipedia.org/wiki/File:Lognormal_distribution_PDF.png
Wikipedia, Lognormal cumulated distribution function, http://en.wikipedia.org/wiki/File:Lognormal_distribution_CDF.png