官术网_书友最值得收藏!

Normal distribution

This very common continuous random function, also called a Gaussian function, can be defined with the simple metrics of the mean and the variance, although in a somewhat complex form.

This is the canonical form of the function:

Take a look at the following code snippet:

    import matplotlib.pyplot as plt #Import the plot library 
import numpy as np
mu=0.
sigma=2.
distro = np.random.normal(mu, sigma, 10000)
plt.hist(distro, 100, normed=True)
plt.show()

The following graph shows the generated distribution's histogram:

Normal distribution
主站蜘蛛池模板: 云南省| 顺昌县| 集贤县| 嘉黎县| 彭泽县| 静乐县| 佛教| 古浪县| 瑞金市| 河源市| 莎车县| 南城县| 武定县| 文登市| 铜鼓县| 株洲县| 项城市| 濉溪县| 卢氏县| 黔东| 皮山县| 泸定县| 元谋县| 宜章县| 德安县| 贡觉县| 吴桥县| 常熟市| 昌邑市| 福泉市| 甘泉县| 清水河县| 新丰县| 左权县| 濮阳县| 临洮县| 宜兰县| 南投市| 宜兰市| 靖边县| 腾冲县|