Skip to content

binomialDistribution

binomialDistribution(trials, probability): Distribution

Defined in: binomial-distribution.ts:24

The binomial distribution — the number of successes in trials independent attempts, each succeeding with probability probability.

Both tails come from the regularized incomplete beta, which is an exact identity rather than an approximation: P(X ≤ k) = I₁₋ₚ(n − k, k + 1). That costs one continued fraction instead of a sum of k terms, and keeps the upper tail accurate where summing from the bottom and subtracting would not.

number

Number of attempts; a non-negative integer.

number

Success probability of one attempt, in [0, 1].

Distribution

The distribution.

When trials is not a non-negative integer, or probability is outside [0, 1].