Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « scipy.special »

Fonction nbdtrc - module scipy.special

Signature de la fonction nbdtrc

Description

nbdtrc.__doc__

nbdtrc(x1, x2, x3, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

nbdtrc(k, n, p)

Negative binomial survival function.

Returns the sum of the terms `k + 1` to infinity of the negative binomial
distribution probability mass function,

.. math::

    F = \sum_{j=k + 1}^\infty {{n + j - 1}\choose{j}} p^n (1 - p)^j.

In a sequence of Bernoulli trials with individual success probabilities
`p`, this is the probability that more than `k` failures precede the nth
success.

Parameters
----------
k : array_like
    The maximum number of allowed failures (nonnegative int).
n : array_like
    The target number of successes (positive int).
p : array_like
    Probability of success in a single event (float).

Returns
-------
F : ndarray
    The probability of `k + 1` or more failures before `n` successes in a
    sequence of events with individual success probability `p`.

Notes
-----
If floating point values are passed for `k` or `n`, they will be truncated
to integers.

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

.. math::
    \mathrm{nbdtrc}(k, n, p) = I_{1 - p}(k + 1, n).

Wrapper for the Cephes [1]_ routine `nbdtrc`.

References
----------
.. [1] Cephes Mathematical Functions Library,
       http://www.netlib.org/cephes/