Simplifying expression into Gamma Distribution

bayesiangamma distributionstatistics

I'm trying to follow a Bayesian inference lecture and got stuck on a simplification. In the question, I'm trying to find the posterior distribution, given

$$X_1 ,\ldots, X_n \mid \lambda \stackrel{\text{iid}}{\sim} \operatorname{Poisson}(\lambda),$$

$$\lambda \sim \operatorname{gamma}(\alpha,\beta)$$

I understand the use of conjugates Etc. to make the integral tractable. However, I'm getting stuck on the last part of the simplification. Could someone walk me through the simplification of this expression:

$$\frac {\Gamma(n\bar{x} + \alpha)}{\Gamma{(\alpha})\prod_{i=1}^n x_i!} \left[\frac{\beta}{n + \beta}\right]^\alpha\left[\frac{1}{n + \beta} \right]^{x_i} \cdots \left[\frac{1}{n + \beta}\right]^{x_n} $$

to the given posterior distribution $\lambda \mid x_1, \ldots, x_n \sim \operatorname{gamma}(n\bar{x} + \alpha, n + \beta)$ ?

Thank you!

Best Answer

The posterior is the following measure multiplied by a normalizing constant: $$ \overbrace{(\ell^{x_1} e^{-\ell}) \cdots (\ell^{x_n} e^{-\ell})}^\text{likelihood} {} \cdot {} \overbrace{ (\beta\ell)^{\alpha-1} e^{-\beta\ell} (\beta\,d\ell) }^\text{gamma prior} $$ I've omitted the $\text{“}x_i!\text{''s}$ in the denominators since they don't depend on $\ell$ and similarly the $\Gamma(\alpha)$ in the denominator. The above is proportional, as a function of $\ell,$ to $$ \propto \quad \ell^{x_1+\cdots +x_n +\alpha-1} e^{-(n+\beta)\ell} \, d\ell. \tag 1 $$ This is gamma distribution, with $x_1+\cdots+x_n+\alpha$ in the posterior where $\alpha$ appeared in the prior, and with $n+\beta$ in the posterior where $\beta$ appeared in the prior.

The expression you're trying to simplify looks as if it would appear in an attempt to find the normalizing constant. I wouldn't worry about that until after you've reached line $(1)$ above. In line $(1),$ you've got a gamma distribution but the normalizing constant is not specified. But it is a known function of the two parameters $x_1+\cdots+x_n+\alpha$ and $n+\beta.$