Skip to content

Commit 81a63e9

Browse files
authored
Merge pull request #141 from JoramSoch/master
added 2 proofs
2 parents 9659b0a + 91f2f80 commit 81a63e9

3 files changed

Lines changed: 131 additions & 7 deletions

File tree

I/ToC.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,12 @@ title: "Table of Contents"
102102
&emsp;&ensp; 1.7.5. **[Linearity](/P/mean-lin)** <br>
103103
&emsp;&ensp; 1.7.6. **[Monotonicity](/P/mean-mono)** <br>
104104
&emsp;&ensp; 1.7.7. **[(Non-)Multiplicativity](/P/mean-mult)** <br>
105-
&emsp;&ensp; 1.7.8. **[Expectation of a quadratic form](/P/mean-qf)** <br>
106-
&emsp;&ensp; 1.7.9. **[Law of total expectation](/P/mean-tot)** <br>
107-
&emsp;&ensp; 1.7.10. **[Law of the unconscious statistician](/P/mean-lotus)** <br>
108-
&emsp;&ensp; 1.7.11. *[Expected value of a random vector](/D/mean-rvec)* <br>
109-
&emsp;&ensp; 1.7.12. *[Expected value of a random matrix](/D/mean-rmat)* <br>
105+
&emsp;&ensp; 1.7.8. **[Expectation of a trace](/P/mean-tr)** <br>
106+
&emsp;&ensp; 1.7.9. **[Expectation of a quadratic form](/P/mean-qf)** <br>
107+
&emsp;&ensp; 1.7.10. **[Law of total expectation](/P/mean-tot)** <br>
108+
&emsp;&ensp; 1.7.11. **[Law of the unconscious statistician](/P/mean-lotus)** <br>
109+
&emsp;&ensp; 1.7.12. *[Expected value of a random vector](/D/mean-rvec)* <br>
110+
&emsp;&ensp; 1.7.13. *[Expected value of a random matrix](/D/mean-rmat)* <br>
110111

111112
1.8. Variance <br>
112113
&emsp;&ensp; 1.8.1. *[Definition](/D/var)* <br>
@@ -449,8 +450,9 @@ title: "Table of Contents"
449450
&emsp;&ensp; 5.1.2. **[Probability density function](/P/matn-pdf)** <br>
450451
&emsp;&ensp; 5.1.3. **[Equivalence to multivariate normal distribution](/P/matn-mvn)** <br>
451452
&emsp;&ensp; 5.1.4. **[Kullback-Leibler divergence](/P/matn-kl)** <br>
452-
&emsp;&ensp; 5.1.5. **[Transposition](/P/matn-trans)** <br>
453-
&emsp;&ensp; 5.1.6. **[Linear transformation](/P/matn-ltt)** <br>
453+
&emsp;&ensp; 5.1.5. **[Linear transformation](/P/matn-ltt)** <br>
454+
&emsp;&ensp; 5.1.6. **[Transposition](/P/matn-trans)** <br>
455+
&emsp;&ensp; 5.1.7. **[Drawing samples](/P/matn-ltt)** <br>
454456

455457
5.2. Wishart distribution <br>
456458
&emsp;&ensp; 5.2.1. *[Definition](/D/wish)* <br>

