Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Normal distribution
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Numerical approximations for the normal cumulative distribution function and normal quantile function === The standard normal [[cumulative distribution function]] is widely used in scientific and statistical computing. The values Ξ¦(''x'') may be approximated very accurately by a variety of methods, such as [[numerical integration]], [[Taylor series]], [[asymptotic series]] and [[Gauss's continued fraction#Of Kummer's confluent hypergeometric function|continued fractions]]. Different approximations are used depending on the desired level of accuracy. * {{harvtxt |Zelen |Severo |1964 }} give the approximation for Ξ¦(''x'') for ''x'' > 0 with the absolute error {{math|{{abs|''Ξ΅''(''x'')}} < 7.5Β·10<sup>β8</sup>}} (algorithm [https://secure.math.ubc.ca/~cbm/aands/page_932.htm 26.2.17]): <math display=block> \Phi(x) = 1 - \varphi(x)\left(b_1 t + b_2 t^2 + b_3t^3 + b_4 t^4 + b_5 t^5\right) + \varepsilon(x), \qquad t = \frac{1}{1+b_0x}, </math> where ''Ο''(''x'') is the standard normal probability density function, and ''b''<sub>0</sub> = 0.2316419, ''b''<sub>1</sub> = 0.319381530, ''b''<sub>2</sub> = β0.356563782, ''b''<sub>3</sub> = 1.781477937, ''b''<sub>4</sub> = β1.821255978, ''b''<sub>5</sub> = 1.330274429. * {{harvtxt |Hart |1968 }} lists some dozens of approximations β by means of rational functions, with or without exponentials β for the {{mono|erfc()}} function. His algorithms vary in the degree of complexity and the resulting precision, with maximum absolute precision of 24 digits. An algorithm by {{harvtxt |West |2009 }} combines Hart's algorithm 5666 with a [[continued fraction]] approximation in the tail to provide a fast computation algorithm with a 16-digit precision. * {{harvtxt |Cody |1969 }} after recalling Hart68 solution is not suited for erf, gives a solution for both erf and erfc, with maximal relative error bound, via [[rational function|Rational Chebyshev Approximation]]. * {{harvtxt |Marsaglia |2004 }} suggested a simple algorithm{{NoteTag|For example, this algorithm is given in the article [[Bc programming language#A translated C function|Bc programming language]].}} based on the Taylor series expansion <math display=block> \Phi(x) = \frac12 + \varphi(x)\left( x + \frac{x^3} 3 + \frac{x^5}{3 \cdot 5} + \frac{x^7}{3 \cdot 5 \cdot 7} + \frac{x^9}{3 \cdot 5 \cdot 7 \cdot 9} + \cdots \right) </math> for calculating {{math|Ξ¦(''x'')}} with arbitrary precision. The drawback of this algorithm is comparatively slow calculation time (for example it takes over 300 iterations to calculate the function with 16 digits of precision when {{math|1=''x'' = 10}}). * The [[GNU Scientific Library]] calculates values of the standard normal cumulative distribution function using Hart's algorithms and approximations with [[Chebyshev polynomial]]s. * {{harvtxt |Dia|2023 }} proposes the following approximation of <math display=inline>1-\Phi</math> with a maximum relative error less than <math display=inline>2^{-53}</math> <math display=inline> \left(\approx 1.1 \times 10^{-16}\right) </math> in absolute value: for <math display=inline>x \ge 0</math><math display=inline> \begin{aligned} 1-\Phi\left(x\right) & = \left(\frac{0.39894228040143268}{x+2.92678600515804815}\right) \left(\frac{x^2+8.42742300458043240 x+18.38871225773938487}{x^2+5.81582518933527391 x+8.97280659046817350} \right) \\ & \left(\frac{x^2+7.30756258553673541 x+18.25323235347346525}{x^2+5.70347935898051437 x+10.27157061171363079}\right) \left(\frac{x^2+5.66479518878470765 x+18.61193318971775795}{x^2+5.51862483025707963 x+12.72323261907760928}\right) \\ & \left( \frac{x^2+4.91396098895240075 x+24.14804072812762821}{x^2+5.26184239579604207 x+16.88639562007936908}\right) \left( \frac{x^2+3.83362947800146179 x+11.61511226260603247}{x^2+4.92081346632882033 x+24.12333774572479110}\right) e^{-\frac{x^2}{2}} \end{aligned} </math> and for <math display=inline> x<0 </math>, <math display=block> 1-\Phi\left(x\right) = 1-\left(1-\Phi\left(-x\right)\right) </math> Shore (1982) introduced simple approximations that may be incorporated in stochastic optimization models of engineering and operations research, like reliability engineering and inventory analysis. Denoting {{math|1=''p'' = Ξ¦(''z'')}}, the simplest approximation for the quantile function is: <math display=block>z = \Phi^{-1}(p)=5.5556\left[1- \left( \frac{1-p} p \right)^{0.1186}\right],\qquad p\ge 1/2</math> This approximation delivers for ''z'' a maximum absolute error of 0.026 (for {{math|0.5 β€ ''p'' β€ 0.9999}}, corresponding to {{math|0 β€ ''z'' β€ 3.719}}). For {{math|''p'' < 1/2}} replace ''p'' by {{math|1 β ''p''}} and change sign. Another approximation, somewhat less accurate, is the single-parameter approximation: <math display=block> z=-0.4115\left\{ \frac{1-p} p + \log \left[ \frac{1-p} p \right] - 1 \right\}, \qquad p\ge 1/2</math> The latter had served to derive a simple approximation for the loss integral of the normal distribution, defined by <math display=block>\begin{align} L(z) & =\int_z^\infty (u-z)\varphi(u) \, du=\int_z^\infty [1-\Phi (u)] \, du \\[5pt] L(z) & \approx \begin{cases} 0.4115\left(\dfrac p {1-p} \right) - z, & p<1/2, \\ \\ 0.4115\left( \dfrac {1-p} p \right), & p\ge 1/2. \end{cases} \\[5pt] \text{or, equivalently,} \\ L(z) & \approx \begin{cases} 0.4115\left\{ 1-\log \left[ \frac p {1-p} \right] \right\}, & p < 1/2, \\ \\ 0.4115 \dfrac{1-p} p, & p\ge 1/2. \end{cases} \end{align}</math> This approximation is particularly accurate for the right far-tail (maximum error of 10<sup>β3</sup> for zβ₯1.4). Highly accurate approximations for the cumulative distribution function, based on [[Response Modeling Methodology]] (RMM, Shore, 2011, 2012), are shown in Shore (2005). Some more approximations can be found at: [[Error function#Approximation with elementary functions]]. In particular, small ''relative'' error on the whole domain for the cumulative distribution function {{tmath|\Phi}} and the quantile function <math display=inline>\Phi^{-1}</math> as well, is achieved via an explicitly invertible formula by Sergei Winitzki in 2008.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Normal distribution
(section)
Add topic