[go: up one dir, main page]

IDEAS home Printed from https://ideas.repec.org/p/wpa/wuwpco/0212001.html
   My bibliography  Save this paper

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

Author

Listed:
  • Chokri Dridi
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.

Suggested Citation

  • Chokri Dridi, 2002. "A Short Note on the Numerical Approximation of the Standard Normal Cumulative Distribution and Its Inverse," Computational Economics 0212001, University Library of Munich, Germany, revised 07 Mar 2003.
  • Handle: RePEc:wpa:wuwpco:0212001
    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
    as

    Download full text from publisher

    File URL: https://econwpa.ub.uni-muenchen.de/econ-wp/comp/papers/0212/0212001.pdf
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Kenneth L. Judd, 1998. "Numerical Methods in Economics," MIT Press Books, The MIT Press, edition 1, volume 1, number 0262100711, April.
    2. Geweke, John, 1996. "Monte carlo simulation and numerical integration," Handbook of Computational Economics, in: H. M. Amman & D. A. Kendrick & J. Rust (ed.), Handbook of Computational Economics, edition 1, volume 1, chapter 15, pages 731-800, Elsevier.
    3. R. E. Odeh & J. O. Evans, 1974. "The Percentage Points of the Normal Distribution," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 23(1), pages 96-97, March.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. John Geweke & Joel Horowitz & M. Hashem Pesaran, 2006. "Econometrics: A Bird’s Eye View," CESifo Working Paper Series 1870, CESifo.
    2. Kenneth L. Judd & Lilia Maliar & Serguei Maliar & Inna Tsener, 2017. "How to solve dynamic stochastic models computing expectations just once," Quantitative Economics, Econometric Society, vol. 8(3), pages 851-893, November.
    3. Aruoba, S. Boragan & Fernandez-Villaverde, Jesus & Rubio-Ramirez, Juan F., 2006. "Comparing solution methods for dynamic equilibrium economies," Journal of Economic Dynamics and Control, Elsevier, vol. 30(12), pages 2477-2508, December.
    4. Eduardo Fé & Richard Hofler, 2013. "Count data stochastic frontier models, with an application to the patents–R&D relationship," Journal of Productivity Analysis, Springer, vol. 39(3), pages 271-284, June.
    5. Sándor, Z. & András, P., 2003. "Alternate Samplingmethods for Estimating Multivariate Normal Probabilities," Econometric Institute Research Papers EI 2003-05, Erasmus University Rotterdam, Erasmus School of Economics (ESE), Econometric Institute.
    6. Heiss, Florian & Winschel, Viktor, 2006. "Estimation with Numerical Integration on Sparse Grids," Discussion Papers in Economics 916, University of Munich, Department of Economics.
    7. Yu, Jie & Goos, Peter & Vandebroek, Martina, 2010. "Comparing different sampling schemes for approximating the integrals involved in the efficient design of stated choice experiments," Transportation Research Part B: Methodological, Elsevier, vol. 44(10), pages 1268-1289, December.
    8. H. D. Vinod & B. D. McCullough, 1999. "The Numerical Reliability of Econometric Software," Journal of Economic Literature, American Economic Association, vol. 37(2), pages 633-665, June.
    9. Heiss, Florian & Winschel, Viktor, 2008. "Likelihood approximation by numerical integration on sparse grids," Journal of Econometrics, Elsevier, vol. 144(1), pages 62-80, May.
    10. Adnan Haider Bukhari & Safdar Ullah Khan, 2008. "A Small Open Economy DSGE Model for Pakistan," The Pakistan Development Review, Pakistan Institute of Development Economics, vol. 47(4), pages 963-1008.
    11. Richard Pierse, 2006. "Optimal control in nonlinear models: a generalised Gauss-Newton algorithm with analytic derivatives," School of Economics Discussion Papers 0906, School of Economics, University of Surrey.
    12. Andrew Patton, 2002. "(IAM Series No 001) On the Out-Of-Sample Importance of Skewness and Asymetric Dependence for Asset Allocation," FMG Discussion Papers dp431, Financial Markets Group.
    13. Francisco Gallego & Andrés Hernando, 2009. "School Choice in Chile: Looking at the Demand Side," Documentos de Trabajo 356, Instituto de Economia. Pontificia Universidad Católica de Chile..
    14. Claude Hillinger, 2002. "A General Theory of Price and Quantity Aggregation and Welfare Measurement," CESifo Working Paper Series 818, CESifo.
    15. Salerno, Gillian & Beard, Rodney & McDonald, Stuart, 2007. "Rent Seeking Behavior and Optimal Taxation of Pollution in Shallow Lakes," MPRA Paper 11225, University Library of Munich, Germany, revised 22 Oct 2008.
    16. Maria Casanova-Rivas, 2008. "Dynamic Complementarities: A Computational and Empirical Analysis of Couples' Retirement Decisions," 2008 Meeting Papers 1073, Society for Economic Dynamics.
    17. Heer, Burkhard & Polito, Vito & Wickens, Michael R., 2020. "Population aging, social security and fiscal limits," Journal of Economic Dynamics and Control, Elsevier, vol. 116(C).
    18. Andreas Lanz & Gregor Reich & Ole Wilms, 2022. "Adaptive grids for the estimation of dynamic models," Quantitative Marketing and Economics (QME), Springer, vol. 20(2), pages 179-238, June.
    19. Karantounias, Anastasios G., 2023. "Doubts about the model and optimal policy," Journal of Economic Theory, Elsevier, vol. 210(C).
    20. Pelin Ilbas, 2006. "Optimal Monetary Policy rules for the Euro area in a DSGE framework," Working Papers of Department of Economics, Leuven ces0613, KU Leuven, Faculty of Economics and Business (FEB), Department of Economics, Leuven.

    More about this item

    Keywords

    C/C++ Gauss-Legendre Quadarture Normal distribution Numerical Integration Rational fraction approximations Software;

    JEL classification:

    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • C88 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Other Computer Software
    • C89 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Other

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:wpa:wuwpco:0212001. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: EconWPA (email available below). General contact details of provider: https://econwpa.ub.uni-muenchen.de .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.