Skip to content

数理统计与估计 — 练习

Download exercise.py

实现 sample_variance(x, unbiased=True)。对 {1,2,3,4,5}:无偏应是 2.5,MLE(unbiased=False)应是 2.0。先减均值再平方和,最后再选除数。

bash
cd docs/math/estimation/code
python exercise.py

源码位置

docs/math/estimation/code/exercise.py