scipy.special.betaincinv#

scipy.special.betaincinv(a, b, y, out=None) = <ufunc 'betaincinv'>#

Inverse of the incomplete beta function.

Computes \(x\) such that:

\[y = I_x(a, b) = \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} \int_0^x t^{a-1}(1-t)^{b-1}dt,\]

where \(I_x\) is the normalized incomplete beta function betainc and \(\Gamma\) is the gamma function [1].

Parameters
a, barray-like

Positive, real-valued parameters

yarray-like

Real-valued input

outndarray, optional

Optional output array for function values

Returns
array-like

Value of the inverse of the incomplete beta function

See also

betainc

incomplete beta function

gamma

gamma function

References

1

NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/8.17

Examples

>>> import scipy.special as sc

This function is the inverse of betainc for fixed values of \(a\) and \(b\).

>>> a, b = 1.2, 3.1
>>> y = sc.betainc(a, b, 0.2)
>>> sc.betaincinv(a, b, y)
0.2
>>>
>>> a, b = 7.5, 0.4
>>> x = sc.betaincinv(a, b, 0.5)
>>> sc.betainc(a, b, x)
0.5