empiricaldist

empiricaldist#

empiricaldist is a Python library that provides classes to represent empirical distributions – that is, distributions based on data rather than mathematical functions. It includes four equivalent ways to represent a distribution: PMF (Probability Mass Function), CDF (Cumulative Distribution Function), Survival function and Hazard Function. It provides methods to convert from one representation to the others, and methods to perform a variety of operations.

This library is used extensively in Think Stats, Think Bayes, Elements of Data Science, and Think Complexity – but it is intended to be a stand-alone library for general use, not just for my books.

For an introduction to the API, you can read this notebook or run it on Colab.

API Reference documentation is here.

Installation#

To install empiricaldist with pip from PyPI:

pip install empiricaldist

Or with conda from conda-forge:

conda install conda-forge::empiricaldist 

License#

empiricaldist is available under the BSD 3-clause license. See the LICENSE file for more details.