參考資料
https://baike.baidu.com/item/%E6%AD%A3%E6%80%81%E5%88%86%E5%B8%83/829892?fr=aladdin
一維正態分佈
若隨機變量 服從一個位置參數爲 、尺度參數爲 的概率分佈,且其概率密度函數爲
則這個隨機變量就稱爲正態隨機變量,正態隨機變量服從的分佈就稱爲正態分佈,記作 ,讀作 服從 ,或 服從正態分佈。
標準正態分佈
當 時,正態分佈就成爲標準正態分佈
Python 繪製正態分佈的代碼
import numpy as np
import matplotlib.pyplot as plt
import math
def normal_distribution(x, mu, sigma):
return np.exp( -1 * ( (x-mu) ** 2) / ( 2 * (sigma ** 2)) ) / (math.sqrt( 2 * np.pi ) * sigma)
mu, sigma = 0, 1
x = np.linspace( mu - 6 * sigma, mu + 6 * sigma, 100)
y = normal_distribution(x, mu, sigma)
plt.plot(x, y, 'r', label='mu = 0,sigma = 1')
plt.legend()
plt.grid()
plt.show()