You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/lln_clt.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,14 @@ jupytext:
3
3
text_representation:
4
4
extension: .md
5
5
format_name: myst
6
-
format_version: 0.13
7
-
jupytext_version: 1.14.4
8
6
kernelspec:
9
-
display_name: Python 3 (ipykernel)
7
+
display_name: Python 3
10
8
language: python
11
9
name: python3
12
10
---
13
11
14
-
## LLN and CLT
12
+
13
+
# LLN and CLT
15
14
16
15
## Overview
17
16
@@ -173,8 +172,6 @@ Let's also imagine that we can generate infinite sequences so that the statement
173
172
In this setting, {eq}`lln_as` should be interpreted as meaning that the probability of the computer producing a sequence where $\bar X_n \to \mu$ fails to occur
174
173
is zero.
175
174
176
-
+++ {"tags": []}
177
-
178
175
### Illustration
179
176
180
177
```{index} single: Law of Large Numbers; Illustration
@@ -479,7 +476,7 @@ Repeat the simulation in [simulation 1](sim_one) with [beta distribution](https:
479
476
You can choose any $\alpha > 0$ and $\beta > 0$.
480
477
```
481
478
482
-
```{solution-start}
479
+
```{solution-start}lln_ex1
483
480
:class: dropdown
484
481
```
485
482
@@ -514,20 +511,19 @@ plt.show()
514
511
```{solution-end}
515
512
```
516
513
517
-
```{exercise}
514
+
````{exercise}
518
515
:label: lln_ex2
519
516
520
517
Although NumPy doesn't give us a `bernoulli` function, we can generate a draw of $X$ using NumPy via
521
518
522
-
```{code-cell} ipython3
519
+
```python3
523
520
U = np.random.rand()
524
521
X = 1 if U < p else 0
525
522
print(X)
526
523
```
527
524
528
525
Explain why this provides a random variable $X$ with the right distribution.
0 commit comments