0
$\begingroup$

I am approximating an empirical distribution function with a sum of three gaussians, and noticed that for erf function $erf(a-b)+erf(a)+erf(a+b)$ is numerically very close to $3erf(a)$ for applicable values of $a$ and $b$, $a>>b$. Close, but not quite the same, of course. Could you suggest an analytical explanation why these functions are so close?

$\endgroup$
  • $\begingroup$ Did you mean $3 erf(a)$ instead? Because as its written right now, you can subtract $erf(a)$ from both sides to get a positive number $erf(a-b)+erf(a+b)$ being close to zero, which I don't think is what you meant. $\endgroup$ – pre-kidney Feb 19 '15 at 7:10
  • $\begingroup$ Do you mean close to $3 \text{erf(a)}$ ? $\endgroup$ – Claude Leibovici Feb 19 '15 at 7:11
  • $\begingroup$ Yes, thanks, I meant 3. Will edit now $\endgroup$ – Michael Feb 19 '15 at 7:24
  • $\begingroup$ This is true for "most" functions, not just $\operatorname{erf}$. $\endgroup$ – Rahul Feb 19 '15 at 8:23
  • $\begingroup$ @Rahul, this is true for smooth functions when $b$ is tiny, but for $erf$ that is noticeable for larger $b$ than what I would expect. Claude Leibovici explained it nicely in his answer: the $b^2$ coefficient in the Taylor series has term $e^{-a^2}$, which is very small in my range. $\endgroup$ – Michael Feb 19 '15 at 16:56
3
$\begingroup$

Assuming you mean close to $3\, \text{erf}(a)$, set $b=x\, a$ and perform a Taylor expansion at $x=0$.

You should arrive to $$\text{erf}(a-a x)+\text{erf}(a )+\text{erf}(a+ax)=3\, \text{erf}(a)-\frac{4 \left(a^3 e^{-a^2}\right) x^2}{\sqrt{\pi }}+O\left(x^4\right)$$ or, if you prefer, $$\text{erf}(a-b)+\text{erf}(a )+\text{erf}(a+b)=3\,\text{erf}(a)-\frac{4 \left(a e^{-a^2}\right) b^2}{\sqrt{\pi }}+O\left(b^4\right)$$ I suppose that this is clarifying.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.