# conditional on the total, what is the distribution of negative binomials

If $x_1, x_2, \ldots, x_n$ are i.i.d. negative binomial, then what is the distribution of $(x_1, x_2, \ldots, x_n)$ given

$x_1 + x_2 + \ldots + x_n = N\quad$?

$N$ is fixed.

If $x_1, x_2, \ldots, x_n$ are Poisson then, conditional on the total, $(x_1, x_2, \ldots, x_n)$ is multinomial. I am not sure if it is true for negative binomial, since it is a mixture Poisson.

In case you want to know, this is not a homework problem.

• Given the connection between Gamma distributions and the Dirichlet, my first guess would be that - at least given appropriate restrictions on the Negative binomials - it might turn out in some cases to be Dirichlet-multinomial. – Glen_b -Reinstate Monica Dec 7 '12 at 6:25
• Googling around the terms in your post and my comment produces some hits that suggest that this might be a fruitful line to pursue. – Glen_b -Reinstate Monica Dec 7 '12 at 6:33

Sorry for the late answer, but this bugged me as well and I found the answer. The distribution is indeed Dirichlet-Multinomial and the individual neg. binomial distributions don't even need to be identical, as long as their Fano factor (ratio of variance to mean) is identical.

If you parameterize NB as:

$$p(X = x | \lambda, \theta) = NB(x | \lambda, \theta) = {{\theta^{-1} \lambda + x - 1} \choose {x}} \left ( \frac{1}{1 + \theta^{-1}} \right)^x \left ( \frac{\theta^{-1}}{1 + \theta^{-1}} \right)^{\theta^{-1} \lambda}$$

Then $$E(X) = \lambda$$ and $$Var(X) = \lambda (1 + \theta)$$ and

$$\forall i: X_i \sim NB(\lambda_i, \theta)$$ implies

$$\sum X_i \sim NB(\sum \lambda_i, \theta)$$

Then taking the probability given the sum:

$$\frac{\prod NB(x_i | \lambda_i, \theta)}{NB(\sum x_i | \sum \lambda_i, \theta)} = \frac{\left(\frac{1}{1+\theta^{-1} } \right) ^{\sum x_i} \left(\frac{\theta^{-1} }{1+\theta^{-1} } \right) ^{\theta^{-1} \sum \lambda_i} \prod {{\theta^{-1} \lambda_i + x_i - 1} \choose {x_i}}} { \left(\frac{1}{1+\theta^{-1} } \right) ^{\sum x_i} \left(\frac{\theta^{-1} }{1+\theta^{-1} } \right) ^{\theta^{-1} \sum \lambda_i} {{\theta^{-1} \sum\lambda_i + \sum x_i - 1} \choose {\sum x_i}}} = \\ = \frac{\Gamma(\sum x_i + 1) \Gamma(\theta^{-1} \sum\lambda_i) }{\Gamma(\theta^{-1} \sum\lambda_i + \sum x_i) } \prod \frac{ \Gamma(\theta^{-1}\lambda_i + x_i)}{\Gamma(x_i + 1) \Gamma(\theta^{-1}\lambda_i)} \\ =DM(x_1, ..., x_n| \theta^{-1}\lambda_1, ... , \theta^{-1} \lambda_n)$$

where $$DM$$ is the Dirichlet-Multinomial likelihood. This results simply from the fact that except for the multinomial coefficients, a lot of the terms in the fraction on the left hand side cancel out, leaving you only with the gamma function terms that happen to be the same as in the DM likelihood.

Also note that the parameters of this model are not identifiable as increase in $$\theta$$ with simultaneous decrease in all $$\lambda_i$$ results in exactly the same likelihood.

The best reference I have for this is sections 2 to 3.1 of Guimarães & Lindrooth (2007): Controlling for overdispersion in grouped conditional logit models: A computationally simple application of Dirichlet-multinomial regression - it is unfortunately paywalled, but I was not able to find a non-paywalled reference.