Maximum calculation

34 Views Asked by At

I'm trying to work out a MAP estimation problem:

$$u_{hat} = arg\max\ p(x_1, ..., x_N | u)\ p(u)$$ the $x_i$'s are independent and are drawn from a Poisson distribution. $u$ has an exponential distribution: $$p(u) = \lambda e^{(- \lambda u)}$$

Using log-likelihood and setting the derivative equal to zero gets me to this equation: $$\sum_{i=0}^N x_{i} - Nu^2 - u\lambda^2e^{-\lambda u} = 0$$

I have to solve for $u$, but it appears in both a term and an exponent. How can I solve it?

1

There are 1 best solutions below

0
On BEST ANSWER

For the log posterior term I get $$ \log p(x_1,\ldots,x_n |u) + \log p(u) =-nu +\left(\sum_{i=1}^n x_i\right)\ln (u) - \sum_{i=1}^{n}\ln(x_i!) -u\lambda + \ln(\lambda) $$ taking the derivative with respect to $u$ and searching for the stationary point I get $$ \begin{align*} -n +\left(\sum_i x_i \right)\frac{1}{u} -\lambda =0, \end{align*} $$ I think you have just neglected to take the logarithm of the prior, i.e. you have calculated $\frac{d}{du} (\log p(x | u) + p(u) )$ or something similar. Anyway continuing I get $$ \begin{align*} u = \frac{ \sum_{i=1}^n x_i }{n + \lambda} \end{align*} $$ which seems correct, in particular as $n$ gets large the MAP estimate agrees with the log-likelihood estimate.