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 ndtri_exp - module scipy.special

Signature de la fonction ndtri_exp

Description

ndtri_exp.__doc__

ndtri_exp(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

ndtri_exp(y)

Inverse of `log_ndtr` vs x. Allows for greater precision than
`ndtri` composed with `numpy.exp` for very small values of y and for
y close to 0.

Parameters
----------
y : array_like of float

Returns
-------
scalar or ndarray
    Inverse of the log CDF of the standard normal distribution, evaluated
    at y.

Examples
--------
>>> import scipy.special as sc

`ndtri_exp` agrees with the naive implementation when the latter does
not suffer from underflow.

>>> sc.ndtri_exp(-1)
-0.33747496376420244
>>> sc.ndtri(np.exp(-1))
-0.33747496376420244

For extreme values of y, the naive approach fails

>>> sc.ndtri(np.exp(-800))
-inf
>>> sc.ndtri(np.exp(-1e-20))
inf

whereas `ndtri_exp` is still able to compute the result to high precision.

>>> sc.ndtri_exp(-800)
-39.88469483825668
>>> sc.ndtri_exp(-1e-20)
9.262340089798409

See Also
--------
log_ndtr, ndtri, ndtr