<<

arXiv:math/0306264v1 [math.CA] 17 Jun 2003 opeetr ro ucin egv h rttrsi h p the in terms first the gave He inverfc( . error complementary hlp[0 nrdcdtentto “inverfc( notation the introduced [10] Philip lsl eae ro function error related cal closely numerical for algorithms accurate e.g., and function, major fast inverse The computing the opt in representations. an of of properties behavior, volatility the asymptotic implied fun about the a f known computing Black-Scholes plays is in the It used of is part inverse etc. being mathematics, [9], financial networks the neural alm physics, errors in of economics, theory application the theory, sta widespread the e.g., finds of discipline, It importance the distribution. overestimate to Gauss) difficult be would It Introduction 1 n t complement its and osa hcg mc29,81SuhMra tet Chicago, Street, Morgan South 851 249), (m/c Chicago ([email protected]) at nois h nes ftecmltv tnadnormal standard cumulative the of inverse The ∗ vrteyasafwatce aeapae ihaayia s analytical with appeared have articles few a years the Over eateto ahmtc,Saitc n optrScienc computer and Mathematics, of Department r tde.Isdrvtvs nerl n smttcbeh asymptotic and derivatives, sented. Its studied. are x ,aypoi omlsfrsmall for formulas asymptotic ), oepoete fteivreo h function the of inverse the of properties Some rbblt function. probability erfc( erf( ig .Dominici E. Diego x x = ) = ) Abstract √ √ 2 2 1 π π Z x Z 0 ∞ x x e e ntrso otne logarithms, continued of terms in − − x t t ”t eoeteivreo the of inverse the denote to )” 2 2 dt dt ∗ . N ( etcnuto,biology, conduction, heat , x = ) √ okdn a been has done work ,Uiest fIlli- of University e, 1 uain [1]. culations 2 s vr scientific every ost rua[] n its and [2], ormula vo r pre- are avior L66774,USA 60607-7045, IL o 8.Yt little Yet, [8]. ion π eisexpansions, series dr oml(or normal ndard aetlrl in role damental R −∞ x wrsre for series ower uiso the of tudies e − t 2 2 dt and some expressions for the derivatives and integrals. Carlitz [3], studied the arithmetic properties of the coefficients in the power series of inverfc(x). Strecok [11] computed the first 200 terms in the series of inverfc(x), and some expansions in series of Chebyshev polynomials. Finally, Fettis [6] studied inverfc(x) for small x, using an iterative sequence of logarithms. The purpose of this paper is to present some new results on the derivatives, integrals, and asymptotics of the inverse of the cumulative standard normal probability function

x 1 t2 N(x)= e− 2 dt √2π Z−∞ which we call S(x). In section 2 we derive an ODE satisfied by S(x), and solve it using a power series. We introduce a family of polynomials Pn related to the calculation of higher derivatives of S(x). In section 3 we study some properties of the Pn, such as relations between coefficients, recurrences, and generating functions. We also derive a general formula for Pn using the idea of “nested derivatives”, and we compare the Pn with the Hn. In section 4 we extend the definition of the Pn to n < 0 and use them to calculate the integrals of S(x). We also compute the integrals of powers of S(x) on the interval [0, 1]. Section 5 is dedicated to asymptotics of S(x) for x 0, x 1 using the function Lambert W. With the help of those formulas we→ derive→ an approximation to S(x) valid in the interval [0, 1] with error ε, ε < 0.0023. Finally, appendix A contains the first 20 non-zero coefficients in | | the series of S(x), and the first 10 polynomials Pn.

2 Derivatives

Definition 1 Let S(x) denote the inverse of

x 1 t2 N(x)= e− 2 dt √2π Z−∞ satisfying S N(x)= N S(x)= x (1) ◦ ◦ In terms of the error function erf(x),

1 x N(x)= erf +1 2 √   2  Proposition 2 S(x) satisfies the IVP

2 S′′ = S(S′) (2) 1 1 √ S 2 =0, S′ 2 = 2π  

2 Proof. Since N(0) = 1/2, in follows that S(1/2) = 0. From (2.1) we get

2 1 x2 S [N(x)] S′[N(x)] = = √2πe 2 = √2πe 2 N ′(x) Substituting N(x)= y we have

S2(y) 1 S′(y)= √2πe 2 , S′( )= √2π 2

Differentiating ln[S′(y)], we get (2.2). Proposition 3

n i (n+2) n i (n i) (i j+1) (j+1) S (x)= S − (x)S − (x)S (x), n 0. i j ≥ i=0 j=0 X X    Proof. Taking the nth derivative of (2.2), and using Leibnitz’s Theorem, we have n (n+2) n (n i) (i) S = S − (S′S′) i i=0 X   n i n (n i) i (i j+1) (j+1) = S − S − S i j i=0 j=0 X   X   n i n i (n i) (i j+1) (j+1) = S − S − S . i j i=0 j=0 X X   

dnS 1 Corollary 4 If Dn = dxn ( 2 ) , then

D n =0, n 0. 2 ≥ n Putting Dn = (2π) 2 Cn , we can write

2n+1 C2n+1 1 2n+1 S(x)= (2π) 2 (x ) (2n + 1)! − 2 n 0 X≥ where C1 =1, C3 =1, C5 =7, C7 = 127, ... . Proposition 5 (n) n S = Pn 1(S)(S′) n 1 − ≥ where Pn(x) is a polynomial of degree n satisfying the recurrence

P0(x)=1, Pn(x)= Pn′ 1(x)+ nxPn 1(x), n 1 (3) − − ≥ so that

2 3 P1(x)= x, P2(x)=1+2x , P3(x)=7x +6x , ... .

3 Proof. We use induction on n. For n = 2 the result follows from (2.2). If we assume the result is true for n then

(n+1) n S = [Pn 1(S)(S′) ]′ − n n 1 = Pn′ 1(S)S′(S′) + Pn 1(S)n(S′) − S′′ − − n+1 n 1 2 = Pn′ 1(S)(S′) + Pn 1(S)n(S′) − S(S′) − − n+1 = [Pn′ 1(S)+ nSPn 1(S)](S′) − − n+1 = Pn(S)(S′)

Since Pn 1(x) is a polynomial of degree n 1 by hypothesis, is clear that − −

Pn(x)= Pn′ 1(x)+ nxPn 1(x) − − is a polynomial of degree n.

Corollary 6 Cn = Pn 1(0) −

3 The polynomials Pn(x) Lemma 7 If we write n n k Pn(x)= Qk x k X=0 we have

n n 1 Q0 = Q1 − n n 1 n 1 Qk = nQk−1 + (k + 1)Qk+1− k =1,...,n 2 (4) − − n n 1 Q = nQ − k = n 1,n k k − Proof.

n n k Qk x = Pn k X=0 d = Pn 1 + nxPn 1 dx − − n 1 n 1 − n 1 k 1 − n 1 k+1 = Qk− kx − + nQk− x k k X=0 X=0 n 2 n − n 1 k n 1 k = Qk+1− (k + 1)x + nQk−1 x − k k X=0 X=1

4 (n) n 1 n (n) (n+1) n Corollary 8 In matrix form (3.1) reads A Q − = Q where A × is given by ∈ℜ i, j = i +1, i =1,...,n 1 A(n) = n, j = i 1, i =2,...,n−+1 i,j  −  0, ow (n) In other words, A is a rectangular matrix with zeros in the diagonal, the numbers 1, 2, 3,...,n 1 above it, the number n below it and zeros everywhere else − 0 1000 0 0 n 0 200 · · · 0 0  0 n 0 3 0 · · · 0 0  · · · (n)  ......  A =  ......     0 0000 0 n 1   · · · −   0 0000 n 0   · · ·   0 0000 0 n   · · ·  and   n Q0 n Q1 n  n  Q = Q2  .   .     Qn   n  With the help of these matrices, we have an expression for the coefficients of Pn(x) n n (n k+1) (n) (n 1) (1) Q = A − = A A − A · · · k Y=1 Proposition 9 The polynomials Pn(x) satisfy the recurrence relation

n i n i Pn+1(x)= Pn i 1(x)Pi j (x)Pj (x) i j − − − i=0 j=0 X X    Proof.

n+2 Pn+1(S)(S′) n i (n+2) n i (n i) (i j+1) (j+1) =S = S − S − S i j i=0 j=0 X X    n i n i n i i j+1 j+1 = Pn i 1(S)(S′) − Pi j (S)(S′) − Pj (S)(S′) i j − − − i=0 j=0 X X    n i n+2 n i = (S′) Pn i 1(S)Pi j (S)Pj (S). i j − − − i=0 j=0 X X   

5 Proposition 10 The exponential generating function of the polynomials Pn(x) is k 1 2 x2 S [N(x)+tN ′(x)] t e 2 − 2 = F (x, t)= P (x) k k! k 0 X≥ Proof. Since tk F (x, t)= P (x) k k! k 0 X≥ d tk tk =1+ Pk 1(x) + kxPk 1(x) dx − k! − k! k 1 k 1 X≥ X≥ d tk+1 tk+1 =1+ P (x) + xP (x) dx k (k + 1)k! k k! k 0 k 0 X≥ X≥ t ∂ =1+ F (x, s)ds + xtF (x, t) ∂x Z0 it follows that F (x, t) satisfies the differential-integral equation

∂ t 1 + (xt 1)F (x, t)+ F (x, s)ds = 0 (5) − ∂x Z0 Differentiating (3.2) with respect to t we get

∂ ∂ xF (x, t) + (xt 1) F (x, t)+ F (x, t)=0 − ∂t ∂x whose general solution is of the form

x2 x2 1 F (x, t)= e− 2 G te− 2 + √2π N(x) − 2    for some function G(z). From (3.2) we know that F (x, 0) = 1, and hence

1 x2 G √2π N(x) = e 2 , − 2    which implies that 1 S2 z + 1 G(z)= e 2 √2π 2 .   Therefore, 1 2 x2 S [N(x)+tN ′(x)] F (x, t)= e 2 − 2

6 Definition 11 We define the “nested derivative” D(n) by

D(0)[f](x) 1 ≡ (n) d (n 1) D [f] (x)= f(x) D − [f] (x) , n 1 dx × ≥ n o Example 12 1. D(n) [eax]= n!anenax

2. D(n) [x]=1

3. D(n) x2 = (n + 1)!xn

Proposition 13   2 n x2 (n) x Pn(x)= e− 2 D e 2 h i Proof. We use induction on n. For n = 0 the result follows from the definition of D(n). Assuming the result is true for n 1 −

Pn(x)= Pn′ 1(x)+ nxPn 1(x) − − (n 1) 2 x2 (n 1) 2 x2 d − x (n 1) − x (n 1) = [e− 2 D − (e 2 )] + nxe− 2 D − (e 2 ) dx (n 1) 2 x2 (n 1) 2 x2 − x (n 1) − x d (n) = (n 1)xe− 2 D − (e 2 )+ e− 2 [D (e 2 )]+ − − dx (n 1) 2 x2 − x (n 1) + nxe− 2 D − (e 2 )

(n 1) 2 x2 x2 − x (n 1) d (n 1) = e− 2 xD − (e 2 )+ D − (e 2 ) dx   (n 1) 2 1 2 1 2 x2 − x x d x (n 1) = e− 2 e− 2 e 2 D − (e 2 ) dx 2 n x2 (n) x h i = e− 2 D e 2 h i

Summary 14 We conclude this section by comparing the properties of Pn(x) with the well known formulas for the Hermite polynomials Hn(x) [7]. Since the Hn are deeply related with the function N(x), we would expect to see some similarities between the Hn and the Pn.

7 Pn(x) Hn(x)

2 n x2 (n) x n x2 dn x2 Pn(x)= e− 2 D (e 2 ) Hn(x) = ( 1) e n (e− ) − dx

2 tk 1 2 x tk 2 2 S [N(x)+tN ′(x)] 2 2xt t Pk(x) k! = e − Hk(x) k! = e − k 0 k 0 P≥ P≥

Pn(x)= Pn′ 1(x)+ nxPn 1(x) Hn(x)= Hn′ 1(x)+2xHn 1(x) − − − − − n 1 (n) n (n) 1 − x S = Pn 1(S)(S′) N = − Hn 1 N ′ − √2 − √2    

4 Integrals of S(x)

Definition 15

x x1 xn 1 − ( n) S − (x)= S(xn) dxndxn 1 . . . dx1, n 1. · · · − ≥ Z0 Z0 Z0 Lemma 16

x n x2 n t2 Pn 1(x)= e− 2 Pn 1(0) + e 2 Pn(t)dt (6) −  −  Z0   Proof. It follows immediately from solving the ODE for Pn 1 in terms of Pn. −

Proposition 17 Using (4.1 ) to define Pn(x) for n< 0 yields

P 1(x)= x − P 2(x)= 1 (7) − − x2 P 3(x)= √πe N √2x − −   and the relation (n) n S = Pn 1(S)(S′) − still holds.

Proof. For n = 0 we have

P 1(x)= P 1(0) + x − − (0) S = S = P 1(S) −

8 so P 1(0) = 0. For n = 1 − − x2 P 2(x)= e 2 [P 2(0) + 1] 1 − − − ( 1) We can calculate S − explicitly by

x S(x) 2 ( 1) 1 z S − (x)= S(t)dt = S[N(z)]e− 2 dz √2π Z0 Z −∞ S(x) 1 z2 = ze− 2 dz √2π Z −∞ 2 1 S(x) 1 = e− 2 = (S′)− −√2π −

Hence, P 2(0) = 1. Finally, for− n = −2 − x2 √π P 3(x)= e P 3(0) √πN(√2x)+ − − − 2   A similar calculation as the one above, making a change of variables t = N(z) ( 1) in the integral of S − (x) yields

( 2) 1 S − (x)= N[√2S(x)] −2√π

√π and we conclude that P 3(0) = . − − 2 Corollary 18 ( 2) S 2√πS − = √2S − Proposition 19 h i

1 k (2i + 1), n =2k, k 1 Sn(x)dx = ≥  i=1 Z Q0, n =2k +1, k 0 0  ≥ Proof.  1 ∞ n n S (x)dx = z N ′(z)dz

Z0 Z −∞ ∞ 1 n 1 z2 = z e− 2 dz √2π Z −∞ k = (2i + 1), n =2k, k 1 ≥ i=1 Y

9 5 Asymptotics

Definition 20 We’ll denote by LW (x) the function Lambert W [4], LW (x)eLW (x) = x (8) This function has the series representation [5]

n 1 ( n) − LW (x)= − xn, n! n 1 X≥ the derivative d LW (x) LW = if x =0, dx x[1 + LW (x)] 6 and it has the asymptotic behavior LW (x) ln(x) ln[ln(x)] x . ∼ − → ∞ Proposition 21

1 S(x) g (x)= LW , x 0 ∼ 0 − 2πx2 → s   1 S(x) g (x)= LW , x 1 ∼ 1 2π(x 1)2 → s  −  Both functions g0(x) and g1(x) satisfy the ODE

2 2 2 g′′ = g(g′) 1+ g(g′) , for g g2(1 + g2) ∼ | | → ∞   Proof.

1 x2 1 N(x) e− 2 , x ∼ √2π x → −∞ 1 S(t)2 1 t e− 2 , t 0 ∼ √2π S(t) → S(t)2 1 S(t)e 2 , t 0 ∼ √2πt → 2 1 S2(t)eS (t) , t 0 ∼ 2πt2 → Using the definition of LW (x) we have 1 S2(t) LW , t 0 ∼ 2πt2 →   or 1 S(t) LW , t 0 ∼− 2πt2 → s   The case x 1 is completely analogous. →

10 Corollary 22 Combining the above expressions, we can get the approximation

1 S(x) g (x)=(2x 1) LW (9) ≃ 2 − 2πx2(x 1)2 s  −  good through the interval (0, 1). We can refine it even more by putting

1 S(x) g (x)= Q(x) LW (10) ≃ 3 2πx2(x 1)2 s  −  Q(x)= 1+(6 2√2π)x + ( 12+6√2π)x2 + (8 4√2π)x3 − − − − where Q(x) has been chosen such that

Q(0) = 1,Q(1) = 0,Q(1/2)=0,Q′(1/2) = √2π, Q′′(1/2)=0 − 6 Appendix

The first 10 Pn(x) are

P0(x)=1

P1(x)= x 2 P2(x)=1+2x 3 P3(x)=7x +6x 2 4 P4(x)=7+46x + 24x 3 5 P5(x) = 127x + 326x + 120x 2 4 6 P6(x) = 127+1740x + 2556x + 720x 3 5 7 P7(x) = 4369x + 22404x + 22212x + 5040x 2 4 6 8 P8(x) = 4369+102164x + 290292x + 212976x + 40320x 3 5 7 9 P9(x) = 243649x + 2080644x + 3890484x + 2239344x + 362880x 2 4 6 P10(x) = 243649+ 8678422x + 40258860x + 54580248x + + 25659360x8 + 3628800x10

The first few odd Cn are

11 n Cn 1 1 3 1 5 7 7 127 9 4369 11 243649 13 20036983 15 2280356863 17 343141433761 19 65967241200001 21 15773461423793767 23 4591227123230945407 25 1598351733247609852849 27 655782249799531714375489 29 313160404864973852338669783 31 172201668512657346455126457343 33 108026349476762041127839800617281 35 76683701969726780307420968904733441 37 61154674195324330125295778531172438727 39 54441029530574028687402753586278549396607 41 53789884101606550209324949796685518122943569

References

[1] J. M. Blair, C. A. Edwards, and J. H. Johnson. Rational Chebyshev approx- imations for the inverse of the error function. Math. Comp., 30(136):827– 830, 1976. [2] Fisher Black and Myron S Scholes. The pricing of options and corporate liabilities. Journal of Political Economy, 81(3):637–654, 1973. [3] L. Carlitz. The inverse of the error function. Pacific J. Math., 13:459–470, 1963. [4] R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, and D. E. Knuth. On the Lambert W function. Adv. Comput. Math., 5(4):329–359, 1996. [5] Robert M. Corless, David J. Jeffrey, and Donald E. Knuth. A sequence of series for the Lambert W function. In Proceedings of the 1997 Inter- national Symposium on Symbolic and Algebraic Computation (Kihei, HI), pages 197–204 (electronic), New York, 1997. ACM. [6] Henry E. Fettis. A stable algorithm for computing the inverse error function in the “tail-end” region. Math. Comp., 28:585–587, 1974. [7] N. N. Lebedev. and their applications. Prentice-Hall Inc., Englewood Cliffs, N.J., 1965.

12 [8] C.F. Lee and A. Tucker. An alternative method for obtaining the implied . The Journal of Financial Engineering, 1:369–375, 1992. [9] A. Menon, K. Mehrotra, C. K. Mohan, and S. Ranka. Characterization of a class of sigmoid functions with applications to neural networks. Neural Networks, 9(5):819–835, 1996. [10] J. R. Philip. The function inverfc θ. Austral. J. Phys., 13:13–20, 1960. [11] Anthony Strecok. On the calculation of the inverse of the error function. Math. Comp., 22:144–158, 1968.

13