Skip to content

Commit 59b8402

Browse files
authored
Merge pull request #219 from JoramSoch/master
added 1 proof and 1 definition
2 parents e5c11df + c6dbe62 commit 59b8402

3 files changed

Lines changed: 123 additions & 9 deletions

File tree

D/map.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: definition
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2023-12-01 14:32:38
9+
10+
title: "Maximum-a-posteriori estimation"
11+
chapter: "General Theorems"
12+
section: "Bayesian statistics"
13+
topic: "Probabilistic modeling"
14+
definition: "Maximum-a-posteriori estimation"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2023
19+
title: "Maximum a posteriori estimation"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2023-12-01"
22+
url: "https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimation#Description"
23+
24+
def_id: "D191"
25+
shortcut: "map"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Definition:** Consider a [posterior distribution](/D/post) of an unknown parameter $\theta$, given measured data $y$, parametrized by posterior hyperparameters $\phi$:
31+
32+
$$ \label{eq:post}
33+
\theta|y \sim \mathcal{D}(\phi) \; .
34+
$$
35+
36+
Then, the value of $\theta$ at which the [posterior density](/D/post) attains its maximum is called the "maximum-a-posteriori estimate" or "MAP estimate" of $\theta$:
37+
38+
$$ \label{eq:prior-pdf}
39+
\hat{\theta}_\mathrm{MAP} = \operatorname*{arg\,max}_\theta \mathcal{D}(\theta; \phi) \; .
40+
$$

I/ToC.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,11 @@ title: "Table of Contents"
288288
&emsp;&ensp; 5.1.5. *[Joint likelihood](/D/jl)* <br>
289289
&emsp;&ensp; 5.1.6. **[Joint likelihood is product of likelihood and prior](/P/jl-lfnprior)** <br>
290290
&emsp;&ensp; 5.1.7. *[Posterior distribution](/D/post)* <br>
291-
&emsp;&ensp; 5.1.8. **[Posterior density is proportional to joint likelihood](/P/post-jl)** <br>
292-
&emsp;&ensp; 5.1.9. **[Combined posterior distribution from independent data](/P/post-ind)** <br>
293-
&emsp;&ensp; 5.1.10. *[Marginal likelihood](/D/ml)* <br>
294-
&emsp;&ensp; 5.1.11. **[Marginal likelihood is integral of joint likelihood](/P/ml-jl)** <br>
291+
&emsp;&ensp; 5.1.8. *[Maximum-a-posteriori estimation](/D/map)* <br>
292+
&emsp;&ensp; 5.1.9. **[Posterior density is proportional to joint likelihood](/P/post-jl)** <br>
293+
&emsp;&ensp; 5.1.10. **[Combined posterior distribution from independent data](/P/post-ind)** <br>
294+
&emsp;&ensp; 5.1.11. *[Marginal likelihood](/D/ml)* <br>
295+
&emsp;&ensp; 5.1.12. **[Marginal likelihood is integral of joint likelihood](/P/ml-jl)** <br>
295296

296297
5.2. Prior distributions <br>
297298
&emsp;&ensp; 5.2.1. *[Flat vs. hard vs. soft](/D/prior-flat)* <br>
@@ -719,11 +720,12 @@ title: "Table of Contents"
719720
&emsp;&ensp; 3.1.1. *[Definition](/D/bin-data)* <br>
720721
&emsp;&ensp; 3.1.2. **[Maximum likelihood estimation](/P/bin-mle)** <br>
721722
&emsp;&ensp; 3.1.3. **[Maximum log-likelihood](/P/bin-mll)** <br>
722-
&emsp;&ensp; 3.1.4. **[Conjugate prior distribution](/P/bin-prior)** <br>
723-
&emsp;&ensp; 3.1.5. **[Posterior distribution](/P/bin-post)** <br>
724-
&emsp;&ensp; 3.1.6. **[Log model evidence](/P/bin-lme)** <br>
725-
&emsp;&ensp; 3.1.7. **[Log Bayes factor](/P/bin-lbf)** <br>
726-
&emsp;&ensp; 3.1.8. **[Posterior probability](/P/bin-pp)** <br>
723+
&emsp;&ensp; 3.1.4. **[Maximum-a-posteriori estimation](/P/bin-map)** <br>
724+
&emsp;&ensp; 3.1.5. **[Conjugate prior distribution](/P/bin-prior)** <br>
725+
&emsp;&ensp; 3.1.6. **[Posterior distribution](/P/bin-post)** <br>
726+
&emsp;&ensp; 3.1.7. **[Log model evidence](/P/bin-lme)** <br>
727+
&emsp;&ensp; 3.1.8. **[Log Bayes factor](/P/bin-lbf)** <br>
728+
&emsp;&ensp; 3.1.9. **[Posterior probability](/P/bin-pp)** <br>
727729

728730
3.2. Multinomial observations <br>
729731
&emsp;&ensp; 3.2.1. *[Definition](/D/mult-data)* <br>

P/bin-map.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2023-12-01 14:36:54
9+
10+
title: "Maximum-a-posteriori estimation for binomial observations"
11+
chapter: "Statistical Models"
12+
section: "Count data"
13+
topic: "Binomial observations"
14+
theorem: "Maximum-a-posteriori estimation"
15+
16+
sources:
17+
18+
proof_id: "P427"
19+
shortcut: "bin-map"
20+
username: "JoramSoch"
21+
---
22+
23+
24+
**Theorem:** Let $y$ be the number of successes resulting from $n$ independent trials with unknown success probability $p$, such that $y$ follows a [binomial distribution](/D/bin):
25+
26+
$$ \label{eq:Bin}
27+
y \sim \mathrm{Bin}(n,p) \; .
28+
$$
29+
30+
Moreover, assume a [beta prior distribution](/P/bin-prior) over the model parameter $p$:
31+
32+
$$ \label{eq:Bin-prior}
33+
\mathrm{p}(p) = \mathrm{Bet}(p; \alpha_0, \beta_0) \; .
34+
$$
35+
36+
Then, the [maximum-a-posteriori estimate](/D/map) of $p$ is
37+
38+
$$ \label{eq:Bin-MLE}
39+
\hat{p}_\mathrm{MAP} = \frac{\alpha_0+y-1}{\alpha_0+\beta_0+n-2} \; .
40+
$$
41+
42+
43+
**Proof:** Given the [prior distribution](/D/prior) in \eqref{eq:Bin-prior}, the [posterior distribution](/D/post) for [binomial observations](/D/bin-data) [is also a beta distribution](/P/bin-post)
44+
45+
$$ \label{eq:Bin-post}
46+
\mathrm{p}(p|y) = \mathrm{Bet}(p; \alpha_n, \beta_n)
47+
$$
48+
49+
where the [posterior hyperparameters](/D/post) are equal to
50+
51+
$$ \label{eq:Bin-post-par}
52+
\begin{split}
53+
\alpha_n &= \alpha_0 + y \\
54+
\beta_n &= \beta_0 + (n-y) \; .
55+
\end{split}
56+
$$
57+
58+
The [mode of the beta distribution](/P/beta-mode) is given by:
59+
60+
$$ \label{eq:beta-mode}
61+
X \sim \mathrm{Bet}(\alpha, \beta) \quad \Rightarrow \quad \mathrm{mode}(X) = \frac{\alpha-1}{\alpha+\beta-2} \; .
62+
$$
63+
64+
Applying \eqref{eq:beta-mode} to \eqref{eq:Bin-post} with \eqref{eq:Bin-post-par}, the [maximum-a-posteriori estimate](/D/map) of $p$ follows as:
65+
66+
$$ \label{eq:Bin-MAP}
67+
\begin{split}
68+
\hat{p}_\mathrm{MAP} &= \frac{\alpha_n-1}{\alpha_n+\beta_n-2} \\
69+
&\overset{\eqref{eq:Bin-post-par}}{=} \frac{\alpha_0+y-1}{\alpha_0+y+\beta_0+(n-y)-2} \\
70+
&= \frac{\alpha_0+y-1}{\alpha_0+\beta_0+n-2} \; .
71+
\end{split}
72+
$$

0 commit comments

Comments
 (0)