maxframe.tensor.special.betainc#
- maxframe.tensor.special.betainc(a, b, x, out=None, **kwargs)[source]#
Regularized incomplete beta function.
Computes the regularized incomplete beta function, defined as [1]:
\[I_x(a, b) = \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} \int_0^x t^{a-1}(1-t)^{b-1}dt,\]for \(0 \leq x \leq 1\).
This function is the cumulative distribution function for the beta distribution; its range is [0, 1].
- Parameters:
a (array_like) – Positive, real-valued parameters
b (array_like) – Positive, real-valued parameters
x (array_like) – Real-valued such that \(0 \leq x \leq 1\), the upper limit of integration
out (ndarray, optional) – Optional output array for the function values
- Returns:
Value of the regularized incomplete beta function
- Return type:
scalar or ndarray
See also
betabeta function
betaincinvinverse of the regularized incomplete beta function
betaincccomplement of the regularized incomplete beta function
scipy.stats.betabeta distribution
Notes
The term regularized in the name of this function refers to the scaling of the function by the gamma function terms shown in the formula. When not qualified as regularized, the name incomplete beta function often refers to just the integral expression, without the gamma terms. One can use the function beta from scipy.special to get this “nonregularized” incomplete beta function by multiplying the result of
betainc(a, b, x)bybeta(a, b).betainc(a, b, x)is treated as a two parameter family of functions of a single variable x, rather than as a function of three variables. This impacts only the limiting casesa = 0,b = 0,a = inf,b = inf.In general
\[\lim_{(a, b) \rightarrow (a_0, b_0)} \mathrm{betainc}(a, b, x)\]is treated as a pointwise limit in
x. Thus for example,betainc(0, b, 0)equals0forb > 0, although it would be indeterminate when considering the simultaneous limit(a, x) -> (0+, 0+).This function wraps the
ibetaroutine from the Boost Math C++ library [2].References