6.9 The negative binomial model

As said before, the negative binomial distribution (called also pascal) could be an alternative if the overdispersion problem is present. This is because, this distribution allows to have different values for the mean and the variance. Formally, the probability mass function of this model is given by:

\[\begin{equation} Pr(x=k|r,p)=\begin{pmatrix}k+r-1\\r-1\end{pmatrix}p^r(1-p)^{k} \tag{6.75} \end{equation}\]

Where \(k\) is the number of failures until we hit the \(r^{th}\) success in a sequence of independent Bernoulli trials with probability of success equals to \(p\).

The name of negative binomial comes from the following:

\[\begin{equation*} \begin{pmatrix}k+r-1\\r-1\end{pmatrix}=(-1)^k\begin{pmatrix}-r\\k\end{pmatrix} \end{equation*}\]

Similar to binomial factor \(\begin{pmatrix}r\\k\end{pmatrix}\) but negative \(\begin{pmatrix}-r\\k\end{pmatrix}\)

The mean and the variance are:

\[\begin{equation*} \begin{cases} E(X)=\frac{r(1-p)}{p}\\ Var(X)=\frac{r(1-p)}{p^2} \end{cases} \end{equation*}\]

We can then derive the variance in terms of the mean as follows:

\[\begin{equation} Var(X)=E(X)+\frac{1}{r}E(X)^2 \tag{6.76} \end{equation}\]

The factor \(\frac{1}{r}\) is called the dispersion parameter, or clumping parameter.

The model when uses the formula (6.76) is called NB2, because sometimes the model uses the following formula:

\[\begin{equation*} Var(X)=E(X)+\frac{1}{r}E(X) \end{equation*}\]

It is called NB1.

To allow the parameter \(r\) to have any real value, we can rewrite \(p\) and \(r\) in terms of \(E(X)\) and \(Var(X)\), and rewrite also the negative binomial factor using Gamma as follows:

\[\begin{equation} Pr(x=k)=\frac{\Gamma(r+k)}{k!\Gamma(r)}\Bigg(\frac{r}{r+E(X)}\Bigg)^r\Bigg(\frac{E(X)}{r+E(X)}\Bigg)^k \quad for \quad k=0,1,.. \tag{6.77} \end{equation}\]

The negative binomial model estimates the same regression equation (6.69) as with the Poisson model,so it will give the same regression coefficients. However, this model corrects the estimated variance of the predicted counts using the dispersion parameter.