Skip to content

Commit 0e5e9e4

Browse files
authored
Merge pull request #177 from JoramSoch/master
added 1 definition and 5 proofs
2 parents aa1e4cf + b38e569 commit 0e5e9e4

7 files changed

Lines changed: 384 additions & 11 deletions

File tree

D/covmat-cross.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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: 2022-09-26 09:45:00
9+
10+
title: "Cross-covariance matrix"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
definition: "Cross-covariance matrix"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2022
19+
title: "Cross-covariance matrix"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2022-09-26"
22+
url: "https://en.wikipedia.org/wiki/Cross-covariance_matrix#Definition"
23+
24+
def_id: "D176"
25+
shortcut: "covmat-cross"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Definition:** Let $X = [X_1, \ldots, X_n]^\mathrm{T}$ and $Y = [Y_1, \ldots, Y_m]^\mathrm{T}$ be two [random vectors](/D/rvec) that can or cannot be of equal size. Then, the cross-covariance matrix of $X$ and $Y$ is defined as the $n \times m$ matrix in which the entry $(i,j)$ is the [covariance](/D/cov) of $X_i$ and $Y_j$:
31+
32+
$$ \label{eq:covmat-cross}
33+
\Sigma_{XY} =
34+
\begin{bmatrix}
35+
\mathrm{Cov}(X_1,Y_1) & \ldots & \mathrm{Cov}(X_1,Y_m) \\
36+
\vdots & \ddots & \vdots \\
37+
\mathrm{Cov}(X_n,Y_1) & \ldots & \mathrm{Cov}(X_n,Y_m)
38+
\end{bmatrix} =
39+
\begin{bmatrix}
40+
\mathrm{E}\left[ (X_1-\mathrm{E}[X_1]) (Y_1-\mathrm{E}[Y_1]) \right] & \ldots & \mathrm{E}\left[ (X_1-\mathrm{E}[X_1]) (Y_m-\mathrm{E}[Y_m]) \right] \\
41+
\vdots & \ddots & \vdots \\
42+
\mathrm{E}\left[ (X_n-\mathrm{E}[X_n]) (Y_1-\mathrm{E}[Y_1]) \right] & \ldots & \mathrm{E}\left[ (X_n-\mathrm{E}[X_n]) (Y_m-\mathrm{E}[Y_m]) \right]
43+
\end{bmatrix} \; .
44+
$$

