Let $X_{1},..,X_{n}$ be a sample from a poisson$({\lambda})$ distribution. Let the prior be ${\pi}({\lambda})=1/{\sqrt{\lambda}}$. Find the posterior distribution.

My work: We have $f(x|{\lambda})=\frac{{\lambda}^{x_{1}+..+x_{n}-0.5}e^{-{\lambda}n}}{x_{1}!....x_{n}!}$. To find the marginal density I believe I need to sum this expression through ${\lambda}=0,1,2,......$. How to do this?


  • $\begingroup$ Can you show us what you have tried so far? Without some input from your side this question is unlikely to be fully answered for you by somebody else. $\endgroup$
    – Andy
    May 3, 2014 at 14:21
  • $\begingroup$ @Andy I have shown my work by finding (hopefully correct) $f(x|{\lambda})$ $\endgroup$
    – user134724
    May 3, 2014 at 14:26
  • $\begingroup$ What you found so far is the likelihood for the Poisson distribution (where does this -0.5 in the exponent of $\lambda$ come from? It should just be $\lambda ^{\sum^{n}_{i=1} x_i}$). As hint for the final step: use Bayes' rule to find the posterior $\endgroup$
    – Andy
    May 3, 2014 at 14:35
  • $\begingroup$ @Andy I've multipled by the prior, so actually I should have written $f(x,{\theta})$. Now I need to find the marginal density to use bayes rule. Can you please help me a bit more? $\endgroup$
    – user134724
    May 3, 2014 at 14:52
  • $\begingroup$ Ah now I get it, sorry I guess I was a bit blind earlier. Just forget my previous comments. $\endgroup$
    – Andy
    May 3, 2014 at 15:01

1 Answer 1


$p(\lambda|X)=\frac{p(X|\lambda)\pi(\lambda)}{p(X)}=\frac{L_\lambda(X)\pi(\lambda)}{\int_0^\infty p(X,\lambda)d\lambda}$

$L_\lambda(X)=\frac{e^{-n\lambda }\lambda^{\sum x_i}}{\Pi(x_i!)}$

$\int_0^\infty p(X,\lambda)d\lambda=constant$

$p(\lambda|X)\propto \pi(\lambda)L_\lambda(X)=\frac{e^{-n\lambda }\lambda^{\sum x_i-0.5}}{\Pi(x_i!)}$

$\int_0^\infty p(X,\lambda)d\lambda=\int_0^\infty p(\lambda)(X|\lambda)d\lambda$, since we believe $Cov(\lambda,x_i)=0$

$\int_0^\infty p(\lambda)(X|\lambda)d\lambda=\int_0^\infty\frac{e^{-n\lambda }\lambda^{\sum x_i-0.5}}{\Pi(x_i!)}d\lambda=\int_0^\infty\frac{1}{n^{\sum x_i+0.5}\Pi(x_i!)}\times e^{-n\lambda }(n\lambda)^{\sum x_i-0.5}d(n\lambda)$

The result of the integral is a Gamma function

$\int_0^\infty\frac{1}{n^{\sum x_i+0.5}\Pi(x_i!)}\times e^{-n\lambda }(n\lambda)^{\sum x_i-0.5}d(n\lambda)=\frac{\Gamma(\sum x_i+0.5)}{n^{\sum x_i+0.5}\Pi(x_i!)}$

$p(\lambda|X)=\frac{e^{-n\lambda }\lambda^{\sum x_i-0.5}}{\Pi(x_i!)}\div\frac{\Gamma(\sum x_i+0.5)}{n^{\sum x_i+0.5}\Pi(x_i!)}=\frac{exp\{-n\lambda\}\lambda^{\sum x_i-0.5}n^{\sum x_i+0.5}}{\Gamma(\sum x_i+0.5)}$

$f(\lambda|X)$ is a $\gamma$ distribution as $f(\lambda|X;\alpha,\beta)$, where $alpha=\sum x_i+0.5$ and $\beta=n$

$\Gamma(\sum x_i+0.5)=\frac{(2\sum x_i)!\sqrt\pi}{(\sum x_i)!4^{\sum x_i}}$

$p(\lambda|X)=\frac{exp\{-n\lambda\}\lambda^{\sum x_i-0.5}n^{\sum x_i+0.5}(\sum x_i)!4^{\sum x_i}}{(2\sum x_i)!\sqrt\pi}$

And from the Bayesian Analysis, we have much confidence to believe that the probability of $\lambda$ of a Poisson distribution to be $\gamma$ distribution, almost regardless of the prior $\pi(\lambda)$.

That's much the reason, I believe, that we usually assume $\pi(\lambda)=\gamma(\lambda;\alpha,\beta)$, a $\gamma$ function for the prior of the parameter $\lambda$ of the Possion distrubtion Pois($\lambda$).

And we usually use flat prior for $\alpha,\beta$, namely $\alpha\sim U,\beta\sim U$, to acknowledge that we have no information of $\alpha$ and $\beta$.

In this case we have a hierarchical prior.

A gamma prior $\gamma(\lambda;\alpha,\beta)$ for $\lambda$ of the Poisson distribution Pois($\lambda$).

Flat hyperpriors $\alpha\sim U, \beta\sim U$ for $\alpha$ and $\beta$ of the $\gamma(\lambda;\alpha,\beta)$ prior.

The above discussion, I think, is pretty common in standard text books regarding priors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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