Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Suppose:

  • $N \sim {\rm Poisson}(\lambda)$
  • $\lambda$ is unknown, but we believe that it can be assumed $\sim \exp(1)$

If I want to calculate $N | X$, i.e., $P(model | data)$, I need to use the Bayes theorem in the following way:

$P(model|data) \propto P(data|model)*P(model)$

  • $P(data|model)$ is the likelihood function
  • $P(model)$ is my prior distribution density

So:

$P(data|model) = L(\lambda) = \exp\{-n\lambda + \log\lambda \sum k_i - \sum \log (k_i!)\}$

And

$P(model) = g(\lambda = 1) = e^{-\lambda}$

Therefore

$P(model|data) = \exp\{-n\lambda + \log\lambda \sum k_i - \sum \log(k_i!)\} e^{-\lambda}$

And if I had a sample of $k_1 = j$, then

$P(\lambda|k_1 = j) = \exp(-\lambda + \log \lambda j - \log j!) e^{-\lambda}$

Is it correct? How do I calculate an expected value for the parameter?

share|improve this question
1  
Your statement of Bayes' theorem $$P(\text{model}|\text{data})=P(\text{data}|\text{model})∗P(\text{model})$$ is not correct. Your definition of the likelihood function is incorrect: you seem to be using the log-likelihood. Fix all that first and maybe the calculations will make more sense. – Dilip Sarwate Apr 10 '12 at 15:43
Indeed, you are confusing likelihood and log-likelihood. – Xi'an Apr 10 '12 at 16:12

1 Answer

up vote 1 down vote accepted

$\Pr(\text{data}|\text{model}) =\Pr(N=n|\lambda) = \frac{\lambda^n}{n!}e^{-\lambda}$.

$p(\text{model}) = p(\lambda) = e^{-\lambda}$.

$p(\lambda|N=n) = \dfrac{\frac{\lambda^n}{n!}e^{-\lambda}\cdot e^{-\lambda}}{\int_0^\infty \frac{\lambda^n}{n!}e^{-\lambda} \cdot e^{-\lambda}\, d\lambda} = 2^{n+1}\frac{\lambda^n}{n!} e^{-2\lambda} $

which is a Gamma distribution with parameters $n+1$ and $2$.

share|improve this answer

Your Answer

 
discard

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.