[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Math::erfinv inverse error function

Bil Kleb

6/14/2008 1:05:00 AM

Hi,

Does anyone know where to find a Ruby /inverse/ error function?^1

Thanks,
--
Bil kleb
http://fun3d.lar...

[1] See for example http://en.wikipedia.org/wiki/Erro...
2 Answers

Axel Etzold

6/14/2008 10:08:00 AM

0


-------- Original-Nachricht --------
> Datum: Sat, 14 Jun 2008 10:04:25 +0900
> Von: Bil Kleb <Bil.Kleb-usenet@nasa.gov>
> An: ruby-talk@ruby-lang.org
> Betreff: Math::erfinv inverse error function

> Hi,
>
> Does anyone know where to find a Ruby /inverse/ error function?^1
>
> Thanks,
> --
> Bil kleb
> http://fun3d.lar...
>
> [1] See for example http://en.wikipedia.org/wiki/Erro...

Dear Bill,

you can use Shin-ichiro Hara's statistics2 package

http://raa.ruby-lang.org/project/st... .

It has functions for calculating the integral of the Normal Function and its inverse, and then there
is the following relation from the Wikipedia article you cited:

>>The inverse of \Phi\, is known as the normal quantile function, or probit function and may be >>expressed in terms of the inverse error function as

>>\operatorname{probit}(p) = \Phi^{-1}(p) = \sqrt{2}\,\operatorname{erf}^{-1}(2p-1) = -\sqrt{2}\,\operatorname{erfc}^{-1}(2p).


Another option would be to use the rsruby interface to the R statistical language.

http://rubyforge.org/projec...
http://www.r-pr...

Best regards,

Axel


--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/s...

Bil Kleb

6/14/2008 8:57:00 PM

0

Axel Etzold wrote:
> you can use Shin-ichiro Hara's statistics2 package
>
> http://raa.ruby-lang.org/project/st... .

Excellent; thanks.

> Another option would be to use the rsruby interface to the R statistical language.

Unfortunately, I've never managed to get R installed on
my OS X box. I haven't honestly tried harder than sudo
port install.

Thanks again,
--
Bil Kleb
http://fun3d.lar...