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/yourusername/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/yourusername/pythodds.git
cd pythodds
pip install -e .

License

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

Author

Your Name - @yourusername

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.2.0.tar.gz (15.5 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.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pythodds-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4812026ba3b1f566ecd422933eff0b42e4e282e60f0a4a661c62122c87de0980
MD5 d1752c5a14d3a169ba5bfb6cd67a5b62
BLAKE2b-256 520751c62d48d38e06d76a27203cb4111f2ab9f9abf1a1f4517ae16d9b077eaa

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pythodds-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4b80a4037b24cf1df6624f23517a64175f97494dfa4629777cdcff4787e272
MD5 99f03927d7cdfd6abfb4ef83e80301e1
BLAKE2b-256 6aa63e14025266701c65fd91efca147da4f21e9d859bf59f98534bf9465a31b6

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