I'm stuck on a answer from an old exam. The task is to use a Poisson distribution and a Gamma distribution as prior to calculate the posterior density:

$$ p(\lambda|x) \propto L(\lambda)p(\lambda)\propto\lambda^{\alpha+n\bar x-1 }e^{-\lambda(\beta+n)} $$ The thing that I do not understand is how this expression can be described as the posterior distribution $\Gamma(\alpha+n\bar x,\beta+n)$.

What happens to $-1$ in the first exponent and $-\lambda$ in the $\exp(\cdot)$ ?


1 Answer 1


The Gamma pdf is $f(\lambda\mid \tilde\alpha, \tilde\beta) \propto \lambda^{\tilde\alpha -1}\exp(-\tilde\beta \lambda)$.

So if you plug the quantities $\tilde\alpha = \alpha + n\bar{x}$ and $\tilde\beta = \beta + n$ you do obtain that $$ p(\lambda\mid x) \propto L(\lambda)p(\lambda) \propto \lambda^{\alpha + n\bar{x} -1}\exp\left(-\lambda(\beta + n)\right) = \Gamma(\alpha + n\bar{x}, \beta + n)$$

This is just a matter of substitution !

  • $\begingroup$ pedantic but very important note: gamma pdf is for $\lambda > 0$ so that's why we can jump from the $\propto$ to the full pdf. If this was for a different range of $\lambda$ the result would not hold $\endgroup$
    – jcken
    Mar 2, 2021 at 13:37
  • $\begingroup$ In what context could we have $\lambda \leq 0$ ? The poisson rate is always positive, and so is the realization of the gamma prior. $\endgroup$
    – ArnoV
    Mar 2, 2021 at 13:46
  • $\begingroup$ It could be that we have $\lambda > k > 0$. If this isn't stated then its not strictly valid to make such a jump! Essentially you would be calculating the normalising constant without limits of integration $\endgroup$
    – jcken
    Mar 2, 2021 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.