import pandas as pd import numpy as np import matplotlib.pyplot as plt rate_list=np.random.randn(100000) result=[] for i in range(1000): rate_short=np.random.choice(rate_list,100) rate_long=0rate_list[:] result.append(rate_long.std()-rate_short.std()) result=pd.Series(result) plt.hist(result,bins=50) plt.title('the difference between the short period std and long period std') plt.show()
如上,通过模拟生成10万个标准正态分布的随机数,然后分别随机抽样100个和总体的计算标准差的差值,发现差值的期望为0,也就是可以认为这种状态下的标准差是无偏估计?