I have a count process that I’d like to model with a Poisson process. Data is measured every 30 minutes, and with a poisson distribution I can easily measure the probability of a given count of events being anomalous in different time periods using a fitted value of lambda, i.e. "is the number of events we’ve seen in the 30 min anomalous? What about the last hour? Is the number of events we’ve seen in the last 1.5 hours anomalous?", etc.
The problem is that my data is overdispersed, and definitely is described well by a negative binomial distribution. I’m choosing to use the parameters $(mu, alpha)$ since that’s what PyMC3 uses, where $mu$ is equivalent to lambda from the poisson distribution.
Is there a way to utilize the negative binomial parameters in the same way as the poisson rate parameter where I see if an event count is anomalous in some time period t (where I can extend t to different time periods)?