Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Create a Poisson distribution from the mean.
Create a Poisson distribution from the mean.
Value parameters
- mu
-
the mean (rate) parameter
Attributes
- Returns
-
a Poisson distribution with the given mean
Perform a chi-squared goodness-of-fit test to assess whether the observed data follows a Poisson distribution.
Perform a chi-squared goodness-of-fit test to assess whether the observed data follows a Poisson distribution.
Groups observations into bins and computes the chi-squared statistic comparing observed to expected frequencies.
Value parameters
- lambda
-
the Poisson rate parameter (if None, uses MLE from data)
- minExpected
-
minimum expected frequency per bin (bins are combined to meet this threshold; a short upper tail is merged into the last full bin)
- observations
-
array of non-negative integer observations
Attributes
- Returns
-
Named tuple with
statistic: the chi-squared test statistic,degreesOfFreedom: the degrees of freedom, andpValue: the p-value of the test. Degrees of freedom arecells − 1, less one more whenlambdais estimated from the data.
Maximum likelihood estimation for Poisson parameter.
Maximum likelihood estimation for Poisson parameter.
For Poisson, the MLE of λ is simply the sample mean. This is exact and always converges in one step.
Value parameters
- observations
-
array of non-negative integer observations
Attributes
- Returns
-
Named tuple with
dist: the fitted Poisson distribution, andconverged: always true for Poisson MLE
Maximum likelihood estimation for volume-adjusted Poisson.
Maximum likelihood estimation for volume-adjusted Poisson.
For observations $n_j$ with corresponding volumes $v_j$, the Poisson model assumes $n_j \sim \text{Poisson}(\lambda v_j)$.
The MLE for $\lambda$ is: $$ \hat{\lambda} = \frac{\sum_j n_j}{\sum_j v_j} $$
Value parameters
- observations
-
non-negative counts $n_j$
- volumes
-
positive volume ratios $v_j$ (same units as modeled period)
Attributes
- Returns
-
tuple of fitted
Poisson(lambda)and a convergence flag (always true for Poisson)
Givens
Givens
JSON codec. Only lambda is written; derived state (sampler, RNG) is rebuilt on decode. Constructor validation failures surface as a io.circe.DecodingFailure.
JSON codec. Only lambda is written; derived state (sampler, RNG) is rebuilt on decode. Constructor validation failures surface as a io.circe.DecodingFailure.