Re: Assign a generic name to a function based on user decision



In article <87oct649f2.fsf@xxxxxxxxxxxxxxx>,
Jason Blevins <jrblevin@xxxxxxxxxxxxxxxx> wrote:

The CDF approximation is straightforward, following from the definition
of ERF (and being an approximation to the extent that ERF is an
approximation of the error function):

PHI(x) = 1/2 * [ 1 + ERF(x / SQRT(2)) ]

Well, yes, except that statisticians refer to what you call PHI as
the error function! The problem is that ERF is pretty foul to
approximate.

If anyone happens to know the details of an inverse CDF approximation,
I'd be curious to see it!

Obviously, it's the inverse of the above! Seriously. That is all
that there is to it, mathematically. In practice, it is considerably
nastier, but ERF is still pretty nasty.

You approximate the inverse by breaking up the range, using the
Taylor series (or Pade approximant) near zero, the asymptotic
approximation (which isn't very good) for large results, and any
suitable hack in between.

Agreed. I should have noted that I wasn't recommending this for use in
generating random numbers, only if you need the inverse CDF for whatever
reason (quantiles, etc.). For draws, I use the polar method.

Right. You have Clue.


Regards,
Nick Maclaren.
.



Relevant Pages

  • Re: erf function in C
    ... > probability) as part of their math libraries? ... * guarantee the error is less than one ulp for erf. ... we use rational approximation to approximate ... * Coefficients for approximation to erf in ...
    (comp.lang.c)
  • Re: Assign a generic name to a function based on user decision
    ... Jason Blevins wrote: ... I think what Nick is getting at is that ERF only allows you to ... approximate the CDF of the Gaussian distribution, ... The CDF approximation is straightforward, ...
    (comp.lang.fortran)
  • Re: Finding the inverf
    ... Here's a relatively simple approximation for inverf: ... The maximum absolute error is about 3.6*10^-5 ... forgotten much about floating-point arithmetic, ... That's what I would normally choose to do for erf. ...
    (sci.math)
  • Re: Finding the inverf
    ... "A handy approximation for the error function and its inverse", ... referred to a graph of relative error in the left part of Fig. 1. ... Are any readers familiar with "better" approximations for erf or inverf? ...
    (sci.math)
  • Re: the error function
    ... Edgar ... I like the error function because it is difficult to calculate on computer, ... it tends to blowup in some areas. ...
    (sci.math)