# Chaitanya's Random Pages

## September 15, 2014

### A good simple approximation of the complementary error function

Filed under: mathematics — ckrao @ 12:12 pm

I learnt from [1] that the complementary error function $\displaystyle \text{erfc}(x) = \sqrt{\frac{2}{\pi}}\int_x^{\infty}e^{-t^2}\ dt$ can be well approximated as follows for positive $x$:

$\displaystyle \text{erfc}(x) \approx \exp(-c_1x-c_2x^2), x > 0$

where

$\displaystyle c_1=1.09500814703333, \quad c_2=0.75651138383854.$

As mentioned in [2], this approximation is found by applying the non-linear least squares method to estimate the parameters $c_1, c_2$ based on 500 points equally spaced in the interval [0,5].

The graphs below show how well this approximation holds across positive $x$. By symmetry one could use $2-\exp(c_1x-c_2x^2)$ as an approximation of $\text{erfc}(x)$ for negative $x$.

Only two parameters are needed, but each were specified to 14 decimal places in to obtain the accuracy (maximum error just over 0.002) seen here. Such an approximation would be useful for working with functions (e.g. products) of error functions  (see [1] for an example).

#### References

[1] Product of two complementary error functions (erfc) – Mathematics Stack Exchange.

[2] W.-J. Tsay, C.J. Huang, T.-T. Fu, I-L. Ho, Maximum Likelihood Estimation of Censored Stochastic Frontier Models: An Application to the Three-Stage DEA Method, No 09-A003, IEAS Working Paper : academic research from Institute of Economics, Academia Sinica, Taipei, Taiwan. Available at http://econ.ccu.edu.tw/academic/master_paper/090323seminar.pdf.