Back to topic
Optional
CLT histogram of sample means
Sample means of size n; match std to σ/√n and a Normal shape.
- Version
- v1
- Minutes
- ~20
- Evidence
- Self-check in the notebook
Until platform auto-check exists, compare cell output with the expected numbers in the notebook. This is not a debt and does not affect mastery.
Download the notebook and run it locally. Its environment requirements are listed inside.
Notebook contents
Readable on your phone. The code below has not been executed in the browser; download the notebook to run it.
Prob · ЦПТ средних / CLT of sample means
Activity version: 1 · Seed: 0 · Данные: (mean=1, var=1), , повторов.
Ожидаемые числа (seed 0)
| Quantity | Value | Tolerance |
|---|---|---|
| std of means | abs ≤ 0.02 | |
| mean of means | abs ≤ 0.02 |
Самопроверка в ноутбуке
Не влияет на mastery.
import numpy as np
rng = np.random.default_rng(0)
n, M = 50, 4000
samples = rng.exponential(scale=1.0, size=(M, n))
means = samples.mean(axis=1)
print("mean", means.mean(), "std", means.std(ddof=0))
assert abs(means.mean() - 1.0) < 0.02
assert abs(means.std(ddof=0) - 1 / np.sqrt(n)) < 0.02
print("OK: CLT sample means")Самопроверка в ноутбуке
- среднее средних ≈ 1
- std ≈