Best (and Newest?) Approximations for Popular Inverse Distributions

03152019, 12:48 PM
(This post was last modified: 03152019 12:52 PM by Namir.)
Post: #1




Best (and Newest?) Approximations for Popular Inverse Distributions
Hello All,
I am looking for the best (and I assume newest) approximations for the Inverse Normal and Inverse Studentt distributions. The HP65 and HP67 have these that come from the "Handbook of Mathematical Functions: with Formulas, Graphs, and Mathematical Tables" by Milton Abramowitz and Irene A. Stegun. I am looking for better approximations that the ones appearing the HP 65/65 Stat Pacs. Cheers, Nami 

03152019, 01:02 PM
Post: #2




RE: Best (and Newest?) Approximations for Popular Inverse Distributions  
03152019, 02:49 PM
Post: #3




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
Which raises the question: How many people here have a copy of Big Red?
I do. I bought it at the US Government Bookstore in downtown LA in the 80s. I used to be able to buy my Topo maps there, too. 

03152019, 04:27 PM
(This post was last modified: 03152019 05:14 PM by Dieter.)
Post: #4




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
(03152019 12:48 PM)Namir Wrote: I am looking for better approximations that the ones appearing the HP 65/65 Stat Pacs. I assume that virtually anything is better that the good old Hastings approximation. ;) As far as I can tell the defacto standard for the inverse Normal distribution is the Wichura algorithm from 1988, published in Applied Statistics as algorithm AS241. It works over the whole IEEE double precision domain and has a relative error less than 1 E16. I strongly recommend reading the papers by William T. Shaw, both w.r.t. the inverse Normal as well as other distributions. There is a lot of valuable info to be found. For my part I prefer a less complex approximation which is then refined in a second step. The HP67/97 program in the Software Library here works this way. Dieter 

03162019, 01:30 AM
Post: #5




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
I still have one copy left. On the other hand, it's available free on the net.


03162019, 07:16 AM
Post: #6




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
(03152019 01:02 PM)Pekis Wrote: Perhaps this one ? These are programs for the HP42S: Code: 00 { 32Byte Prgm } Code: 00 { 36Byte Prgm } Examples: 1 XEQ "PHI41" 0.841442 XEQ "iPHI41" 1.000000 They are easily ported to the HP25: Code: 01: 31 : ENTER Examples: CLEAR PGRM 1 R/S 0.841442 GTO 21 R/S 1.000000 Thanks for sharing Thomas 

03162019, 10:02 AM
Post: #7




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
(03162019 07:16 AM)Thomas Klemm Wrote:(03152019 01:02 PM)Pekis Wrote: Perhaps this one ? Yes, these are very simple approximations of the Normal Integral that can be directly inverted so that you get the inverse, the Normal quantile. But the error is larger than in the old 1950s approximations Namir mentioned, and they do not work well for probabilities close to 0 or 1. So I wonder if this is what Namir had in mind when he wrote he was looking for "the best ... approximations". I think in this regard other methods are much more suited. Most of them use rational approximations. Various of such approximations have been published: by Odeh and Evans, Beasley, Moro and Springer, Wichura, Acklam and others. But you don't have to rely on the results of others. Rational approximations can be developed in Mathematica or Maple, you can even do it in Excel. Just state the domain (down to 1E–99? More? Less?) and the accepted error level, and do your own custom approximation. Dieter 

03172019, 11:17 AM
Post: #8




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
(03152019 01:02 PM)Pekis Wrote: Hello Namir, Thanks for the article. It contains a reference to another article that lists a whole set of functions that approximate the normal pdf. Namir 

03182019, 06:52 AM
Post: #9




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
I collected several Inverse Normal formulas last year. Pekis' post is a good reference. I used in practice https://apps.dtic.mil/dtic/tr/fulltext/u2/a060390.pdf
For probability p, (p^.135  (1p(^.135))/.1975 which is rather simple. 

03182019, 07:10 AM
Post: #10




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
Thanks ttw!


03182019, 02:45 PM
(This post was last modified: 03182019 02:59 PM by Pekis.)
Post: #11




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
Hello Namir,
I found this not too heavy erfinv function by Mike Giles with these notes: ... Regarding accuracy, the maximum error of the new single precision approximation, compared to the existing double precision version, is around 7×10−7 ... I then transformed it in VBA using invphi(p) = sqrt(2) * erfinv(2*p1) Public Function invphi(prob As Double) Dim x As Double, t As Double Dim w As Double, p As Double t = 2 * prob  1 x = Abs(t) w = Log((1  x) * (1 + x)) If (w < 5) Then w = w  2.5 p = 2.81022636E08 p = 0.000000343273939 + p * w p = 0.0000035233877 + p * w p = 0.00000439150654 + p * w p = 0.00021858087 + p * w p = 0.00125372503 + p * w p = 0.00417768164 + p * w p = 0.246640727 + p * w p = 1.50140941 + p * w Else w = Sqr(w)  3 p = 0.000200214257 p = 0.000100950558 + p * w p = 0.00134934322 + p * w p = 0.00367342844 + p * w p = 0.00573950773 + p * w p = 0.0076224613 + p * w p = 0.00943887047 + p * w p = 1.00167406 + p * w p = 2.83297682 + p * w End If invphi = Sgn(t) * p * x * Sqr(2) End Function 

03182019, 03:15 PM
Post: #12




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
Excuse my Noob ignorance but is the ‘Big Red’ quoted (who has one?) also the Abramowitz book that is mentioned? If so, yes I’ve had a copy for years and the OEIS (both book and online version that comes with the book.
Denny Tuckerman 

03182019, 03:36 PM
(This post was last modified: 03182019 05:31 PM by SlideRule.)
Post: #13




RE: Best (and Newest?) Approximations for Popular Inverse Distributions
(03152019 12:48 PM)Namir Wrote: … I am looking for the best (and I assume newest) approximations for the Inverse Normal … distribution … I am looking for better approximations that the ones appearing the HP 65/65 Stat Pacs ….Namir You may find An Approximation to the Probability Normal Distribution and its Inverse, Una aproximación a la distribución de probabilidad normal y su inversa, AlamillaLópez Jorge Luis, Instituto Mexicano del Petróleo, Dirección de Investigación en Transformación de Hidrocarburos (MAR 2015), useful. Abstract Mathematical functions are used to compute Normal probabilities, which absolute errors are small; however their large relative errors make them unsuitable to compute structural failure probabilities or to compute the menace curves of natural hazards. In this work new mathematical functions are proposed to compute Normal probabilities and their inverses in an easy and accurate way. These functions are valid over a wide range of random variable and are useful in applications where computational speed and efficiency are required. In addition, these functions have the advantage that the numerical correspondence between the random value Χ = x and its Normal probability Φ (x) is bijective. BEST! SlideRule 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)