Skip to content

fix: validate Fisher categories across independent samples - #1965

Open
Ayushdevo wants to merge 3 commits into
evidentlyai:mainfrom
Ayushdevo:fix/fisher-category-counts-20261020
Open

Ayushdevo wants to merge 3 commits into
evidentlyai:mainfrom
Ayushdevo:fix/fisher-category-counts-20261020

Conversation

@Ayushdevo

Copy link
Copy Markdown

Validate binary categories across both samples and allow independent samples of unequal size. Add regression coverage for combined categories and unequal sample sizes.

Validation: tests/calculations/stattests and tests/stattests: 104 passed using this branch package. Full repository suite was not run. AI-assisted contribution.

@ptimizeroracle

Copy link
Copy Markdown

checked main's helper without the length guard against scipy, not on your branch: unequal sizes give the same p as fisher_exact on the literal table, and type I stays at or under 0.05 at 1000/50, 50/1000 and 200/200. on main {a,b} vs {b,c} gives p=0.0325 from a table where c became NaN, so the union check matters. the _fisher_exact_stattest docstring still says per sample

(i used an ai assistant to help run the checks)

This branch has not been deployed

No deployments
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.

2 participants