Skip to main content

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. This means that you can translate code easily, without having to remember the argument types and conventions for NORM.INV and translate them to the ones used in normie.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

normie-0.3.2a3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

normie-0.3.2a3-cp313-cp313-win_amd64.whl (9.7 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file normie-0.3.2a3.tar.gz.

File metadata

  • Download URL: normie-0.3.2a3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Windows/10

File hashes

Hashes for normie-0.3.2a3.tar.gz
Algorithm Hash digest
SHA256 fc29dacd0ba8412071267e91cda5569362075bc160098bed243e09e6773bd33b
MD5 2cb566c1aa13ab71cb20111137e6870f
BLAKE2b-256 838fe948f9c30414367b84ac604f7d6f235fc45a19a7b964e7788202999e35d3

See more details on using hashes here.

File details

Details for the file normie-0.3.2a3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: normie-0.3.2a3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Windows/10

File hashes

Hashes for normie-0.3.2a3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5b31c1423348b7040ebf88c51239e5041993e62fca177b7ee7d15f9da8f1134a
MD5 46095251975e128a373ab057fc0c005b
BLAKE2b-256 d5054a2ad71d8f98af3a2b5c97c5164f693732c3ceb1a021a2bd3946ad75c2d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page