Metadata-Version: 2.4
Name: exactpower
Version: 0.1.0
Summary: Exact power of Fisher's exact test for a planned 2x2 study (free core)
Author: Groundplane Labs
License: MIT
Project-URL: Homepage, https://groundplane0.gumroad.com/l/tyevqe
Keywords: power analysis,sample size,fisher exact test,exact test,statistics,biostatistics
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Dynamic: license-file

# exactpower

Free core of ExactPower: exact power of Fisher's exact test for a planned 2x2 study.

**The problem**
You are planning a study with two groups and a yes/no outcome, and you need to pick a sample size before you collect data. The usual power calculators use approximations that drift exactly where small samples matter most. Search terms: exact power Fisher test Python, sample size Fisher exact test, power analysis 2x2 Python.

**What it does**
`exact_power_fisher(n1, n2, p1, p2)` computes the exact rejection probability of the two-sided Fisher exact test under your planned design. Give it the group sizes and the event rates you expect, and it enumerates every possible outcome. No approximation, no simulation. The free version handles n1 + n2 up to 1000.

**Limits**
Free version: two-sided power only, n1 + n2 <= 1000. Larger studies are refused outright instead of hanging. No sample-size inversion, no Monte Carlo power estimator, no plots, no CLI.

**Install**

```bash
pip install exactpower
```

Needs Python 3.9 or newer, NumPy, and SciPy.

```python
from exactpower import exact_power_fisher
print(exact_power_fisher(60, 60, 0.55, 0.30))
```

This is the free core: two-sided exact power for a planned 2x2 design, capped at n1 + n2 <= 1000. The full version ($30, one-time) goes to n1 + n2 = 5000 and adds sample-size inversion, Monte Carlo power for r-by-c tables, and one-sided power: https://groundplane0.gumroad.com/l/tyevqe
