Skip to content

Commit b054825

Browse files
authored
Merge pull request #139 from JoramSoch/master
added 3 definitions and 3 proofs
2 parents db17464 + b1f3be8 commit b054825

7 files changed

Lines changed: 327 additions & 18 deletions

File tree

D/eve-spc.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: 2021-11-26 14:26:00
9+
10+
title: "Event space"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Random experiments"
14+
definition: "Event space"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Event (probability theory)"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Event_(probability_theory)"
23+
24+
def_id: "D166"
25+
shortcut: "eve-spc"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Definition:** Given a [random experiment](/D/rexp), an event space $\mathcal{E}$ is any set of events, where an [event](/D/reve) is any set of zero or more elements from the [sample space](/D/samp-spc) $\Omega$ of this experiment.

D/prob-spc.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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: 2021-11-26 14:30:00
9+
10+
title: "Probability space"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Random experiments"
14+
definition: "Probability space"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Probability space"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Probability_space#Definition"
23+
24+
def_id: "D167"
25+
shortcut: "prob-spc"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Definition:** Given a [random experiment](/D/rexp), a probability space $(\Omega, \mathcal{E}, P)$ is a triple consisting of
31+
32+
* the [sample space](/D/samp-spc) $\Omega$, i.e. the set of all possible outcomes from this experiment;
33+
34+
* an [event space](/D/eve-spc) $\mathcal{E} \subseteq 2^\Omega$, i.e. a set of subsets from the sample space, called [events](/D/reve);
35+
36+
* a [probability measure](/D/prob-meas) $P: \; \mathcal{E} \rightarrow [0,1]$, i.e. a function mapping from the [event space](/D/eve-spc) to the real numbers, observing the [axioms of probability](/D/prob-ax).

D/samp-spc.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: 2021-11-26 14:13:00
9+
10+
title: "Sample space"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Random experiments"
14+
definition: "Sample space"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Sample space"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Sample_space"
23+
24+
def_id: "D165"
25+
shortcut: "samp-spc"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Definition:** Given a [random experiment](/D/rexp), the set of all possible outcomes from this experiment is called the sample space of the experiment. A sample space is usually denoted as $\Omega$ and specified using set notation.

I/ToC.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ title: "Table of Contents"
1616

1717
1. Probability theory
1818

19-
1.1. Random variables <br>
19+
1.1. Random experiments <br>
2020
&emsp;&ensp; 1.1.1. *[Random experiment](/D/rexp)* <br>
21-
&emsp;&ensp; 1.1.2. *[Random event](/D/reve)* <br>
22-
&emsp;&ensp; 1.1.3. *[Random variable](/D/rvar)* <br>
23-
&emsp;&ensp; 1.1.4. *[Random vector](/D/rvec)* <br>
24-
&emsp;&ensp; 1.1.5. *[Random matrix](/D/rmat)* <br>
25-
&emsp;&ensp; 1.1.6. *[Constant](/D/const)* <br>
26-
&emsp;&ensp; 1.1.7. *[Discrete vs. continuous](/D/rvar-disc)* <br>
27-
&emsp;&ensp; 1.1.8. *[Univariate vs. multivariate](/D/rvar-uni)* <br>
21+
&emsp;&ensp; 1.1.2. *[Sample space](/D/samp-spc)* <br>
22+
&emsp;&ensp; 1.1.3. *[Event space](/D/eve-spc)* <br>
23+
&emsp;&ensp; 1.1.4. *[Probability space](/D/prob-spc)* <br>
24+
25+
1.1. Random variables <br>
26+
&emsp;&ensp; 1.1.1. *[Random event](/D/reve)* <br>
27+
&emsp;&ensp; 1.1.2. *[Random variable](/D/rvar)* <br>
28+
&emsp;&ensp; 1.1.3. *[Random vector](/D/rvec)* <br>
29+
&emsp;&ensp; 1.1.4. *[Random matrix](/D/rmat)* <br>
30+
&emsp;&ensp; 1.1.5. *[Constant](/D/const)* <br>
31+
&emsp;&ensp; 1.1.6. *[Discrete vs. continuous](/D/rvar-disc)* <br>
32+
&emsp;&ensp; 1.1.7. *[Univariate vs. multivariate](/D/rvar-uni)* <br>
2833