I/ToC.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,23 @@ title: "Table of Contents"
128128
&emsp;&ensp; 1.9.1. *[Definition](/D/cov)* <br>
129129
&emsp;&ensp; 1.9.2. *[Sample covariance](/D/cov-samp)* <br>
130130
&emsp;&ensp; 1.9.3. **[Partition into expected values](/P/cov-mean)** <br>
131-
&emsp;&ensp; 1.9.4. **[Covariance under independence](/P/cov-ind)** <br>
132-
&emsp;&ensp; 1.9.5. **[Relationship to correlation](/P/cov-corr)** <br>
133-
&emsp;&ensp; 1.9.6. **[Law of total covariance](/P/cov-tot)** <br>
134-
&emsp;&ensp; 1.9.7. *[Covariance matrix](/D/covmat)* <br>
135-
&emsp;&ensp; 1.9.8. *[Sample covariance matrix](/D/covmat-samp)* <br>
136-
&emsp;&ensp; 1.9.9. **[Covariance matrix and expected values](/P/covmat-mean)** <br>
137-
&emsp;&ensp; 1.9.10. **[Invariance under addition of vector](/P/covmat-inv)** <br>
138-
&emsp;&ensp; 1.9.11. **[Scaling upon multiplication with matrix](/P/covmat-scal)** <br>
139-
&emsp;&ensp; 1.9.12. **[Covariance matrix and correlation matrix](/P/covmat-corrmat)** <br>
140-
&emsp;&ensp; 1.9.13. *[Precision matrix](/D/precmat)* <br>
141-
&emsp;&ensp; 1.9.14. **[Precision matrix and correlation matrix](/P/precmat-corrmat)** <br>
131+
&emsp;&ensp; 1.9.4. **[Symmetry](/P/cov-symm)** <br>
132+
&emsp;&ensp; 1.9.5. **[Self-covariance](/P/cov-var)** <br>
133+
&emsp;&ensp; 1.9.6. **[Covariance under independence](/P/cov-ind)** <br>
134+
&emsp;&ensp; 1.9.7. **[Relationship to correlation](/P/cov-corr)** <br>
135+
&emsp;&ensp; 1.9.8. **[Law of total covariance](/P/cov-tot)** <br>
136+
&emsp;&ensp; 1.9.9. *[Covariance matrix](/D/covmat)* <br>
137+
&emsp;&ensp; 1.9.10. *[Sample covariance matrix](/D/covmat-samp)* <br>
138+
&emsp;&ensp; 1.9.11. **[Covariance matrix and expected values](/P/covmat-mean)** <br>
139+
&emsp;&ensp; 1.9.12. **[Symmetry](/P/covmat-symm)** <br>
140+
&emsp;&ensp; 1.9.13. **[Positive semi-definiteness](/P/covmat-psd)** <br>
141+
&emsp;&ensp; 1.9.14. **[Invariance under addition of vector](/P/covmat-inv)** <br>
142+
&emsp;&ensp; 1.9.15. **[Scaling upon multiplication with matrix](/P/covmat-scal)** <br>
143+
&emsp;&ensp; 1.9.16. *[Cross-covariance matrix](/D/covmat-cross)* <br>
144+
&emsp;&ensp; 1.9.17. **[Covariance matrix of a sum](/P/covmat-sum)** <br>
145+
&emsp;&ensp; 1.9.18. **[Covariance matrix and correlation matrix](/P/covmat-corrmat)** <br>
146+
&emsp;&ensp; 1.9.19. *[Precision matrix](/D/precmat)* <br>
147+
&emsp;&ensp; 1.9.20. **[Precision matrix and correlation matrix](/P/precmat-corrmat)** <br>
142148

143149
1.10. Correlation <br>
144150
&emsp;&ensp; 1.10.1. *[Definition](/D/corr)* <br>

P/cov-symm.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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: 2022-09-26 12:14:00
9+
10+
title: "Symmetry of the covariance"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
theorem: "Symmetry"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2022
19+
title: "Covariance"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2022-09-26"
22+
url: "https://en.wikipedia.org/wiki/Covariance#Covariance_of_linear_combinations"
23+
24+
proof_id: "P353"
25+
shortcut: "cov-symm"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** The [covariance](/D/cov) of two [random variables](/D/rvar) is a symmetric function:
31+
32+
$$ \label{eq:cov-symm}
33+
\mathrm{Cov}(X,Y) = \mathrm{Cov}(Y,X) \; .
34+
$$
35+
36+
37+
**Proof:** The [covariance](/D/cov) of [random variables](/D/rvar) $X$ and $Y$ is defined as:
38+
39+
$$ \label{eq:cov}
40+
\mathrm{Cov}(X,Y) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y]) \right] \; .
41+
$$
42+
43+
Switching $X$ and $Y$ in \eqref{eq:cov}, we can easily see:
44+
45+
$$ \label{eq:cov-symm-qed}
46+
\begin{split}
47+
\mathrm{Cov}(Y,X) &\overset{\eqref{eq:cov}}{=} \mathrm{E}\left[ (Y-\mathrm{E}[Y]) (X-\mathrm{E}[X]) \right] \\
48+
&= \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y]) \right] \\
49+
&= \mathrm{Cov}(X,Y) \; .
50+
\end{split}
51+
$$

