Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Edited out incorrect formula
Can someone please solve this equation for x? I have no idea what to do with the $\mathrm{erf}$ (error function).

Edit: Hm, it did not work correctly... here is the function I meant to solve for x in symbolic form:

$$f(x) = a*\left(0.5*\mathrm{erf}\left(\frac{x-b}{c\sqrt{2}}+.5\right)\right)+d$$

Coefficients (with 99% confidence
       a =       1.412  (1.411, 1.412)
       b =       1.259  (1.259, 1.259)
       c =       1.003  (1.002, 1.003)
       d =      0.3016  (0.3014, 0.3017)

When I solve for f(x) with x=1 I get ans = 0.5460

I want to plug 0.5460 into a formula and get 1 back.
Chris, this is the Finv function you spoke of in my other question.

share|cite|improve this question
Your original had a missing parenthesis. Do check if my corrections are accurate. – J. M. May 11 '11 at 18:49
In any event, what computing environment are you using? If there is no implementation of the inverse error function, then you will have to use Newton-Raphson... – J. M. May 11 '11 at 18:50
@J.M Yeah your correction is correct. I am using MatLab, and there is an inverse error function (erfinv). I realize that erfinv(erf(x)) = x, but... I really suck at math :( – Mike Furlender May 11 '11 at 19:05
I am not MatLab user, but I suspect that it has a solve function for this kind of trivial manipulations. – Phira May 11 '11 at 21:03
@user9325 I don't think so; it said that it can't compute it. – Mike Furlender May 11 '11 at 21:44
up vote 1 down vote accepted

Let's start with the "general form" you say you had:


and go over the inversion slo-o-owly...




Now, we can employ the inverse error function:





and that's the inverse you need.

Now, if it were


instead (which I think is more likely, since you're starting from the normal distribution CDF), things are a bit different. What you should end up with is


which is probably the expression you actually need for those confidence intervals...

share|cite|improve this answer
M Thanks for the extremely thorough explanation! The data is actually (apparently) closest to a half-normal distribution, but flattened at its max. – Mike Furlender May 12 '11 at 0:40

$$x = 1.003\sqrt{2}\left(\mathrm{erf}^{-1}\left(\frac{Y/1.42 + 0.4042}{0.5}\right) - 0.05\right) + 0.5501$$

share|cite|improve this answer
Awesome! Thanks so much. You have helped me immeasurably with this project. – Mike Furlender May 11 '11 at 19:34
@ Chris Hmm, it didn't work. Perhaps I wrote it incorrectly. Here it is in symbolic form: a*(0.5*erf((1-b)/(c*sqrt(2))+.5))+d – Mike Furlender May 11 '11 at 20:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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