Command line utilities for statistics, odds, and probabilities
Project description
pythodds
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 (
binomcommand) - 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythodds-0.2.1.tar.gz.
File metadata
- Download URL: pythodds-0.2.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2bdb4c65bcbc52643d64f7603699473ad0f0de733258d94e981ef6e3cee93f3
|
|
| MD5 |
c29df03cc6aace751d8f19027b66b36b
|
|
| BLAKE2b-256 |
9cae93ba6c1541d75ad9d92e704e1adf440e976507c493aafee006c59f3314e8
|
File details
Details for the file pythodds-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pythodds-0.2.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deaed25a6815ab66174183e8f65410ac3855061162d8ecaa2f545a830524150e
|
|
| MD5 |
409def5a7e3ce2ad72c17c436c4b98b8
|
|
| BLAKE2b-256 |
d9745681f9710c0626f90b5b5f1f462818b37af2a88212b181871d9a3919f3ea
|