## The negative binomial distribution 2 a Poisson process with varying rate parameter and the gamma density

We begin with a simple enough situation: imagine a Poisson process in which the parameter itself has a probability distribution. For example, we might set up an experiment to monitor the emergence of DrosopMa from patches of rotting fruit or vegetables in which we have controlled the number of eggs laid in the patch. Emergence from an individual patch could be modeled as a Poisson process but because individual patch characteristics vary, the rate parameter might be different for different patches. In that case, we reinterpret Eq. (3.38) as

and we understand that l has a probability distribution. Since l is a naturally continuous variable, we assume that it has a probability densityfT). The product Pr{k events|1} f(1)d1 is the probability that the rate parameter falls in the range 1 to 1 + d1 and we observe k events. The probability of observing k events will be the integral of this product over all possible values of the rate parameter. Since it only makes sense to think about a positive value for the rate parameter, we conclude that

Equation (3.51) is often referred to as a mixture of Poisson processes. To actually compute the integral on the right hand side, we need to make further decisions. We might decide, for example, to replace the continuous probability density by an approximation involving a discrete number of choices of l.

One classical, and very helpful, choice is that f (1) is a gamma probability density function. And before we go any further with the negative binomial distribution, we need to understand the gamma probability density for the rate parameter. There will be some detail, and perhaps some of it will be mysterious (why I make certain choices), but all becomes clear by the end of this section.

## Post a comment