Skip to content
BIASED
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 .ipynb

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 · Данные: Xi∼Exp(1)X_i\sim\mathrm{Exp}(1) (mean=1, var=1), n=50n=50, M=4000M=4000 повторов.

Ожидаемые числа (seed 0)
Quantity Value Tolerance
std of means ≈1/50≈0.14142\approx 1/\sqrt{50}\approx 0.14142 abs ≤ 0.02
mean of means ≈1\approx 1 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 ≈ 1/501/\sqrt{50}