python|Python绘制概率曲线三

Python绘制概率曲线三 代码实现

import numpy as np import matplotlib.pyplot as plt def test3(n1, m111=500): out11 = [] # np.random.standard_t result11 = np.random.standard_t(1, size=n1 * m111) #print(result) for i in range(m111): average0 = 0 for j in range(n): average0 += result11[n1 * i+ j] if j == n - 1: out11.append(average0 / n1) average0 = 0 #print(out11)plt.hist(out11,bins=20) plt.title("test (3)") plt.show() test3(30)

    推荐阅读