The formula for calculating the MAP estimate of a particular parameter, $p$, is given by the following: $p^{MAP} =$ argmax $P(p)P(p|x)$.

Now I am trying to do a question where I am told the prior distribution $P(p)$ and am given that the prior distribution is a Beta distribution. Using conjugate priors, I can then determine that the posterior $P(p|x)$ should be an "updated" Beta distribution according to the number of successes and failures.

At this point, I can take the product of $P(p)P(p|x)$ and go ahead and use calculus to find the value of $p$ that corresponds to the argmax.

However, the question hints that I should solve this question by maximising the log posterior with respect to $p$. I do not understand this suggestion since if I only maximise $P(p|x)$ doesn't it ignore the information about $p$ contained in $P(p)$?


With $p$ as the parameter and $x$ as the data, the MAP solution maximises the posterior $\mathrm{prob}(p | x, \mathcal{I})$:

\begin{align} p_\mathrm{MAP} &= \underset{p}{\operatorname{argmax}} \mathrm{prob}(p | x, \mathcal{I}) \\ &= \underset{p}{\operatorname{argmax}} \frac{\mathrm{prob}(x | p, \mathcal{I}) \: \mathrm{prob}(p | \mathcal{I})}{\mathrm{prob}(x | \mathcal{I})} \\ &= \underset{p}{\operatorname{argmax}} \mathrm{prob}(x | p, \mathcal{I}) \: \mathrm{prob}(p | \mathcal{I}) \\ &= \underset{p}{\operatorname{argmax}} \ln\left[\mathrm{prob}(x | p, \mathcal{I}) \: \mathrm{prob}(p | \mathcal{I})\right] \end{align}

| cite | improve this answer | |
  • $\begingroup$ what is $\mathcal{I}$? $\endgroup$ – user11128 Feb 16 '19 at 12:05
  • $\begingroup$ @user11128 It looks like just a shorthand for all the other information other than $p$ and $x$ that would go into calculating these probabilities. The key thing to get from this answer, which I think could be improved by highlighting this or saying it plainly in some way, is that the MAP solution maximizes $\Pr(p|x)$, which we in practice do by maximizing $\Pr(p)\Pr(x|p)$ (the prior of $p$ times the likelihood of $x$ given $p$), which is proportional to the posterior $\Pr(p|x)$, and truly in practice maximize the log of that (it increases accuracy and sometimes computational efficiency). $\endgroup$ – duckmayr Feb 16 '19 at 12:24
  • $\begingroup$ @user11128 $\mathcal{I}$ is the background information you use to assign the probabilities. $\endgroup$ – CarbonFlambe--Reinstate Monica Feb 16 '19 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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