P/cov-var.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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: 2022-09-26 12:08:00
9+
10+
title: "Self-covariance equals variance"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
theorem: "Self-covariance"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2022
19+
title: "Covariance"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2022-09-26"
22+
url: "https://en.wikipedia.org/wiki/Covariance#Covariance_with_itself"
23+
24+
proof_id: "P352"
25+
shortcut: "cov-var"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** The [covariance](/D/cov) of a [random variable](/D/rvar) with itself is equal to the [variance](/D/var):
31+
32+
$$ \label{eq:cov-var}
33+
\mathrm{Cov}(X,X) = \mathrm{Var}(X) \; .
34+
$$
35+
36+
37+
**Proof:** The [covariance](/D/cov) of [random variables](/D/rvar) $X$ and $Y$ is defined as:
38+
39+
$$ \label{eq:cov}
40+
\mathrm{Cov}(X,Y) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y]) \right] \; .
41+
$$
42+
43+
Inserting $X$ for $Y$ in \eqref{eq:cov}, the result is the [variance](/D/var) of $X$:
44+
45+
$$ \label{eq:cov-var-qed}
46+
\begin{split}
47+
\mathrm{Cov}(X,X) &\overset{\eqref{eq:cov}}{=} \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X]) \right] \\
48+
&= \mathrm{E}\left[ (X-\mathrm{E}[X])^2 \right] \\
49+
&= \mathrm{Var}(X) \; .
50+
\end{split}
51+
$$

P/covmat-psd.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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: 2022-09-26 11:26:00
9+
10+
title: "Positive semi-definiteness of the covariance matrix"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
theorem: "Positive semi-definiteness"
15+
16+
sources:
17+
- authors: "hkBattousai"
18+
year: 2013
19+
title: "What is the proof that covariance matrices are always semi-definite?"
20+
in: "StackExchange Mathematics"
21+
pages: "retrieved on 2022-09-26"
22+
url: "https://math.stackexchange.com/a/327872"
23+
- authors: "Wikipedia"
24+
year: 2022
25+
title: "Covariance matrix"
26+
in: "Wikipedia, the free encyclopedia"
27+
pages: "retrieved on 2022-09-26"
28+
url: "https://en.wikipedia.org/wiki/Covariance_matrix#Basic_properties"
29+
30+
proof_id: "P351"
31+
shortcut: "covmat-psd"
32+
username: "JoramSoch"
33+
---
34+
35+
36+
**Theorem:** Each [covariance matrix](/D/covmat) is positive semi-definite:
37+
38+
$$ \label{eq:covmat-symm}
39+
a^\mathrm{T} \Sigma_{XX} a \geq 0 \quad \text{for all} \quad a \in \mathbb{R}^n \; .
40+
$$
41+
42+
43+
**Proof:** The [covariance matrix](/D/covmat) of $X$ [can be expressed](/P/covmat-mean) in terms of [expected values](/D/mean) as follows
44+
45+
$$ \label{eq:covmat}
46+
\Sigma_{XX} = \Sigma(X) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} \right]
47+
$$
48+
49+
A positive semi-definite matrix is a matrix whose eigenvalues are all non-negative or, equivalently,
50+
51+
$$ \label{eq:psd}
52+
M \; \text{pos. semi-def.} \quad \Leftrightarrow \quad x^\mathrm{T} M x \geq 0 \quad \text{for all} \quad x \in \mathbb{R}^n \; .
53+
$$
54+
55+
Here, for an arbitrary real column vector $a \in \mathbb{R}^n$, we have:
56+
57+
$$ \label{eq:covmat-symm-s1}
58+
a^\mathrm{T} \Sigma_{XX} a \overset{\eqref{eq:covmat}}{=} a^\mathrm{T} \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} \right] a \; .
59+
$$
60+
61+
Because the [expected value is a linear operator](/P/mean-lin), we can write:
62+
63+
$$ \label{eq:covmat-symm-s2}
64+
a^\mathrm{T} \Sigma_{XX} a = \mathrm{E}\left[ a^\mathrm{T} (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} a \right] \; .
65+
$$
66+
67+
Now define the [scalar random variable](/D/rvar)
68+
69+
$$ \label{eq:Y-X}
70+
Y = a^\mathrm{T} (X-\mu_X) \; .
71+
$$
72+
73+
where $\mu_X = \mathrm{E}[X]$ and note that
74+
75+
$$ \label{eq:YT-Y}
76+
a^\mathrm{T} (X-\mu_X) = (X-\mu_X)^\mathrm{T} a \; .
77+
$$
78+
79+
Thus, combing \eqref{eq:covmat-symm-s2} with \eqref{eq:Y-X}, we have:
80+
81+
$$ \label{eq:covmat-symm-s3}
82+
a^\mathrm{T} \Sigma_{XX} a = \mathrm{E}\left[ Y^2 \right] \; .
83+
$$
84+
85+
Because $Y^2$ is a random variable that cannot become negative and the [expected value of a strictly non-negative random variable is also non-negative](/P/mean-nonneg), we finally have
86+
87+
$$ \label{eq:covmat-symm-s4}
88+
a^\mathrm{T} \Sigma_{XX} a \geq 0
89+
$$
90+
91+
for any $a \in \mathbb{R}^n$.

