Skip to content

Commit 65d0fc6

Browse files
authored
added 2 proofs
1 parent 0abc2f6 commit 65d0fc6

2 files changed

Lines changed: 122 additions & 0 deletions

File tree

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)