bayesplain.core.gamma_poisson.predictive

bayesplain.core.gamma_poisson.predictive(events, exposure, new_exposure=1.0, a=0.5, b=0.0)[source]

Posterior predictive distribution of the count over a new exposure.

A Gamma mixture of Poissons is a negative binomial, so the forecast is exact.

Parameters:
events : int

Events counted so far.

exposure : float

Exposure they were counted over.

new_exposure : float, default 1.0

Exposure to forecast over, in the same units.

a : float

Prior shape and rate parameter.

b : float

Prior shape and rate parameter.

Returns:

Negative binomial over the count of future events.

Return type:

scipy.stats.rv_discrete_frozen