P/covmat-sum.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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: 2022-09-26 10:37:00
9+
10+
title: "Covariance of the sum of two random vectors"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
theorem: "Covariance matrix of a sum"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2022
19+
title: "Covariance matrix"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2022-09-26"
22+
url: "https://en.wikipedia.org/wiki/Covariance_matrix#Basic_properties"
23+
24+
proof_id: "P349"
25+
shortcut: "covmat-sum"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** The [covariance matrix](/D/covmat) of the sum of two [random vectors](/D/rvec) of the same dimension equals the sum of the covariances of those random vectors, plus the sum of their [cross-covariances](/D/covmat-cross):
31+
32+
$$ \label{eq:covmat-sum}
33+
\Sigma(X+Y) = \Sigma_{XX} + \Sigma_{YY} + \Sigma_{XY} + \Sigma_{YX} \; .
34+
$$
35+
36+
37+
**Proof:** The [covariance matrix](/D/covmat) of $X$ [can be expressed](/P/covmat-mean) in terms of [expected values](/D/mean) as follows
38+
39+
$$ \label{eq:covmat}
40+
\Sigma_{XX} = \Sigma(X) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} \right]
41+
$$
42+
43+
and the [cross-covariance matrix](/D/covmat-cross) of $X$ and $Y$ can similarly be written as
44+
45+
$$ \label{eq:covmat-cross}
46+
\Sigma_{XY} = \Sigma(X,Y) = \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y])^\mathrm{T} \right]
47+
$$
48+
49+
Using this and the [linearity of the expected value](/P/mean-lin) as well as the definitions of [covariance matrix](/D/covmat) and [cross-covariance matrix](/D/covmat-cross), we can derive \eqref{eq:covmat-sum} as follows:
50+
51+
$$ \label{eq:covmat-sum-qed}
52+
\begin{split}
53+
\Sigma(X+Y) &\overset{\eqref{eq:covmat}}{=} \mathrm{E}\left[ ([X+Y]-\mathrm{E}[X+Y]) ([X+Y]-\mathrm{E}[X+Y])^\mathrm{T} \right] \\
54+
&= \mathrm{E}\left[ ([X-\mathrm{E}(X)] + [Y-\mathrm{E}(Y)]) ([X-\mathrm{E}(X)] + [Y-\mathrm{E}(Y)])^\mathrm{T} \right] \\
55+
&= \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} + (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y])^\mathrm{T} + (Y-\mathrm{E}[Y]) (X-\mathrm{E}[X])^\mathrm{T} + (Y-\mathrm{E}[Y]) (Y-\mathrm{E}[Y])^\mathrm{T} \right] \\
56+
&= \mathrm{E}\left[ (X-\mathrm{E}[X]) (X-\mathrm{E}[X])^\mathrm{T} \right] + \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y])^\mathrm{T} \right] + \mathrm{E}\left[ (Y-\mathrm{E}[Y]) (X-\mathrm{E}[X])^\mathrm{T} \right] + \mathrm{E}\left[ (Y-\mathrm{E}[Y]) (Y-\mathrm{E}[Y])^\mathrm{T} \right] \\
57+
&\overset{\eqref{eq:covmat}}{=} \Sigma_{XX} + \Sigma_{YY} + \mathrm{E}\left[ (X-\mathrm{E}[X]) (Y-\mathrm{E}[Y])^\mathrm{T} \right] + \mathrm{E}\left[ (Y-\mathrm{E}[Y]) (X-\mathrm{E}[X])^\mathrm{T} \right] \\
58+
&\overset{\eqref{eq:covmat-cross}}{=} \Sigma_{XX} + \Sigma_{YY} + \Sigma_{XY} + \Sigma_{YX} \; .
59+
\end{split}
60+
$$

0 commit comments

Comments
 (0)