Approximation of a normal distribution function

This is the (divergent) asymptotic development for $ f(x)=\int_x^{\infty} e^{-{1\over 2}t^2} \ dt $ given by

$$f(x) \sim e^{-{x^2\over 2}}\ (\ {1\over x}\ + \ \Sigma_{k=1}^{\infty}\ {(-1)^k(2k-1)!\over 2^{k-1}(k-1)!}\ {1\over x^{2k+1}}\ ) $$ or $$f(x) \sim e^{-{x^2\over 2}}\ (\ {1\over x}\ - {1\over x^3} + {3\over x^5} - {15\over x^7} + {105\over x^9} - {945\over x^{11}}...)$$

It is easily obtained from an integration by parts. The remainder is given by an explicit integral. From its expression, one can check that $f(x)$ is in fact squeezed between two consecutive sums of the series. As a result, we have the bound, for all $x>0$,

$$0 \geq f(x) - e^{-{x^2\over 2}}\ (\ {1\over x}\ - {1\over x^3} + {3\over x^5} - {15\over x^7} + {105\over x^9}) \geq - e^{-{x^2\over 2}}\ {945\over x^{11}}$$

Divergent series were standard tools at the beginning of the XXe century. I can't provide a reference, but the book of Hardy "Divergent series" may be a starting point for a bibliographic search.

The divergent asymptotics was chosen because it is "good" at infinity. When truncated to some power (say 9), it has the correct behavior when $x$ goes to infinity, that is, it goes to zero, just like $f(x)$. So it gives an interesting approximation of $f$ for all sufficiently big value of $x$. This of course is not the case of a development obtained by truncating a converging series in positive powers of $x$.


The source code of R (http://cran.r-project.org/mirrors.html ) contains implementation (in C) of various distributions, and among them, of a normal one (see, for example, the file src/nmath/pnorm.c in the source tree of the latest version 2.10.1). The approximation they are using seems to be different (and more precise) than yours, but there are references in comments. Probably you may get a hint by looking there.


For the normal CDF:

$$ \Phi(x) \approx \frac{1}{1+e^{-1.65451*x}} $$

worked very well for me.