Skip to content

binomialTest(successes, trials, options?): BinomialTestResult

Defined in: packages/hypothesis-test/src/binomial-test.ts:28

Test the success probability of independent Bernoulli trials. One-sided tails include the observed count. The two-sided test sums all outcomes whose mass is at most that of the observed count, with a relative allowance of 1e-7. Uses O(trials) time and constant working storage.

number

number

BinomialTestOptions

BinomialTestResult

With INVALID_COUNT, SUCCESSES_EXCEED_TRIALS, or INVALID_OPTION.

With INVALID_PARAMETER outside the supported binomial parameter domain.