distributions.Poisson
Poisson claim counts with mean lam.
Usage
distributions.Poisson()Parameters
lam: float- Mean number of claims; must be finite and non-negative.
Raises
ValueError- If lam is negative or not finite.
Examples
>>> from prospicio.distributions import Poisson
>>> n = Poisson(3.0)
>>> round(n.pmf(0), 6)0.049787
Attributes
| Name | Description |
|---|---|
| lam | The mean number of claims. |
lam
The mean number of claims.
lam: float
Methods
| Name | Description |
|---|---|
| cdf() |
P(N <= k).
|
| mean() | Mean of the claim count. |
| pmf() |
P(N = k).
|
| quantile() |
Smallest k with P(N <= k) >= p.
|
| sample() |
n claim counts from stream stream of the generator keyed by
|
| variance() | Variance of the claim count. |
cdf()
P(N <= k).
Usage
cdf(k)Parameters
k: int
Returns
float
mean()
Mean of the claim count.
Usage
mean()Returns
float
pmf()
P(N = k).
Usage
pmf(k)Parameters
k: int
Returns
float
quantile()
Smallest k with P(N <= k) >= p.
Usage
quantile(p)Parameters
p: float-
Probability in
[0, 1).
Returns
int
Raises
ValueError-
If p is outside
[0, 1].
sample()
n claim counts from stream stream of the generator keyed by
Usage
sample(n, seed, stream=0)seed.
Parameters
n: intseed: intstream: int = 0
Returns
list of int
variance()
Variance of the claim count.
Usage
variance()Returns
float