scipy.special.pdtr¶
-
scipy.special.
pdtr
(k, m, out=None) = <ufunc 'pdtr'>¶ Poisson cumulative distribution function.
Defined as the probability that a Poisson-distributed random variable with event rate \(m\) is less than or equal to \(k\). More concretely, this works out to be [1]
\[\exp(-m) \sum_{j = 0}^{\lfloor{k}\rfloor} \frac{m^j}{m!}.\]- Parameters
- karray_like
Nonnegative real argument
- marray_like
Nonnegative real shape parameter
- outndarray
Optional output array for the function results
- Returns
- scalar or ndarray
Values of the Poisson cumulative distribution function
See also
References
Examples
>>> import scipy.special as sc
It is a cumulative distribution function, so it converges to 1 monotonically as k goes to infinity.
>>> sc.pdtr([1, 10, 100, np.inf], 1) array([0.73575888, 0.99999999, 1. , 1. ])
It is discontinuous at integers and constant between integers.
>>> sc.pdtr([1, 1.5, 1.9, 2], 1) array([0.73575888, 0.73575888, 0.73575888, 0.9196986 ])