Skip to main content
`Ctrl`+`K`

# scipy.special.btdtrib

scipy.special.btdtrib(a, p, x, out=None) = <ufunc 'btdtrib'>

  Inverse of `betainc` with respect to b.

  This is the inverse of the beta cumulative distribution function, `betainc`, considered as a function of b, returning the value of b for which betainc(a, b, x) = p, or

  \[p = \int_0^x \frac{\Gamma(a + b)}{\Gamma(a)\Gamma(b)} t^{a-1} (1-t)^{b-1}\,dt\]
  Parameters:
    a array_like

      Shape parameter (a > 0).

    p array_like

      Cumulative probability, in [0, 1].

    x array_like

      The quantile, in [0, 1].

    out ndarray, optional

      Optional output array for the function values

  Returns:
    b scalar or ndarray

      The value of the shape parameter b such that betainc(a, b, x) = p.

  See also

  `betainc`

    Regularized incomplete beta function

  `betaincinv`

    Inverse of the regularized incomplete beta function with respect to x.

  `btdtria`

    Inverse of the beta cumulative distribution function, with respect to a.

  Notes

  Wrapper for the ibeta_invb routine from the Boost Math C++ library [1].

  References

  [1]

  The Boost Developers. “Boost C++ Libraries”. https://www.boost.org/.

  Examples

      >>> import scipy.special as sc
      >>> a, b, x = 1.2, 3.1, 0.2
      >>> y = sc.betainc(a, b, x)

  `btdtrib` is the inverse of `betainc` for fixed values of \(a\) and \(x\):

      >>> sc.btdtrib(a, y, x)
      3.1