Skip to content

regularizedIncompleteBeta

regularizedIncompleteBeta(a, b, x, options?): number

Defined in: packages/math-analysis/src/regularized-incomplete-beta.ts:47

The regularized incomplete beta Iₓ(a, b) — the fraction of a Beta(a, b) distribution lying at or below x.

The Beta distribution describes a proportion — a success rate, a share, a probability you are uncertain about — and this is its cumulative function. Through it come the tail probabilities of Student’s t, the F distribution and the binomial, which is why it turns up far more often than its name suggests.

Regularized is stated rather than implied: this is the ratio in [0, 1], not the unnormalised integral B(x; a, b). Libraries disagree on which the bare name means, and regularizedIncompleteGamma spells it out for the same reason.

Relative error is a few ulps for ordinary parameters and stays within a few dozen for extreme ones.

O(maxIterations) continued-fraction steps in the worst case, and far fewer in practice; O(1) memory.

number

First shape parameter, positive.

number

Second shape parameter, positive.

number

Point of evaluation, in [0, 1].

ConvergenceOptions

Termination criteria; tolerance is relative and defaults to Number.EPSILON, maxIterations to 1000.

number

Iₓ(a, b), in [0, 1].

regularizedIncompleteBeta(2, 3, 0.5); // 0.6875
regularizedIncompleteBeta(0.5, 0.5, 0.5); // 0.49999999999999944 — the arcsine law
```;
## Throws
When `a ≤ 0`, `b ≤ 0`, or `x` is outside `[0, 1]`.
## Throws
When the continued fraction met no tolerance.
## See
- [inverseRegularizedIncompleteBeta](inverseRegularizedIncompleteBeta.md) to go the other way.
- [Incomplete gamma and beta](https://anthochamp.pages.grenadine.io/node-essentials/topics/math/functions/incomplete-gamma-beta/)