scipy.special.pdtrik — SciPy v1.15.2 Manual (original) (raw)

scipy.special.pdtrik(p, m, out=None) = <ufunc 'pdtrik'>#

Inverse to pdtr vs k.

Parameters:

parray_like

Probability

marray_like

Shape parameter (nonnegative, real)

outndarray, optional

Optional output array for the function results

Returns:

scalar or ndarray

The number of occurrences k such that pdtr(k, m) = p

See also

pdtr

Poisson cumulative distribution function

pdtrc

Poisson survival function

pdtri

inverse of pdtr with respect to m

Examples

import scipy.special as sc

Compute the CDF for several values of k:

k = [1, 2, 3] p = sc.pdtr(k, 2) p array([0.40600585, 0.67667642, 0.85712346])

Compute the inverse. We recover the values of k, as expected:

sc.pdtrik(p, 2) array([1., 2., 3.])