BayesSizer
BayesSizer is a Bayesian sample size calculator. It helps data scientists and experimenters determine the required sample size for A/B tests using Bayesian inference.
Features
- Computes Bayesian-based sample sizes for A/B testing
- Supports configurable Type I (α) and Type II (β) error rates
- Designed for data science and experimentation teams
- Lightweight, simple, and efficient
Installation
Install BayesSizer from PyPI:
pip install bayessizer
Usage
from bayessizer import bayesian_sample_size
# Example: Calculate required sample size with default parameters
sample_size = bayesian_sample_size(alpha=0.05, beta=0.2, effect_size=0.1, std_dev=1)
print(f"Required sample size per group: {sample_size}")
Parameters
alpha(float): Type I error rate (default: 0.05)beta(float): Type II error rate (default: 0.2)effect_size(float): Minimum detectable effect size (default: 0.1)std_dev(float): Standard deviation of the population (default: 1)
Example Output
Required sample size per group: 385
Running Tests
To ensure correctness, run:
pytest tests/
Contributing
We welcome contributions! Feel free to submit issues or pull requests.
License
This project is licensed under the MIT License.
Metadata
Release files for bayes-sizer 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bayes_sizer-1.0.3.tar.gz | 3.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bayes_sizer-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / bayes_sizer-1.0.3.tar.gz
| Download URL | bayes_sizer-1.0.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce7bf710f54c29d31b230e052b9f3efe12d583aefb61377b0e82d9216a5afa3a
|
|
BLAKE2b-256 checksum How to use checksums |
3608c2dbd3a12ce29fe3c6af62e6ecc00c4e1773514c1a2ba059d286ebf09e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / bayes_sizer-1.0.3-py3-none-any.whl
| Download URL | bayes_sizer-1.0.3-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2588485a4e3d8d6c1d2cee5c54b49f788c39b8f981613aaf9705c12189222579
|
|
BLAKE2b-256 checksum How to use checksums |
4de0372f54299b5c602123e5914eec6a2deb6a83379947ceecfd86617ff05e7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for bayes-sizer 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.