6
$\begingroup$

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?

$\endgroup$
2
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Apr 10, 2012 at 15:43
  • $\begingroup$ Indeed, you are confusing likelihood and log-likelihood. $\endgroup$
    – Xi'an
    Commented Apr 10, 2012 at 16:12

1 Answer 1

6
$\begingroup$

$\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$.

$\endgroup$

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.