# Compounding a gamma distribution with another distribution to yield a gamma

I have a gamma distributed random variable $$X$$, with its mean $$\mu$$ distributed as some other function $$X \sim \text{Gamma}(\mu,k)\\ \mu \sim P(\theta)$$

What is the distribution $$P(\theta)$$ such that when I marginalize out $$\mu$$, $$X$$ is still distributed as a gamma distribution, perhaps with updated parameters?

$$p(x|k,\theta)=\int_0^{\infty} d\mu\, p(x|\mu,k)p(\mu|\theta)$$ i.e. $$p(x|k,\theta)=\frac{x^{\kappa-1}e^{- x\kappa/\phi}}{(\phi/\kappa)^{\kappa}\Gamma(\kappa)}$$ where $$\phi,\kappa$$ are functions of $$k,\theta$$

• You might require the self study tag. – Michael R. Chernick Oct 4 '19 at 0:06
• Hint: the sum of Gamma distributions (with a common scale parameter) is a Gamma distribution. – whuber Oct 7 '19 at 21:27