Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a prior $\lambda \sim \exp(1)$ and a likelihood $X \sim poisson(\lambda)$, and I observed in a sample of $n=5$ a mean of $3$. What is the posterior distribution of $\lambda$?

Here is my asnwer:

$f(x|\lambda) = \frac{\lambda^{x}e^{-\lambda}}{x!}$ $f(\lambda) = \theta e^{-\theta \lambda}, \theta = 1 => f(\lambda) = e^{-\lambda }$

So, the posterior:

$f(\lambda|x) \propto e^{-\lambda} \lambda^{x} e^{-\lambda +(-\lambda)} = \lambda^{x}e^{-2 \lambda} $

This posterior is some known distribution (e.g. exponential)?

share|cite|improve this question
Since the standard (and standardized) procedure fully applies, you might want to explain what is causing you trouble here. (Furthermore, note that stricto sensu you asked no question.) – Did May 28 '13 at 5:55
I have done the calculations but I don't know it my results are right. I would like to know if this posterior would be some know probability distribution (conjugate or not). – Filipe Ferminiano May 31 '13 at 20:07
I have done the calculations but I don't know it my results are right... Then show them instead of leaving everybody in the blue. – Did May 31 '13 at 23:20
Ok, I edited my post. Take a look please. – Filipe Ferminiano Jun 1 '13 at 13:04
Which part of my answer is not the standardized procedure I alluded to in my first comment and, retrospectively, was causing you problems? – Did Jun 1 '13 at 16:34
up vote 1 down vote accepted

Assume one observed $x=(x_k)_{k\leqslant n}$, then $f(x\mid\lambda)=f(x_1\mid\lambda)\cdots f(x_n\mid\lambda)\propto\lambda^{|x|}\mathrm e^{-n\lambda}$ where $|x|=x_1+\cdots+x_n$ and $\propto$ refers to the fact that one omits multiplicative constants independent of $\lambda$. Thus, $f(\lambda\mid x)\propto f(\lambda)f(x\mid\lambda)\propto\lambda^{|x|}\mathrm e^{-(n+1)\lambda}$. To find the normalizing constant, recall that, for every positive $u$ and $v$, $$ \int_0^\infty\lambda^{u-1}\mathrm e^{-v\lambda}\mathrm d\lambda=v^{-u}\Gamma(u), $$ hence, finally, $$ f(\lambda\mid x)=(n+1)^{-|x|-1}\,(|x|)!\,\lambda^{|x|}\mathrm e^{-(n+1)\lambda}. $$ This is the gamma distribution with parameters $(n+1,|x|+1)$.

share|cite|improve this answer

$f(\lambda|x) \propto \lambda^x \cdot \exp(-2\lambda)= \lambda^{(x+1)-1} \cdot \exp(-2\lambda)$.
This is a Gamma density with parameters $x+1,-2$, ie Gamma($\lambda|x+1,-2$)

share|cite|improve this answer
Since the exponential is a special case of Gamma ie Gamma(1,$\lambda$) we do have conjugacy. – theoGR yesterday

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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