Quantile Mechanics
Quantile Mechanics
Abstract
In both modern stochastic analysis and more traditional probability and statistics, one way of charac-
terizing a static or dynamic distribution is through its quantile function. A direct understanding of this
function offers tangible benefits not available directly from the density function. For example, the simplest
way of simulating any non-uniform random variable is by applying its quantile function to uniform deviates.
Modern methods of Monte-Carlo simulation, techniques based on low-discrepancy sequences and copula
methods all call for the use of quantile functions of marginal distributions. We propose a new approach
to quantiles based first, for the static case, on non-linear ordinary differential equations, which we solve by
the classical method of power series with easily computed non-linear recursion relations for the coefficients.
These methods provide accuracy beyond standard machine precision on subsets of the unit interval and
are well adapted to the benchmarking of approximate techniques, and, for some cases, live simulation. We
provide some web links to implementations that may be starting points for the inclusion of these algorithms
in simulation methods. Next, we consider the time evolution of quantiles via the quantilized Fokker-Planck
equation. This is a non-linear partial differential equation and we are able to utilize the static formulation
to provide elementary time-dependent and equilibrium solutions.
Keywords: Inverse CDF, quantile function, normal, Student, beta, T-distribution, simulation, Monte Carlo,
inverse cumulative distribution function, non linear ordinary differential equations, recurrence relations, Fokker-
Planck equation, stochastic differential equation, partial differential equation.
∗ Association EURATOM-MEC Department of Theoretical Physics, Physics Faculty, University of Craiova, Str.A.I.Cuza 13,
1
2 G. Steinbrecher & W.T. Shaw
1 Introduction
In both stochastic analysis and traditional probability and statistics, the quantile function offers a useful way
of characterizing a static or dynamic distribution. An understanding of this function offers real benefits not
available directly from the density or distribution function. For example, the simplest way of simulating any
non-uniform random variable is by applying its quantile function to uniform deviates. This paper proposes to
elevate quantile functions to the same level of management as many of the classical special functions of mathe-
matical physics and applied analysis. That is, we form appropriate ordinary and partial differential equations,
and proceed to the development of power series from the appropriate underlying ordinary differential equations.
We shall consider a static analysis based on ordinary differential equations (ODEs), and a dynamic analysis
based on a corresponding partial differential equation (PDE). In this paper the focus of the dynamic analysis
will be a quantilized form of the integrated Fokker-Planck eqation arising from a stochastic differential equation
(SDE), but other dynamics may be considered in principle. We shall call this the QFPE. The management
of the dynamic QFPE will require an understanding of the solutions of the corresponding ODEs, in much the
same way as the management of, for example, the Schroedinger equation requires an understanding of separa-
tion of variables and solutions of the corresponing (linear) ODEs. This will necessitate some new technology
development for the static analysis. However, the static analysis has intrinsic interest, as well shall now discuss.
Such rational and related approximations provide useful and fast implementations in the case of the normal
distribution, where much effort has been devoted to analysing this single universal distribution with no embedded
parameters, and a one-off composite rational approximation can be developed in detail. However, other cases of
interest do involve other parameters, e.g. the degrees of freedom in the case of the Student, and two parameters
in the case of the beta distribution, and so far as we are aware there is little known about rational or other
approximations that have error properties that are managed uniformly in the distributional parameters. One
outcome of this note is the capability to manage distributional parameters for several key distributions.
Furthermore, the emergence of 64-bit computers and the associated 96- and 128-bit standards of arithmetic
also requires us to reconsider the use of standard existing approximations for quantiles, often based on rational
approximations, as providing appropriate representations for these functions in high-precision environments.
The methods we shall present here are capable of providing both arbitrary-precision benchmarks for new high-
precision approximations, as well as components of real-time simulations.
We regard it as “mathematically pleasing” that this aspect of probability theory can also be discussed in
the same setting as the classical theory of special functions. Power series methods are at the heart of many
aspects of applied mathematics. For example, the simple solutions of the Schroedinger equation rely for their
interpretation on a discussion of their power series, and their termination to a polynomial or a certain type of
convergence behaviour leads to an understanding of energy levels. Traditionally the interest in a power series
approach to special functions has been focused on linear systems, and where one can derive explicit formulae
for coefficients in terms of some combination of factorials. At this stage in our analysis our characterization
of the the power series coefficients will be through a non-linear recursion associated with a non-linear ordinary
differential equation. But this will allow numerical or symbolic computation to proceed.
The power series method is of course local in character. However, we shall show that for the cases of the
Student and beta distributions, just two series will suffice for global applications. This work has the novel feature
that we can treat a non-linear ODE through almost entirely analytical methods, leaving a computer to solve
the iteration as far as is needed and add up the series.
The use of differential equations and series methods for the analysis of quantile functions has its origins
in the earlier work of Hill and Davis [12], and Abernathy and Smith [1]. This earlier work developed differ-
ential recursions with the emphasis on Cornish-Fisher expansions. In contrast our own approach will obtain
direct algebraic recursions for the quantile functions themselves, which are readily adapted for computation.
Applications to Cornish-Fisher expansions do exist and will be given elsewhere.
dw 1
= , (1)
du f (w)
where w(u) is the quantile function considered as a function of u, with 0 ≤ u ≤ 1. We then differentiate again
to find, at least for some key common cases, a simple second order non-linear ODE.
dw √ w2
= 2π exp . (2)
du 2
This ODE is equivalent that posted for inverse erf on the web [13].
dw √ Γ( n2 ) n+1
= nπ n+1 (1 + w2 /n) 2 . (5)
du Γ( 2 )
This ODE and the conditions reduce to those for the normal case as n → ∞.
Quantile Mechanics 5
This ODE is the same that posted for the inverse beta function on the web [14].
The boundary conditions may be stated as a combination of various conditions:
The choice a = n/2, b = 1/2 is special in that by a change of variables we may recover the Student distribution.
The details of this will be given in the next section.
dw
= Γ(p)w1−p exp(w) (12)
du
Now we differentiate again, reorganize as before, and obtain the ODE
2
d2 w
dw
w − (w + 1 − p) =0. (13)
du2 du
and substitute into the differential equation. After some careful but essentially easy manipulations we obtain
an explicit forward cubic recurrence
(p−1) (p−k−1)
1 X X
cp = (2l + 1)(2p − 2k − 2l − 1)ck cl cp−k−l−1 . (18)
(2p)(2p + 1)
k=0 l=0
Next we review the optimized approach due to one of us [GS] noted in [24] for the error function. Here we give
the argugment normalized for the quantile function. The ODE may be recast as
d 1
+ w(v) = 0 . (19)
dv w0 (v)
So now let Z v
W (v) = w(t)dt . (20)
0
Integrating and using the boundary conditions gives
1
+ W (v) = 1 , (21)
w0 (v)
and so
w0 (v) − w0 (v)W (v) = 1 . (22)
So now we have a quadratic identity. We now assume that
∞
X wp
w= v 2p+1 (23)
p=0
(2p + 1)
This is analogous to the original expression in [24], where some trivial relative factors of 2 arise from the
consideration here of the normal quantile, whereas in [24] the inverse error function was considered.
We now assume
∞
X
w= cp v 2p+1 , (27)
p=0
and substitute into the differential equation. After some algebraic manipulations we obtain an explicit forward
cubic recurrence:
(2p)(2p + 1)cp =
Quantile Mechanics 7
(p−1)(p−k−1)
X X 1 2k(2k + 1)
ck cl cp−k−l−1 1+ ((2l + 1)(2p − 2k − 2l − 1)) − . (28)
n n
k=0 l=0
It is readily verified that the first few terms of the series obtained by this recursion correspond to those obtained
by direct inversion of the CDF power series (see e.g. [22]). Now it is possible to generate many more terms with
ease. Similarly, cases with closed-form solutions, n = 1, 2, 4 also confirm the recursion.
v = auB(a, b) , (30)
Some experimentation suggests that a power series in x = v 1/a is usefu, so we change independent variable to
x. We then find that, with now w = w(x),
2
d2 w (1 − a) dw
dw
w(1 − w) + = (1 − a + w(a + b − 2)) ,
dx2 x dx dx (32)
w(0) = 0 , w0 (0) = 1 .
with c1 = 1, and after some manipulations we find that there is a cubic recursion of the form, for p ≥ 2:
The quadratic term only contributes for p ≥ 3. If we work out the first few we find that
b−1
c1 = 1 , c2 = ,
a+1
(35)
(b − 1) a2 + (3b − 1)a + 5b − 4
c3 = .
2(a + 1)2 (a + 2)
So the beta distribution covers the Student T in two pieces. If we focus on the region u > 1/2, then we have
v !
u
u 1
wTn (u) = tn −1 n 1
−1 , (38)
I2(1−u) 2, 2
so we see that the tail series for the Student is given by the expansion of the beta around u = 0, but with
u → 2(1 − u). So we take
2/n
n 1
x = n(1 − u)B( , ) , (39)
2 2
and we form the series
∞
X
wβ = dp xp , (40)
p=1
where ∆(n) = 0 if n < 2 and ∆(n) = 1 if n ≥ 2. . The first few terms are
1 3p + 5
g1 = 1 , g2 = , g3 = , (48)
p+1 2(p + 1)2 (p + 2)
and some experimentation with many terms confirms that if p = 1 then gn = n1 in accordance with the exact
solution, w(u) = − log(1 − u), for this case. Another important case is that of p = 1/2, when we have the χ21
distribution, with v = π4 u2 , and the coefficent sequence
2 26 176 8138 286816 28631908 480498944
gn = 1, , , , , , , ,... . (49)
3 45 315 14175 467775 42567525 638512875
where R(w) is a simple rational function. We shall say that the quantile is rational and of type (p, q) if R = P/Q
where P, Q are polynomials with no common factors of degree p, q. We can classify as follows:
• p = q = 0: exponential distribution;
• p = 1, q = 0: normal distribution;
• p = 1, q = 1: gamma distribution;
• p = 1, q = 2: beta and Student distribution.
More generally, given a density f (w), the associated quantile function satisfies a pair of first and second order
differential equations
2
d2 w
dw 1 dw
= , = H(w) , (51)
du f (w) du2 du
where
d
H(w) = −
log{f (w)} . (52)
dw
Notably1 , the cases where H is a rational function of type up to (1, 2) are closely related to Pearson’s system
of distributions [29, 19]. Pearson’s system, in our notation, is indeed characterized by the choices of a, b, c, m in
the function
w−m
H(w) = . (53)
a + bw + cw2
The distributions arising from this, Pearson’s “Types”, are summarized on p. 480-481 of [9] and discussed
in detail by Johnson and Kotz [17]. The function H is not rational in general. An algebraic case is easily
realized as Bagnold’s hyperbolic distribution, and more general functions appear if we consider, for example,
Barndorff-Nielsen’s generalized hyperbolic distribution and special cases such as the variance gamma. Further
work is needed to explore the optimal routes for solving such cases, and to establish when a power series method
remains viable. These representations also open up avenues based on numerical differential equation solution
techniques that are complementary to numerical root-finding methods based on the CDF.
1 We are grateful to Prof. Luc. Devroye for this observation.
10 G. Steinbrecher & W.T. Shaw
is also a solution of Eqn. (75), as would be expected, where w0 satisfies Eqn. (2) and f is given by
1 1 2 2
f (w1 , w2 ) = exp − (w + w − 2ρw w
1 2 ) . (56)
2(1 − ρ2 ) 1 2
p
2π 1 − ρ2
So we can build two quite different mappings from the unit square to the bivariate normal. In general, multi-
variate and non-normal case, quantiles cannot of course be built up by such elementary superposition.
5 Quantile dynamics
There are many different ways in which the evolution of a time-dependent quantile function might be controlled.
Given the importance of stochastic analysis in modern applied mathematics, we shall consider the case where the
governing dynamics is defined by an elementary stochastic differential equation, or SDE. Let xt be a stochastic
process governed by the SDE
dxt = µ(xt , t)dt + Σ(xt , t)dWt , (57)
where µ, Σ are deterministic functions of x and t, and Wt is a standard Brownian motion. Let f (x, t) denote
the probability density function consistent with this SDE. The quantile function associated with this system is
Q(u, t), where 0 ≤ u ≤ 1. It is defined by the integral condition:
Z Q(u,t)
f (x, t)dx = u . (58)
−∞
First we differentiate this relation with respect to u, and obtain the partial differential constraint
∂Q(u, t)
f (Q(u, t), t) =1 . (59)
∂u
We differentiate this relation again, and obtain the following second order PDE,
2
∂ 2 Q(u, t)
∂f (Q(u, t), t) ∂Q(u, t)
+ f (Q(u, t), t) =0. (60)
∂Q ∂u ∂u2
In the case of no time dependence, this is readily recognized as the second order non-linear ODE derived and
solved previously. In the time-dependent case we go back to the condition of Eqn. (58) and now differentiate
with respect to time. The fundamental theorem of calculus gives, first,
Z Q(u,t)
∂Q ∂f (x, t)
f (Q(u, t), t) + dx = 0 . (62)
∂t −∞ ∂t
We use Eqn. (59) to write this as:
Z Q(u,t)
∂Q ∂Q ∂f (x, t)
=− dx . (63)
∂t ∂u −∞ ∂t
Next we use the Fokker-Planck (forward Kolmogorov) equation in the form [10]
∂f (x, t) ∂ 1 ∂
= −µf + (Σ2 f ) , (64)
∂t ∂x 2 ∂x
and observe that we can do the integration directly, and obtain the following:
∂Σ2 (Q, t)
∂Q ∂Q 1 ∂f
=− −µ(Q, t)f (Q, t) + Σ2 (Q, t) +f . (65)
∂t ∂u 2 ∂Q ∂Q
Finally we use our previous Equations (59)-(60) to eliminate f and its derivative completely, leaving us with
−2 2
1 ∂Σ2 Σ2 (Q, t) ∂Q
∂Q ∂ Q
= µ(Q, t) − + . (66)
∂t 2 ∂Q 2 ∂u ∂u2
This is the quantilized Fokker-Planck equation, or QFPE for short, associated with the SDE of Eqn. (57). It is
a non-linear PDE, and is the form of the Carrillo-Toscani equation [5] appropriate to solutions of an SDE.
with solution s
Z t Z t
σ 2 (s)
a(t) = θ(s) − ds , b(t) = dsσ 2 (s) . (78)
0 2 0
This solution, and the other Gaussian examples, are clearly what might have been expected from a knowledge
of the nature of the solution of the associated SDEs. Our purpose here was simply to illustrate the direct
solution of the QFPE using classical separation of variables methods utilising a knowledge of the non-linear
ODEs satisfied by the Gaussian quantile.
We can consider Pearson’s differential classification in relation to this equilibrium structure. We leave the reader
to explore some of the better-known special cases, and consider here the general Pearson category and a special
case leading to a Student t-distribution as the equilibrium. We consider an SDE containing independent sources
of additive and multiplicative noise, in the form
where the Wi are correlated such that E[dW1t dW2t ] = ρdt. Then Eqn. (80) is equivalent to a one-dimensional
system in the form
1
dxt = (µ1 − µ2 xt )dt + (σ12 + σ22 x2t + 2ρσ1 σ2 xt ) 2 dWt . (81)
From this we can read off the functions in the QFPE as
which corresponds to an interesting subset of the Pearson system embodied by Eqns. (51) and (53). A particular
case of interest is obtained by considering µ1 = 0 = ρ, so that we obtain the SDE
where the Wit are independent, and the quantile ODE reduces to
−2
∂ 2 Q ∂Q 2(σ 2 + µ2 )Q
2
= 22 2 2 . (85)
∂u ∂u σ1 + σ2 Q
If we compare this with Eqn. (7) we see that we have a Student quantile with
σ1
Q= p w(u) , (86)
σ22 + 2µ2
where w(u) is the standard Student quantile satisfying Eqn. (7) with degrees of freedom
µ2
n=1+2 (87)
σ22
So it is clear that we need µ2 > 0 for this to be a Student distribution. This of course corresponds to the
requirement that the underlying SDE mean-revert to the origin, and this mean-reversion condition in turn
allows an equilibrium to establish. This equilibrium origination of the standard Student distribution arises
naturally in the study of the simplest linear and stochastic approximation of very complex physical systems,
with manifest turbulence and self-organized criticality character. In particular the Student distribution arises as
the equilibrium distribution, in special limiting cases of the stochastic processes studied in [25, 26]. The faster
the mean-reversion rate is compared to the multiplicative volatility, the closer the system is to the normally
distributed limit. The Student distribution also arises naturally in the modelling of asset returns [20, 22].
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/quantiles/QuantileDemos.nb
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/quantiles/normalquantile.cpp
• Quad precision F95 code for the central normal power series is at:
14 G. Steinbrecher & W.T. Shaw
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/quantiles/normalquantile.f95
• Quad precision F95 code for the Student case (central & tail) is at:
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/quantiles/studentquantile.f95
In addition a web page is being maintained with further examples and related article, with the entry point at
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/quantiles/Quantiles.htm
Acknowledgments
We wish to thank Prof. L Devroye for his comment on the Pearson classification, and Prof. W. Gilchrist for
several useful remarks. Our understanding of the history of the approaches to quantiles has benefited from
comments by Dr. A. Dassios and Prof. G. Toscani. WS wishes to thank Absoft corporation for their help
on quadruple precision Fortran. The Fortran 95 associated with this work was developed and tested with the
Absoft Fortran for MacOS on Intel compiler. The C++ code was developed with the Bloodshed Dev C++
compiler.
References
[1] R.W. Abernathy and R.P. Smith, Applying Series Expansion to the Inverse Beta Distribution to Find
Percentiles of the F-Distribution, ACM Transactions on Mathematical Software 19, 4, 474-480, 1993.
[2] P. J. Acklam An algorithm for computing the inverse normal cumulative distribution function,
http://home.online.no/~pjacklam/notes/invnorm/
[3] G. Aletti, G. Naldi, G. Toscani, First-order continuous models of opinion formation, SIAM J. Appl.
Math. 67, 3, 827-853, 2007.
[4] C.I. Bliss, The method of probits. Science 39, 38-39, 1934.
[5] J.A Carrillo, and G. Toscani Wasserstein metric and large-time asymptotics of nonlinear diffusion
equations, in New trends in mathematical physics, pp. 234244 World Sci. Publ., Hackensack, NJ , 2004.
[8] A. Dassios On the quantiles of Brownian motion and their hitting times Bernoulli 11, 1, pp. 29-36, 2005.
[9] L. Devroye Non-uniform random variate generation, Springer 1986. Out of print - now available on-line
from the author’s web site at
http://cg.scs.carleton.ca/~luc/rnbookindex.html
[11] W. Gilchrist, Statistical Modelling with Quantile Functions, CRC Press, 2000.
[12] G.W. Hill, A.W. Davis, Generalized Asymptotic Expansions of Cornish-Fisher Type, Annals of Math-
ematical Statistics, 39, 4, 1264-1273, 1968.
[13] http://functions.wolfram.com/GammaBetaErf/InverseErf/13/01/
[14] http://functions.wolfram.com/GammaBetaErf/InverseBetaRegularized/13/01/
[15] http://functions.wolfram.com/GammaBetaErf/InverseBetaRegularized/06/01/
[16] P. Jäckel, Monte Carlo methods in finance, Wiley, 2002.
Quantile Mechanics 15
[17] N.L. Johnson and S. Kotz. Distributions in Statistics. Continuous Univariate Distributions, Wiley,
1970.
[18] R. Miura. A note on a look-back option based on order statistics, Hitosubashi Journal of Commerce and
Management, 27, 15-28, 1992.
[19] K. Pearson Second Supplement to a Memoir on Skew Variation. Phil. Trans. A 216, 429-457, 1916.
[20] K. Fergusson, E. Platen, On the Distributional Characterization of daily Log-returns of a World Stock
Index, Applied Mathematical Finance, 13 (1), 19-38, March 2006.
[21] W.H. Press, S.A.Teukolsky, W.T. Vetterling, B.P. Flannery, Numerical Recipes in C++, Cam-
bridge University Press, 2005 edition.
[22] W. T. Shaw, Sampling Student’s T distribution - use of the inverse cumulative distribution function.
Journal of Computational Finance, Vol. 9, No. 4, 2006
[23] W. T. Shaw, Refinement of the Normal quantile, King’s College working paper,
http://www.mth.kcl.ac.uk/~shaww/web_page/papers/NormalQuantile1.pdf
[24] G. Steinbrecher, Taylor expansion for inverse error function around origin, Univ. of Craiova working
paper, Jan. 2002.
[25] G. Steinbrecher and B. Weyssow, Generalized Randomly Amplified Linear System Driven by Gaus-
sian Noises: Extreme Heavy Tail and Algebraic Correlation Decay in Plasma Turbulence. Physical Review
Letters, 92, 12, 125003-125006, 2004.
[26] G. Steinbrecher and B. Weyssow, Extreme anomalous particle transport at the plasma edge, Univ.
of Craiova/Univ Libre de Bruxells working paper, May. 2007.
[27] G. Toscani ad H. Li, Long-time asymptotics of kinetic models of granular flows, Archiv. Ration. Mech.
Anal. 172, 407-428, 2004.
[28] Wichura, M.J., Algorithm AS 241: The Percentage Points of the Normal Distribution. Applied Statistics,
37, 477-484, 1988.
[29] On-line discussion of Pearson’ s system of distributions defined via differential equations.
http://mathworld.wolfram.com/PearsonSystem.html
With such a scheme the ratio dp+1 /dp → 1 as p → ∞, and numerical implementations confirm this. The limits
of how far the series can be taken are then just a matter of computation time. The second observation is that
the sum involves the product dj dp−j twice, so that one can optimize by summing half-way and taking care to
note whether p is odd or even. The recurrence can be written
p−1
b 2 c
π X 1 1
dp+1 = dj dp−j +
4 j=0 (j + 1)(2j + 1) (p − j + 1)(2p − 2j + 1)
(91)
π d2p
2
+ If(p is even, , else 0) .
4 ( p2 + 1)(p + 1)
In our initial implementations of the normal case in C++ and F95, attention has been confined to the central
power series, and with very simple series termination criteria, involving termination when the next term to be
computed falls below a certain level. While this is appropriate in a rigorous sense for alternating series, it is
a temporary solution for monotone series such as those that are being considered here. The resulting error
characteristics are nevertheless encouraging, and we can cover a large proportion of the unit interval with a
precision that is more dependent on hardware and compiler choices than on the algorithm itself. In C++ the
level of precision achievable depends on the quality of the implementation of the “long double” data type. This
is not, regrettably, rigorously specified in the C++ standard. The demonstration C++ code cited in Section 6.1
works on 0.0005 < u < 0.9995 with maximum relative error less than 1.7 × 10−15 and on 0.0035 < u < 0.9965
with maximum relative error less than 2.5 × 10−16 ., when using the Bloodshed Dev C++ under Windows XP
on a Pentium M. Results with other hardware and/or compilers will vary, especially if a poor long double
implementation is used. For a more controlled implementation, we turn to quadruple precision Fortran 95.
Using the Absoft compiler for MacOS on Intel, we obtained a relative error less than 10−29 on the interval
0.0007 < u < 0.9993. All precision calculations were assessed by reference to the inverse error function built in
to Mathematica 5.2, using 40 significant figures for the calculations. We stress that such code is not necessarily
fast enough to use in live Monte Carlo simulation, but, at this stage in the development, is more appropriately
viewed as a means for benchmarking a new class of fast rational approximations.
with p = 1/2. There are various ways of thinking about this, based on what we have so far, but the neatest
seems to be to exploit the fact that the gamma quantile ODE is already set up for an asymptotic analysis. The
ODE for the gamma quantile with p = 1/2 is
2
d2 w
1 dw
= (1 + ) , (95)
du2 2w du
so we can see right away that as u → 1, w → +∞ and the asymptotic behaviour must be such that
2
d2 w
dw
∼ , (96)
du2 du
with a solution that we can infer from the exact solution for the exponential case, i.e.,
Before proceeding further we look at the known asymptotic properties of the forward gamma CDF, for further
insight. For large w the forward gamma CDF with p = 1/2 gives us
e−w
u∼1− √ , (98)
πw
or, in other words,
√ e−w
π(1 − u) ∼ √ , (99)
w
and taking logs we find that
√ 1
− log( π(1 − u)) ∼ w + log(w) , (100)
2
√
and we see that k = π. We now change independent variables to
√
v = − log[ π(1 − u)] (101)
with a sequentially solvable set of conditions relating the coefficients akl . While it is difficult to give an explicit
formula for the recursion, the coefficients are easily determined via symbolic computation. For example, with
kmax = 3 we obtain the first few terms as
√
1. let v = − log[2 π(1 − u)];
2. Work about w as above;
√
3. calculate 2w for the normal quantile.
We stress again that these are asymptotic formulae. They will turn out to be extraordinarily accurate in the
deep tail, but less practical in the near tail zone. In the following table we look at the deep tail in more detail.
Consider the quantiles associated with the points u = 1 − 10−k , where k = 3, 4, . . . . We consider the results
from the simple third order formula above, the result from Mathematica’s internal high precision error function
(Mathematica V5.2), Wichura’s algorithm AS241 [28], and Microsoft Excel (Excel 2004 for Mac). Note that
in the last case Excel did not accept numbers as close to unity as supplied to the other algorithms. It is not
designed to treat such numbers. AS241 was implemented in Mathematica in uncompiled form. The “deep
tail” quality of the simple asymptote becomes clear from this table. It does better than the simple spreadsheet
implementation for values of u closer to unity that about 10−11 .