多变的夏普率二---正态分布约束下的样本的标准差是无偏估计?

版权声明:本文为博主原创文章,转载请注明来源 https://blog.csdn.net/qq_26948675/article/details/80387105
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,也就是可以认为这种状态下的标准差是无偏估计?



猜你喜欢

转载自blog.csdn.net/qq_26948675/article/details/80387105
今日推荐