2934
1.2. Probability <br>
3035
&emsp;&ensp; 1.2.1. *[Probability](/D/prob)* <br>
@@ -98,9 +103,10 @@ title: "Table of Contents"
98103
&emsp;&ensp; 1.6.6. **[Monotonicity](/P/mean-mono)** <br>
99104
&emsp;&ensp; 1.6.7. **[(Non-)Multiplicativity](/P/mean-mult)** <br>
100105
&emsp;&ensp; 1.6.8. **[Expectation of a quadratic form](/P/mean-qf)** <br>
101-
&emsp;&ensp; 1.6.9. **[Law of the unconscious statistician](/P/mean-lotus)** <br>
102-
&emsp;&ensp; 1.6.10. *[Expected value of a random vector](/D/mean-rvec)* <br>
103-
&emsp;&ensp; 1.6.11. *[Expected value of a random matrix](/D/mean-rmat)* <br>
106+
&emsp;&ensp; 1.6.9. **[Law of total expectation](/P/mean-tot)** <br>
107+
&emsp;&ensp; 1.6.10. **[Law of the unconscious statistician](/P/mean-lotus)** <br>
108+
&emsp;&ensp; 1.6.11. *[Expected value of a random vector](/D/mean-rvec)* <br>
109+
&emsp;&ensp; 1.6.12. *[Expected value of a random matrix](/D/mean-rmat)* <br>
104110

105111
1.7. Variance <br>
106112
&emsp;&ensp; 1.7.1. *[Definition](/D/var)* <br>
@@ -113,20 +119,22 @@ title: "Table of Contents"
113119
&emsp;&ensp; 1.7.8. **[Variance of a sum](/P/var-sum)** <br>
114120
&emsp;&ensp; 1.7.9. **[Variance of linear combination](/P/var-lincomb)** <br>
115121
&emsp;&ensp; 1.7.10. **[Additivity under independence](/P/var-add)** <br>
116-
&emsp;&ensp; 1.7.11. *[Precision](/D/prec)* <br>
122+
&emsp;&ensp; 1.7.11. **[Law of total variance](/P/var-tot)** <br>
123+
&emsp;&ensp; 1.7.12. *[Precision](/D/prec)* <br>
117124

118125
1.8. Covariance <br>
119126
&emsp;&ensp; 1.8.1. *[Definition](/D/cov)* <br>
120127
&emsp;&ensp; 1.8.2. *[Sample covariance](/D/cov-samp)* <br>
121128
&emsp;&ensp; 1.8.3. **[Partition into expected values](/P/cov-mean)** <br>
122129
&emsp;&ensp; 1.8.4. **[Covariance under independence](/P/cov-ind)** <br>
123130
&emsp;&ensp; 1.8.5. **[Relationship to correlation](/P/cov-corr)** <br>
124-
&emsp;&ensp; 1.8.6. *[Covariance matrix](/D/covmat)* <br>
125-
&emsp;&ensp; 1.8.7. *[Sample covariance matrix](/D/covmat-samp)* <br>
126-
&emsp;&ensp; 1.8.8. **[Covariance matrix and expected values](/P/covmat-mean)** <br>
127-
&emsp;&ensp; 1.8.9. **[Covariance matrix and correlation matrix](/P/covmat-corrmat)** <br>
128-
&emsp;&ensp; 1.8.10. *[Precision matrix](/D/precmat)* <br>
129-
&emsp;&ensp; 1.8.11. **[Precision matrix and correlation matrix](/P/precmat-corrmat)** <br>
131+
&emsp;&ensp; 1.8.6. **[Law of total covariance](/P/cov-tot)** <br>
132+
&emsp;&ensp; 1.8.7. *[Covariance matrix](/D/covmat)* <br>
133+
&emsp;&ensp; 1.8.8. *[Sample covariance matrix](/D/covmat-samp)* <br>
134+
&emsp;&ensp; 1.8.9. **[Covariance matrix and expected values](/P/covmat-mean)** <br>
135+
&emsp;&ensp; 1.8.10. **[Covariance matrix and correlation matrix](/P/covmat-corrmat)** <br>
136+
&emsp;&ensp; 1.8.11. *[Precision matrix](/D/precmat)* <br>
137+
&emsp;&ensp; 1.8.12. **[Precision matrix and correlation matrix](/P/precmat-corrmat)** <br>
130138

131139
1.9. Correlation <br>
132140
&emsp;&ensp; 1.9.1. *[Definition](/D/corr)* <br>

P/cov-tot.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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-11-26 11:38:00
9+
10+
title: "Law of total covariance"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Covariance"
14+
theorem: "Law of total covariance"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Law of total covariance"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Law_of_total_covariance#Proof"
23+
24+
proof_id: "P293"
25+
shortcut: "cov-tot"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $X$, $Y$ and $Z$ be [random variables](/D/rvar) defined on the same [probability space](/D/prob-spc) and assume that the [covariance](/D/cov) of $X$ and $Y$ is finite. Then, the sum of the [expectation](/D/mean) of the conditional covariance and the [covariance](/D/cov) of the conditional expectations of $X$ and $Y$ given $Z$ is equal to the [covariance](/D/cov) of $X$ and $Y$:
31+
32+
$$ \label{eq:cov-tot}
33+
\mathrm{Cov}(X,Y) = \mathrm{E}[\mathrm{Cov}(X,Y \vert Z)] + \mathrm{Cov}[\mathrm{E}(X \vert Z),\mathrm{E}(Y \vert Z)] \; .
34+
$$
35+
36+
37+
**Proof:** The [covariance can be decomposed into expected values](/P/cov-mean) as follows:
38+
39+
$$ \label{eq:cov-tot-s1}
40+
\mathrm{Cov}(X,Y) = \mathrm{E}(XY) - \mathrm{E}(X) \mathrm{E}(Y) \; .
41+
$$
42+
43+
Then, conditioning on $Z$ and applying the [law of total expectation](/P/mean-tot), we have:
44+
45+
$$ \label{eq:cov-tot-s2}
46+
\mathrm{Cov}(X,Y) = \mathrm{E}\left[ \mathrm{E}(XY \vert Z) \right] - \mathrm{E}\left[ \mathrm{E}(X \vert Z ) \right] \mathrm{E}\left[ \mathrm{E}(Y \vert Z) \right] \; .
47+
$$
48+
49+
Applying the [decomposition of covariance into expected values](/P/cov-mean) to the first term gives:
50+
51+
$$ \label{eq:cov-tot-s3}
52+
\mathrm{Cov}(X,Y) = \mathrm{E}\left[ \mathrm{Cov}(X,Y \vert Z) + \mathrm{E}(X \vert Z) \mathrm{E}(Y \vert Z) \right] - \mathrm{E}\left[ \mathrm{E}(X \vert Z ) \right] \mathrm{E}\left[ \mathrm{E}(Y \vert Z) \right] \; .
53+
$$
54+
55+
With the [linearity of the expected value](/P/mean-lin), the terms can be regrouped to give:
56+
57+
$$ \label{eq:cov-tot-s4}
58+
\mathrm{Cov}(X,Y) = \mathrm{E}\left[ \mathrm{Cov}(X,Y \vert Z) \right] + \left( \mathrm{E}\left[ \mathrm{E}(X \vert Z) \mathrm{E}(Y \vert Z) \right] - \mathrm{E}\left[ \mathrm{E}(X \vert Z ) \right] \mathrm{E}\left[ \mathrm{E}(Y \vert Z) \right] \right) \; .
59+
$$
60+
61+
Once more using the [decomposition of covariance into expected values](/P/cov-mean), we finally have:
62+
63+
$$ \label{eq:var-tot-s5}
64+
\mathrm{Cov}(X,Y) = \mathrm{E}[\mathrm{Cov}(X,Y \vert Z)] + \mathrm{Cov}[\mathrm{E}(X \vert Z),\mathrm{E}(Y \vert Z)] \; .
65+
$$

P/mean-tot.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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-11-26 10:57:00
9+
10+
title: "Law of total expectation"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Expected value"
14+
theorem: "Law of total expectation"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Law of total expectation"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Law_of_total_expectation#Proof_in_the_finite_and_countable_cases"
23+
24+
proof_id: "P291"
25+
shortcut: "mean-tot"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $X$ be a [random variable](/D/rvar) with [expected value](/D/mean) $\mathrm{E}(X)$ and let $Y$ be any [random variable](/D/var) defined on the same [probability space](/D/prob-spc). Then, the [expected value](/D/mean) of the [conditional expectation](/D/mean-cond) of $X$ given $Y$ is the same as the [expected value](/D/mean) of $X$:
31+
32+
$$ \label{eq:mean-tot}
33+
\mathrm{E}(X) = \mathrm{E}[\mathrm{E}(X \vert Y)] \; .
34+
$$
35+
36+
37+
**Proof:** Let $X$ and $Y$ be [discrete random variables](/D/rvar-disc) with sets of possible outcomes $\mathcal{X}$ and $\mathcal{Y}$. Then, the expectation of the conditional expetectation can be rewritten as:
38+
39+
$$ \label{eq:mean-tot-s1}
40+
\begin{split}
41+
\mathrm{E}[\mathrm{E}(X \vert Y)] &= \mathrm{E}\left[ \sum_{x \in \mathcal{X}} x \cdot \mathrm{Pr}(X = x \vert Y) \right] \\
42+
&= \sum_{y \in \mathcal{Y}} \left[ \sum_{x \in \mathcal{X}} x \cdot \mathrm{Pr}(X = x \vert Y = y) \right] \cdot \mathrm{Pr}(Y = y) \\
43+
&= \sum_{x \in \mathcal{X}} \sum_{y \in \mathcal{Y}} x \cdot \mathrm{Pr}(X = x \vert Y = y) \cdot \mathrm{Pr}(Y = y) \; .
44+
\end{split}
45+
$$
46+
47+
Using the [law of conditional probability](/D/prob-cond), this becomes:
48+
49+
$$ \label{eq:mean-tot-s2}
50+
\begin{split}
51+
\mathrm{E}[\mathrm{E}(X \vert Y)] &= \sum_{x \in \mathcal{X}} \sum_{y \in \mathcal{Y}} x \cdot \mathrm{Pr}(X = x, Y = y) \\
52+
&= \sum_{x \in \mathcal{X}} x \sum_{y \in \mathcal{Y}} \mathrm{Pr}(X = x, Y = y) \; .
53+
\end{split}
54+
$$
55+
56+
Using the [law of marginal probability](/D/prob-marg), this becomes:
57+
58+
$$ \label{eq:mean-tot-s3}
59+
\begin{split}
60+
\mathrm{E}[\mathrm{E}(X \vert Y)] &= \sum_{x \in \mathcal{X}} x \cdot \mathrm{Pr}(X = x) \\
61+
&= \mathrm{E}(X) \; .
62+
\end{split}
63+
$$

