Skip to content

fisherExactTest(table, options?): FisherExactTestResult

Defined in: packages/hypothesis-test/src/fisher-exact-test.ts:40

Test conditional independence in a 2×2 table with fixed margins. One-sided tails include the observed top-left count, and a zero margin gives a p-value of one. The two-sided test sums all tables whose mass is at most the observed table’s mass, with a relative allowance of 1e-7. Time is linear in the number of tables with the margins supplied. The calculation uses constant working storage.

FisherExactTestTable

FisherExactTestOptions

FisherExactTestResult

With INVALID_TABLE, INVALID_COUNT, or INVALID_OPTION.

With INVALID_PARAMETER outside the supported hypergeometric parameter domain.