P/matn-samp.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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: 2021-12-07 08:43:00
9+
10+
title: "Sampling from the matrix-normal distribution"
11+
chapter: "Probability Distributions"
12+
section: "Matrix-variate continuous distributions"
13+
topic: "Matrix-normal distribution"
14+
theorem: "Linear transformation"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Matrix normal distribution"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-12-07"
22+
url: "https://en.wikipedia.org/wiki/Matrix_normal_distribution#Drawing_values_from_the_distribution"
23+
24+
proof_id: "P297"
25+
shortcut: "matn-samp"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $X \in \mathbb{R}^{n \times p}$ be a [random matrix](/D/rmat) with all entries independently following a [standard normal distribution](/D/snorm). Moreover, let $A \in \mathbb{R}^{n \times n}$ and $B \in \mathbb{R}^{p \times p}$, such that $A A^\mathrm{T} = U$ and $B^\mathrm{T} B = V$. Then, $Y = M + A X B$ follows a [matrix-normal distribution](/D/matn) with [mean](/D/mean-rmat) $M$, [covariance](/D/covmat) across rows $U$ and [covariance](/D/covmat) across rows $U$:
31+
32+
$$ \label{eq:matn-samp}
33+
Y = M + A X B \sim \mathcal{MN}(M, U, V) \; .
34+
$$
35+
36+
37+
**Proof:** If all entries of $X$ are independent and [standard normally distributed](/D/snorm)
38+
39+
$$ \label{eq:xij-dist}
40+
x_{ij} \sim \mathcal{N}(0, 1) \quad \text{ind. for all} \quad i = 1,\ldots,n \quad \text{and} \quad j = 1,\ldots,p \; ,
41+
$$
42+
43+
this [implies a multivariate normal distribution with diagonal covariance matrix](/P/mvn-ind):
44+
45+
$$ \label{eq:vecX-dist}
46+
\begin{split}
47+
\mathrm{vec}(X) &\sim \mathcal{N}\left(\mathrm{vec}(0_{np}), I_{np} \right) \\
48+
&\sim \mathcal{N}\left(\mathrm{vec}(0_{np}), I_p \otimes I_n \right) \; .
49+
\end{split}
50+
$$
51+
52+
where $0_{np}$ is an $n \times p$ matrix of zeros and $I_n$ is the $n \times n$ identity matrix.
53+
54+
Due to the [relationship between multivariate and matrix-normal distribution](/P/matn-mvn), we have:
55+
56+
$$ \label{eq:X-dist}
57+
X \sim \mathcal{MN}(0_{np}, I_n, I_p) \; .
58+
$$
59+
60+
Thus, [with the linear transformation theorem for the matrix-normal distribution](/P/matn-ltt), it follows that
61+
62+
$$ \label{eq:matn-samp-qed}
63+
\begin{split}
64+
Y = M + AXB &\sim \mathcal{MN}\left(M + A 0_{np} B, A I_n A^\mathrm{T}, B^\mathrm{T} I_p B \right) \\
65+
&\sim \mathcal{MN}\left(M, A A^\mathrm{T}, B^\mathrm{T} B \right) \\
66+
&\sim \mathcal{MN}\left(M, U, V \right) \; .
67+
\end{split}
68+
$$
69+
70+
Thus, given $X$ defined by \eqref{eq:xij-dist}, $Y$ defined by \eqref{eq:matn-samp} is a [sample](/D/dist) from $\mathcal{N}\left(M, U, V \right)$.

P/mean-tr.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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: 2021-12-07 09:03:00
9+
10+
title: "Expected value of the trace of a matrix"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Expected value"
14+
theorem: "Expectation of a trace"
15+
16+
sources:
17+
- authors: "drerD"
18+
year: 2018
19+
title: "'Trace trick' for expectations of quadratic forms"
20+
in: "StackExchange Mathematics"
21+
pages: "retrieved on 2021-12-07"
22+
url: "https://math.stackexchange.com/a/3004034/480910"
23+
24+
proof_id: "P298"
25+
shortcut: "mean-tr"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $A$ be an $n \times n$ [random matrix](/D/rmat). Then, the [expected value](/D/mean) of the trace of $A$ is equal to the trace of the [expectation](/D/mean) of $A$:
31+
32+
$$ \label{eq:mean-tr}
33+
\mathrm{E}\left[ \mathrm{tr}(A) \right] = \mathrm{tr}\left( \mathrm{E}[A] \right) \; .
34+
$$
35+
36+
37+
**Proof:** The trace of an $n \times n$ matrix $A$ is defined as:
38+
39+
$$ \label{eq:tr}
40+
\mathrm{tr}(A) = \sum_{i=1}^{n} a_{ii} \; .
41+
$$
42+
43+
Using this definition of the trace, the [linearity of the expected value](/P/mean-lin) and the [expected value of a random matrix](/D/mean-rmat), we have:
44+
45+
$$ \label{eq:mean-tr-qed}
46+
\begin{split}
47+
\mathrm{E}\left[ \mathrm{tr}(A) \right] &= \mathrm{E}\left[ \sum_{i=1}^{n} a_{ii} \right] \\
48+
&= \sum_{i=1}^{n} \mathrm{E}\left[ a_{ii} \right] \\
49+
&= \mathrm{tr}\left( \left[ \begin{matrix} \mathrm{E}[a_{11}] & \ldots & \mathrm{E}[a_{1n}] \\ \vdots & \ddots & \vdots \\ \mathrm{E}[a_{n1}] & \ldots & \mathrm{E}[a_{nn}] \end{matrix} \right] \right) \\
50+
&= \mathrm{tr}\left( \mathrm{E}[A] \right) \; .
51+
\end{split}
52+
$$

0 commit comments

Comments
 (0)