Maximum a Posteriori (MAP) Estimate
The maximum‑a posteriori (MAP) estimate chooses the estimator under which the parameter is most probable after observing the data, by maximizing the posterior distribution. Let be observed data with likelihood , and assume a prior distribution on the random parameter . Then, the MAP estimate of is the value that maximizes the posterior , such that
Examples
I. Poisson Process MAP
Customers arrive to a store according to a Poisson process with rate . The store manager learns of a rumor that one of the employees is sending every other customer to the rival store, so that deterministically, every odd-numbered customer is sent away.
Let be the hypothesis that the rumor is true and the rumor is false, assuming that both hypotheses are equally likely. Suppose a customer arrives to the store at time . After that, the manager observes , where is the time of the -th subsequent sale, . Derive the MAP rule to determine whether the rumor was true or not.
Solution.
Since both hypotheses are equally likely, MAP is equivalent to MLE. We form the posterior
II. Laplace Prior and -Regularization (LASSO)
Suppose you draw i.i.d. data points , where the true relationship is given by for . In other words, has a linear dependence on with additive Gaussian noise. Further suppose that has a Laplace prior distribution,
Show that finding the MAP estimate of given the data points is equivalent to minimizing the cost function
and determine .Solution. , we need to find , which is equivalent to . As such, This means that our likelihood function is Taking the log-likelihood, we have Since we are maximizing for , which is concave on (positive absolute values are convex, and we have a negative absolute value), then we are minimizing for where with .
Since we know
III. Bayesian Estimation of Exponential Distribution
Suppose that is Exponential with unknown rate . As a Bayesian practitioner, you have a prior belief that the random variable is equally likely to be or .
A) You collect one sample from . Find the posterior distribution .
A) Solution. Here, by definition we have that the prior is , and . Then, by total probability, we also have . As such,
We know by Bayes that
B) Instead of using MAP or MLE and fixing some of , we will keep the full information of the posterior distribution of . Compute the distribution of as
B) Solution. . Using the answer from the previous part, we have
We find that
C) The fully Bayesian approach from part B) is often computationally intractable, which is one of the main reasons why point estimates are common in practice. Supposing that , compute the MAP estimate for , and calculate again using the MAP rule.
C) Solution. is uniform) estimate as where our likelihood function turns into when log-likelihood is applied. Given , it also follows that only if Since the value of determines the parameter for all subsequent observations, this result implies that
We formulate our MAP/ML (equivalent here, since the prior of
\lambda_{1} & \text{if } x_{1} < \alpha \
\lambda_{2} & \text{if } x_{1} \geq \alpha.
\end{cases}$$
As such, we get that
\lambda_{1}e^{-\lambda_{1}x} & \text{if } x_{1} < \alpha \
\lambda_{2}e^{-\lambda_{2}x} & \text{if } x_{1} \geq \alpha,
\end{cases}$$
where is the intersection of the distributions with parameters and .