Siginificant figures calculating zprob

Paul Rubin http
Mon Apr 5 01:36:49 EDT 2004


sarah_wang23 at hotmail.com (Sarah Wang) writes:
> > > But the problem is that the function calculates the result
> > > with only a few significant figures. If I want to get the
> > > 20th number of the result(z-prob) what should I do?
> > 
> > Why would you need this degree of precision?
> 
> I'm doing some exploration into the statistical part of "Six Sigma"
> (as someone on the thread noted) with my most powerful exploratory
> tool "Python Interactive Shell". :)

The thing is you don't really need all that precision even still.
Math libraries usually implement the error function in two forms,
erf(x) which is basically what you call z, and erfc(x) which is 1-erf(x).
So when erf(x) is close to 1, erfc(x) is close to 0 and therefore has
an accurate floating point representation.  You don't get the precision
loss of subtracting two nearly equal floats, so you don't need so much
precision to start with.



More information about the Python-list mailing list