forked from fri-datascience/course_pou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-Introduction2.Rmd
95 lines (67 loc) · 2.42 KB
/
01-Introduction2.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Probability spaces {#introduction}
This chapter deals with measures and probability spaces. At the end of
the chapter, we look more closely at discrete probability spaces.
The students are expected to acquire the following knowledge:
**Theoretical**
- Use properties of probability to calculate probabilities.
- Combinatorics.
- Understanding of continuity of probability.
**R**
- Vectors and vector operations.
- For loop.
- Estimating probability with simulation.
- *sample* function.
- Matrices and matrix operations.
```{r, echo = FALSE}
togs <- T
tog_ex <- T
```
<style>
.fold-btn {
float: right;
margin: 5px 5px 0 0;
}
.fold {
border: 1px solid black;
min-height: 40px;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$folds = $(".fold");
$folds.wrapInner("<div class=\"fold-blck\">"); // wrap a div container around content
$folds.prepend("<button class=\"fold-btn\">Unfold Solution</button>"); // add a button
$(".fold-blck").toggle(); // fold all blocks
$(".fold-btn").on("click", function() { // add onClick event
$(this).text($(this).text() === "Fold Solution" ? "Unfold Solution" : "Fold Solution"); // if the text equals "Fold", change it to "Unfold"or else to "Fold"
$(this).next(".fold-blck").toggle("linear"); // "swing" is the default easing function. This can be further customized in its speed or the overall animation itself.
})
});
</script>
## Measure and probability spaces
```{exercise, name = "Completing a set to a sigma algebra"}
Let $\Omega = \{1,2,...,10\}$ and let $A = \{\emptyset, \{1\}, \{2\}, \Omega \}$.
a. Show that $A$ is not a sigma algebra of $\Omega$.
b. Find the minimum number of elements to complete A to a sigma algebra of
$\Omega$.
```
<div class="fold">
```{solution, echo = tog_ex}
a. $1^c = \{2,3,...,10\} \notin A \implies$ $A$ is not sigma algebra.
b. First we need the complements of all elements, so we need to add sets
$\{2,3,...,10\}$ and $\{1,3,4,...,10\}$. Next we need unions of all sets --
we add the set $\{1,2\}$. Again we need the complement of this set, so we add
$\{3,4,...,10\}$. So the minimum number of elements we need to add is 4.
```
</div>
```{exercise, name = "Diversity of sigma algebras"}
Let $\Omega$ be a set.
a. Find the smallest sigma algebra of $\Omega$.
b. Find the largest sigma algebra of $\Omega$.
```
<div class="fold">
```{solution, echo = togs}
a. $A = \{\emptyset, \Omega\}$
b. $2^{\Omega}$
```
</div>