EconPapers    
Economics at your fingertips  
 

A Short Note on the Numerical Approximation of the Standard Normal Cumulative Distribution and Its Inverse

Chokri Dridi

Computational Economics from University Library of Munich, Germany

Abstract: We provide computer codes in ANSI-C and Python for a fast and accurate computation of the cumulative distribution function (cdf) of the standard normal distribution and the inverse cdf of the same function. For the cdf we use the 5th order Gauss-Legendre quadrature which gives more accurate results compared to Excel and Matlab. The Inverse cdf is computed using rational fraction approximations and gives a result that is seven-decimal place accurate.

Keywords: C/C++; Gauss-Legendre; Quadarture; Normal; distribution; Numerical; Integration; Rational; fraction; approximations; Software (search for similar items in EconPapers)
JEL-codes: C63 C88 C89 (search for similar items in EconPapers)
Pages: 13 pages
Date: 2002-12-27, Revised 2003-03-07
New Economics Papers: this item is included in nep-ecm and nep-rmg
Note: Type of Document - ; pages: 13 ; figures: included. cdf.c : Is ANSI-C code to compute the cdf of standard normal dist. using a composite fifth-order Gauss-Legendre quadrature cdf-GL.py : same as cdf.c except the code is written in Python cdf.py : Python code to compute the cdf using rational fraction approximations invcdf.py : Python code to compute the inverse cdf using rational fraction approximations. ftp://wueconb.wustl.edu/econ-wp/prog/papers/0212/0212001.zip
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://econwpa.ub.uni-muenchen.de/econ-wp/comp/papers/0212/0212001.pdf (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:wpa:wuwpco:0212001

Access Statistics for this paper

More papers in Computational Economics from University Library of Munich, Germany
Bibliographic data for series maintained by EconWPA ( this e-mail address is bad, please contact ).

 
Page updated 2025-03-20
Handle: RePEc:wpa:wuwpco:0212001