# Distribution of sum of negative binomial parametrized with varying mean and constant aggregation parameter

From textbook, I know that:
If each $X_i$ is distributed as negative binomial $(r_i,p)$ then $\sum X_i$ is distributed as negative binomial $(\sum r_i ,p)$.
In R: dnbinom(x, size=r, prob=p)

However, I use a parametrization of negative binomial using mean and aggregation parameter [in R: dnbinom(x, size, mu) ]

What can I say from the sum of $X_i$ with such parametrization ?

I come back to this question because finally the previous discussion does not solve my problem. From textboook, I know that NB(size1, prob)+NB(size2, prob)=NB(size1+size2, prob). But I use the parametrization: NB(size, mu) and then I need to know: NB(size, mu1)+NB(size, mu2) with size being constant. Note that mu=size*(1-prob)/prob and then prob=size/(size+mu)

Then prob is not a constant because it varies with mu and I cannot apply the solution with constant prob.

Based on simulations, it seems that : NB(size, mu1)+NB(size, mu2) = NB(size?, mu1+mu2)

Have you an idea about the solution to estimate the value of size?

Exemple of simulation in R language

size <- 1
mu1 <- 10
V1 <- rnbinom(10000, size=size, mu=mu1)
cat("prob1=", size/(size+mu1))
mu2 <- 20
V2 <- rnbinom(10000, size=size, mu=mu2)
cat("prob2=", size/(size+mu2))

hist(V1)
hist(V2)
hist(V1+V2)

library(MASS)

fitdistr(V1, "negative binomial")
fitdistr(V2, "negative binomial")

fitdistr(V1+V2, "negative binomial")


Marc

• how is $\mu$ related to $r$ and $p$ in this perameterization? – Glen_b Aug 1 '15 at 7:43
• In this parametrization, p = r/(r+µ) so µ=(r/p)-r=r (1/p - 1)=r (1-p)/p – MarcG Aug 1 '15 at 13:40
• @MarcG: I think Glen_b is trying to help you find the solution by yourself: if you know how to switch between both parameterisations then the solution is contained in the question. – Xi'an Aug 1 '15 at 17:08
• Xi'an is correct -- now you've already done it all yourself apart from the final step of writing the final line (the value for the mu-parameter of the sum). If you know how to switch between parameterizations (as you just did), and you know how to write the distribution of $\sum X_i$ in one form, you can write it in the other form. $\sum r_i$ is a single number, (use $R=\sum r_i$ if it helps); write what the $\mu$ parameter must be in terms of $p$ and $\sum r_i$ (or $p$ and $R$ if it's easier that way; just convert back at the end). – Glen_b Aug 2 '15 at 1:00
• Please add the self-study tag, read its tag-wiki and modify your question to follow the guidelines on asking such questions. (In particular, you'll need to clearly identify what you've done to solve the problem yourself, and indicate the specific help you need at the point you struck difficulty.) – Glen_b Aug 2 '15 at 1:03