Accurate and efficient normal distribution statistics.
Project description
normie - Python package for normal distribution functions
Examples of use
>>> from normie import cdf, invcdf
>>> cdf(2.0)
0.9772498607635498
>>> invcdf(0.5)
0.0
How it works.
The package uses C code, to be found in src/normie_impl.c
The code uses a built-in function for the cumulative distribution function, and a polynomial approximation for the inverse.
Repository
normie/ Python code src/ C code tests/ Test code tools/ Used by poetry for build/test scripts build.py Defines how the package including C code is built LICENSE MIT License pyproject.toml Poetry is used for building, testing, dev environment... README.md This documentation
Compatibility functions
To make it easier to port code to Python or to make interoperable code, there are functions which are designed to be compatible with Excel functions for quantiles of the normal distribution.
>>> from normie.compat.excel import NORM_INV
>>> NORM_INV(0.23, 1, 0.5)
0.6305765807628632
Note that we don't make any effort to reproduce the exact value given by Excel. In particular, we are not trying to match any bugs (if there are any). We simply define the function NORM_INV to mean exactly what NORM.INV does in Excel, then provide our best possible evaluation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file normie-0.3.1.tar.gz
.
File metadata
- Download URL: normie-0.3.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.7.3 Linux/5.10.17-v7+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8ed30d61d108ea6cda11f3e6796cf5d4f3b0c5f276e59652d3d45d2b6715ebf |
|
MD5 | 60f0fcd59ad84e70395b7c0d72d7d7db |
|
BLAKE2b-256 | db70df8e454cb75711b787457f738937893cbac64365a65535fcd2edd3165980 |
File details
Details for the file normie-0.3.1-cp37-cp37m-manylinux_2_28_armv7l.whl
.
File metadata
- Download URL: normie-0.3.1-cp37-cp37m-manylinux_2_28_armv7l.whl
- Upload date:
- Size: 20.5 kB
- Tags: CPython 3.7m, manylinux: glibc 2.28+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.7.3 Linux/5.10.17-v7+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf4caa465dca0250c528b6f02d01816aae031239ef26dcdc318c7ab3fe5a98e7 |
|
MD5 | dce50d18dcc0caef4b8491d04237ad4f |
|
BLAKE2b-256 | cd64f0f606d87b3bbf736a78a7ae9f75c11b3ce8b9e772ebbb1b108ae1559466 |