Skip to main content
`Ctrl`+`K`

# scipy.special.bdtrc

scipy.special.bdtrc(k, n, p, out=None) = <ufunc 'bdtrc'>

  Binomial distribution survival function.

  Sum of the terms floor(k) + 1 through n of the binomial probability density,

  \[\mathrm{bdtrc}(k, n, p) = \sum_{j=\lfloor k \rfloor +1}^n {{n}\choose{j}} p^j (1-p)^{n-j}\]
  Parameters:
    k array_like

      Number of successes (double), rounded down to nearest integer.

    n array_like

      Number of events (int)

    p array_like

      Probability of success in a single event.

    out ndarray, optional

      Optional output array for the function values

  Returns:
    y scalar or ndarray

      Probability of floor(k) + 1 or more successes in n independent events with success probabilities of p.

  See also

  `bdtr`
  `betainc`

  Notes

  The terms are not summed directly; instead the regularized incomplete beta function is employed, according to the formula,

  \[\mathrm{bdtrc}(k, n, p) = I_{p}(\lfloor k \rfloor + 1, n - \lfloor k \rfloor).\]

  Wrapper for the Cephes [1] routine `bdtrc`.

  Array API Standard Support

  `bdtrc` has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable `SCIPY_ARRAY_API=1` and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.

  Library | CPU | GPU
  --- | --- | ---
  NumPy | ✅ | n/a
  CuPy | n/a | ✅
  PyTorch | ✅ | ⛔
  JAX | ✅ | ⛔
  Dask | ✅ | n/a

  See Support for the array API standard for more information.

  References

  [1]

  Cephes Mathematical Functions Library, https://netlib.org/cephes/