Skip to main content

Command line utilities for statistics, odds, and probabilities

Project description

pythodds

PyPI version Python 3.13+ License: MIT

A command-line utility and Python library for calculating statistics, odds, and probabilities.

Features

  • Binomial Distribution: Calculate PMF, CDF, and survival functions for binomial distributions
  • Command-line Interface: Easy-to-use CLI tool (binom command)
  • Pure Python: No external dependencies

Installation

Install from PyPI:

pip install pythodds

Or install from source:

git clone https://github.com/ncarsner/pythodds.git
cd pythodds
pip install -e .

Usage

Command Line

# Calculate binomial distribution probabilities
binom -n 10 -k 3 -p 0.4

# Specify a target and minimum probability threshold
binom -n 100 -k 30 -p 0.35 --target 40 --min-prob 0.05

Python Library

from src.utils.binomial_distribution import binomial_pmf, binomial_cdf_le, binomial_cdf_ge

# P(X = 3) for Binomial(n=10, p=0.4)
pmf = binomial_pmf(10, 3, 0.4)

# P(X <= 3) for Binomial(n=10, p=0.4)
cdf = binomial_cdf_le(10, 3, 0.4)

# P(X >= 3) for Binomial(n=10, p=0.4)
survival = binomial_cdf_ge(10, 3, 0.4)

Development

Clone the repository and install in editable mode:

git clone https://github.com/ncarsner/pythodds.git
cd pythodds
pip install -e .

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Nicholas Carsner

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

pythodds-0.3.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

pythodds-0.3.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file pythodds-0.3.0.tar.gz.

File metadata

  • Download URL: pythodds-0.3.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for pythodds-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6d4ab8c0cdac9c460e8ac5b2146376b98e1e7431f9371894de96456729669c17
MD5 6c504d3d706a63ab0a61719c9f60e140
BLAKE2b-256 5c6131b104970de6b3011b01e4644b044d0ac0397bc3b59c40a13f2d6e2479c2

See more details on using hashes here.

File details

Details for the file pythodds-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pythodds-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for pythodds-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f226b2e2b1207cea49d0573d5a6e9cfee42093a759e9d3e32e719c2540bc1788
MD5 43c9351769c33547772e5d1272692ecf
BLAKE2b-256 d104c2c9add37404df8033ab3cbcf5074a922777b2f0455f76ac29179f05db4d

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