scipy.special.beta — SciPy v1.15.3 Manual (original) (raw)
scipy.special.beta(a, b, out=None) = <ufunc 'beta'>#
Beta function.
This function is defined in [1] as
\[B(a, b) = \int_0^1 t^{a-1}(1-t)^{b-1}dt = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)},\]
where \(\Gamma\) is the gamma function.
Parameters:
a, barray_like
Real-valued arguments
outndarray, optional
Optional output array for the function result
Returns:
scalar or ndarray
Value of the beta function
See also
the gamma function
the regularized incomplete beta function
the natural logarithm of the absolute value of the beta function
References
Examples
import scipy.special as sc
The beta function relates to the gamma function by the definition given above:
sc.beta(2, 3) 0.08333333333333333 sc.gamma(2)*sc.gamma(3)/sc.gamma(2 + 3) 0.08333333333333333
As this relationship demonstrates, the beta function is symmetric:
sc.beta(1.7, 2.4) 0.16567527689031739 sc.beta(2.4, 1.7) 0.16567527689031739
This function satisfies \(B(1, b) = 1/b\):