P/var-tot.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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-11-26 11:20:00
9+
10+
title: "Law of total variance"
11+
chapter: "General Theorems"
12+
section: "Probability theory"
13+
topic: "Variance"
14+
theorem: "Law of total expectation"
15+
16+
sources:
17+
- authors: "Wikipedia"
18+
year: 2021
19+
title: "Law of total variance"
20+
in: "Wikipedia, the free encyclopedia"
21+
pages: "retrieved on 2021-11-26"
22+
url: "https://en.wikipedia.org/wiki/Law_of_total_variance#Proof"
23+
24+
proof_id: "P292"
25+
shortcut: "var-tot"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $X$ and $Y$ be [random variables](/D/rvar) defined on the same [probability space](/D/prob-spc) and assume that the [variance](/D/var) of $Y$ is finite. Then, the sum of the [expectation](/D/mean) of the conditional variance and the [variance](/D/var) of the conditional expectation of $Y$ given $X$ is equal to the [variance](/D/var) of $Y$:
31+
32+
$$ \label{eq:var-tot}
33+
\mathrm{Var}(Y) = \mathrm{E}[\mathrm{Var}(Y \vert X)] + \mathrm{Var}[\mathrm{E}(Y \vert X)] \; .
34+
$$
35+
36+
37+
**Proof:** The [variance can be decomposed into expected values](/P/var-mean) as follows:
38+
39+
$$ \label{eq:var-tot-s1}
40+
\mathrm{Var}(Y) = \mathrm{E}(Y^2) - \mathrm{E}(Y)^2 \; .
41+
$$
42+
43+
This can be rearranged into:
44+
45+
$$ \label{eq:var-tot-s2}
46+
\mathrm{E}(Y^2) = \mathrm{Var}(Y) + \mathrm{E}(Y)^2 \; .
47+
$$
48+
49+
Applying the [law of total expectation](/P/mean-tot), we have:
50+
51+
$$ \label{eq:var-tot-s3}
52+
\mathrm{E}(Y^2) = \mathrm{E}\left[ \mathrm{Var}(Y \vert X) + \mathrm{E}(Y \vert X)^2 \right] \; .
53+
$$
54+
55+
Now subtract the second term from \eqref{eq:var-tot-s1}:
56+
57+
$$ \label{eq:var-tot-s4}
58+
\mathrm{E}(Y^2) - \mathrm{E}(Y)^2 = \mathrm{E}\left[ \mathrm{Var}(Y \vert X) + \mathrm{E}(Y \vert X)^2 \right] - \mathrm{E}(Y)^2 \; .
59+
$$
60+
61+
Again applying the [law of total expectation](/P/mean-tot), we have:
62+
63+
$$ \label{eq:var-tot-s5}
64+
\mathrm{E}(Y^2) - \mathrm{E}(Y)^2 = \mathrm{E}\left[ \mathrm{Var}(Y \vert X) + \mathrm{E}(Y \vert X)^2 \right] - \mathrm{E}\left[ \mathrm{E}(Y \vert X) \right]^2 \; .
65+
$$
66+
67+
With the [linearity of the expected value](/P/mean-lin), the terms can be regrouped to give:
68+
69+
$$ \label{eq:var-tot-s6}
70+
\mathrm{E}(Y^2) - \mathrm{E}(Y)^2 = \mathrm{E}\left[ \mathrm{Var}(Y \vert X) \right] + \left( \mathrm{E}\left[ \mathrm{E}(Y \vert X)^2 \right] - \mathrm{E}\left[ \mathrm{E}(Y \vert X) \right]^2 \right) \; .
71+
$$
72+
73+
Using the [decomposition of variance into expected values](/P/var-mean), we finally have:
74+
75+
$$ \label{eq:var-tot-s7}
76+
\mathrm{Var}(Y) = \mathrm{E}[\mathrm{Var}(Y \vert X)] + \mathrm{Var}[\mathrm{E}(Y \vert X)] \; .
77+
$$

0 commit comments

Comments
 (0)