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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé
Module « scipy.special »

Fonction betaincc - module scipy.special

Signature de la fonction betaincc

def betaincc(*args, **kwargs) 

Description

help(scipy.special.betaincc)

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

betaincc(a, b, x, out=None)

Complement of the regularized incomplete beta function.

Computes the complement of the regularized incomplete beta function,
defined as [1]_:

.. math::

    \bar{I}_x(a, b) = 1 - I_x(a, b)
                    = 1 - \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)} \int_0^x
                              t^{a-1}(1-t)^{b-1}dt,

for :math:`0 \leq x \leq 1`.

Parameters
----------
a, b : array_like
       Positive, real-valued parameters
x : array_like
    Real-valued such that :math:`0 \leq x \leq 1`,
    the upper limit of integration
out : ndarray, optional
    Optional output array for the function values

Returns
-------
scalar or ndarray
    Value of the regularized incomplete beta function

See Also
--------
betainc : regularized incomplete beta function
betaincinv : inverse of the regularized incomplete beta function
betainccinv :
    inverse of the complement of the regularized incomplete beta function
beta : beta function
scipy.stats.beta : beta distribution

Notes
-----
.. versionadded:: 1.11.0

This function wraps the ``ibetac`` routine from the
Boost Math C++ library [2]_.

References
----------
.. [1] NIST Digital Library of Mathematical Functions
       https://dlmf.nist.gov/8.17
.. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.

Examples
--------
>>> from scipy.special import betaincc, betainc

The naive calculation ``1 - betainc(a, b, x)`` loses precision when
the values of ``betainc(a, b, x)`` are close to 1:

>>> 1 - betainc(0.5, 8, [0.9, 0.99, 0.999])
array([2.0574632e-09, 0.0000000e+00, 0.0000000e+00])

By using ``betaincc``, we get the correct values:

>>> betaincc(0.5, 8, [0.9, 0.99, 0.999])
array([2.05746321e-09, 1.97259354e-17, 1.96467954e-25])


Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé