def test_mc_normal():
"""kstest returns:
1. KS statistic
2. pvalue
if pvalue > 0.05 (5%) we accept the null hypothesis:
H0: our random variable from simulation follow the distribution with
the parameters obtained from 'stats.dist.fit'.
"""
x = montecarlo.normal(1000, 0, 1)
ks = stats.kstest(x, 'norm', stats.norm.fit(x))
assert ks[1] > .05
评论列表
文章目录