【发布时间】:2020-05-01 07:17:43
【问题描述】:
请问有人知道是否有一个库可以根据引导标准错误而不是 python 中的常规标准错误来计算 t 统计量?找了很久,好像没有人啊……先谢谢了。
【问题讨论】:
-
不幸的是,软件推荐离题了。
标签: python t-test standard-error
请问有人知道是否有一个库可以根据引导标准错误而不是 python 中的常规标准错误来计算 t 统计量?找了很久,好像没有人啊……先谢谢了。
【问题讨论】:
标签: python t-test standard-error
Bootstrapping 可以在 Python 中使用bootstrapped 包(GitHub、PyPI)执行:
import numpy as np
import bootstrapped.bootstrap as bs
import bootstrapped.stats_functions as bs_stats
mean = 100
stdev = 10
population = np.random.normal(loc=mean, scale=stdev, size=50000)
# take 1k 'samples' from the larger population
samples = population[:1000]
print(bs.bootstrap(samples, stat_func=bs_stats.mean))
>> 100.08 (99.46, 100.69)
print(bs.bootstrap(samples, stat_func=bs_stats.std))
>> 9.49 (9.92, 10.36)
【讨论】: