Skip to content

Reject invalid alpha in exact permutation run floors - #6

Merged
RishabhPande merged 2 commits into
mainfrom
fix-exact-run-alpha
Nov 12, 2026
Merged

RishabhPande merged 2 commits into
mainfrom
fix-exact-run-alpha

Conversation

@RishabhPande

Copy link
Copy Markdown
Owner

Fix

Reject non-finite alpha and values outside (0, 1) in min_runs_for_exact_run_test. Negative alpha can keep searching indefinitely; alpha=0 returned a spurious 541-run floor through floating-point underflow, and NaN silently returned 2. Valid-alpha results are unchanged. The docstring now describes the existing inclusive p <= alpha threshold.

Tests

Eight regression cases cover invalid alpha and reachable p-value boundaries. Full suite: 56 passed. Only power.py and tests/test_agentstats.py are changed.

@RishabhPande
RishabhPande merged commit 82b3191 into main Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant