Skip to content

Commit f0d01a6

Browse files
authored
Merge pull request #220 from JoramSoch/master
added proof "mult-map"
2 parents 907a633 + e2561a7 commit f0d01a6

2 files changed

Lines changed: 86 additions & 5 deletions

File tree

I/ToC.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,12 @@ title: "Table of Contents"
731731
&emsp;&ensp; 3.2.1. *[Definition](/D/mult-data)* <br>
732732
&emsp;&ensp; 3.2.2. **[Maximum likelihood estimation](/P/mult-mle)** <br>
733733
&emsp;&ensp; 3.2.3. **[Maximum log-likelihood](/P/mult-mll)** <br>
734-
&emsp;&ensp; 3.2.4. **[Conjugate prior distribution](/P/mult-prior)** <br>
735-
&emsp;&ensp; 3.2.5. **[Posterior distribution](/P/mult-post)** <br>
736-
&emsp;&ensp; 3.2.6. **[Log model evidence](/P/mult-lme)** <br>
737-
&emsp;&ensp; 3.2.7. **[Log Bayes factor](/P/mult-lbf)** <br>
738-
&emsp;&ensp; 3.2.8. **[Posterior probability](/P/mult-pp)** <br>
734+
&emsp;&ensp; 3.1.4. **[Maximum-a-posteriori estimation](/P/mult-map)** <br>
735+
&emsp;&ensp; 3.2.5. **[Conjugate prior distribution](/P/mult-prior)** <br>
736+
&emsp;&ensp; 3.2.6. **[Posterior distribution](/P/mult-post)** <br>
737+
&emsp;&ensp; 3.2.7. **[Log model evidence](/P/mult-lme)** <br>
738+
&emsp;&ensp; 3.2.8. **[Log Bayes factor](/P/mult-lbf)** <br>
739+
&emsp;&ensp; 3.2.9. **[Posterior probability](/P/mult-pp)** <br>
739740

740741
3.3. Poisson-distributed data <br>
741742
&emsp;&ensp; 3.3.1. *[Definition](/D/poiss-data)* <br>

P/mult-map.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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-08 15:14:47
9+
10+
title: "Maximum-a-posteriori estimation for multinomial observations"
11+
chapter: "Statistical Models"
12+
section: "Count data"
13+
topic: "Multinomial observations"
14+
theorem: "Maximum-a-posteriori estimation"
15+
16+
sources:
17+
18+
proof_id: "P428"
19+
shortcut: "mult-map"
20+
username: "JoramSoch"
21+
---
22+
23+
24+
**Theorem:** Let $y = [y_1, \ldots, y_k]$ be the number of observations in $k$ categories resulting from $n$ independent trials with unknown category probabilities $p = [p_1, \ldots, p_k]$, such that $y$ follows a [multinomial distribution](/D/mult):
25+
26+
$$ \label{eq:Mult}
27+
y \sim \mathrm{Mult}(n,p) \; .
28+
$$
29+
30+
Moreover, assume a [Dirichlet prior distribution](/P/mult-prior) over the model parameter $p$:
31+
32+
$$ \label{eq:Mult-prior}
33+
\mathrm{p}(p) = \mathrm{Dir}(p; \alpha_0) \; .
34+
$$
35+
36+
Then, the [maximum-a-posteriori estimates](/D/map) of $p$ are
37+
38+
$$ \label{eq:Mult-MAP}
39+
\hat{p}_\mathrm{MAP} = \frac{\alpha_0+y-1}{\sum_{j=1}^k \alpha_{0j} + n - k} \; .
40+
$$
41+
42+
43+
**Proof:** Given the [prior distribution](/D/prior) in \eqref{eq:Mult-prior}, the [posterior distribution](/D/post) for [multinomial observations](/D/mult-data) [is also a Dirichlet distribution](/P/mult-post)
44+
45+
$$ \label{eq:Mult-post}
46+
\mathrm{p}(p|y) = \mathrm{Dir}(p; \alpha_n)
47+
$$
48+
49+
where the [posterior hyperparameters](/D/post) are equal to
50+
51+
$$ \label{eq:Mult-post-par}
52+
\alpha_{nj} = \alpha_{0j} + y_j, \; j = 1,\ldots,k \; .
53+
$$
54+
55+
The [mode of the Dirichlet distribution](/P/dir-mode) is given by:
56+
57+
$$ \label{eq:Dir-mode}
58+
X \sim \mathrm{Dir}(\alpha) \quad \Rightarrow \quad \mathrm{mode}(X_i) = \frac{\alpha_i-1}{\sum_j \alpha_j - k} \; .
59+
$$
60+
61+
Applying \eqref{eq:Dir-mode} to \eqref{eq:Mult-post} with \eqref{eq:Mult-post-par}, the [maximum-a-posteriori estimates](/D/map) of $p$ follow as
62+
63+
$$ \label{eq:Mult-MAP-s1}
64+
\begin{split}
65+
\hat{p}_{i,\mathrm{MAP}} &= \frac{\alpha_{ni} - 1}{\sum_j \alpha_{nj} - k} \\
66+
&\overset{\eqref{eq:Mult-post-par}}{=} \frac{\alpha_{0i} + y_i - 1}{\sum_j (\alpha_{0j} + y_j) - k} \\
67+
&= \frac{\alpha_{0i} + y_i - 1}{\sum_j \alpha_{0j} + \sum_j y_j - k} \; .
68+
\end{split}
69+
$$
70+
71+
Since $y_1 + \ldots + y_k = n$ [by definition](/D/mult-data), this becomes
72+
73+
$$ \label{eq:Mult-MAP-s2}
74+
\hat{p}_{i,\mathrm{MAP}} = \frac{\alpha_{0i} + y_i - 1}{\sum_j \alpha_{0j} + n - k} \end{equation}
75+
76+
which, using the $1 \times k$ [vectors](/D/mult-data) $y$, $p$ and $\alpha_0$, can be written as:
77+
78+
\begin{equation} \label{eq:Mult-MAP-qed}
79+
\hat{p}_\mathrm{MAP} = \frac{\alpha_0+y-1}{\sum_{j=1}^k \alpha_{0j} + n - k} \; .
80+
$$

0 commit comments

Comments
 (0)