Scipy-statistics with distributions

The Scipy statistics functions last presented here have now been updated with the addition of links to the numerous distribution functions.

The py_Stats spreadsheet, with associated Python code in PythonStatsFuncs3.py and pyScipy3.py, and also minor updates to the pyNumpy.py code, are included in the download file:

py_SciPy.zip

Details of the required pyxll package (including download, free trial, and full documentation) can be found at: pyxll

For those installing a new copy of pyxll, a 10% discount on the first year’s fees is available using the coupon code “NEWTONEXCELBACH10”.

The Scipy distribution functions are divided into Continuous, Multivariate, and Discrete. There are 114 continuous functions, each with a large number of different methods. All of these functions can be called from Excel with the py_rv_continuous function, specifying the required distribution and associated method, followed by required arguments, then any optional arguments, listed in dictionary format. There are also specific functions calling the Normdist and Norminvgauss functions, as shown below:

The spreadsheet lists all the available methods of the Normdist function, with required and optional arguments. Help on the methods of the other distributions can be found at the linked on-line help.

For the multivariate functions there is more variation in the function arguments, so each function has an associated Excel function, with an example on the spreadsheet:

All the functions are listed on the spreadsheet with a short description and a link to the associated on-line help:

The on-line help may also be accessed when entering the function in the spreadsheet, using the “help on this function” link at the bottom-left of the function dialog:

The Multivariate and Discrete functions are also listed on the spreadsheet, with a link to the on-line help for each:

Note that this is a work in progress, and that Excel functions have not yet been created for the Discrete list.

This entry was posted in Arrays, Excel, Link to Python, Maths, Newton, NumPy and SciPy, Python Pandas, PyXLL, UDFs and tagged , , , , , , , , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.