- Python 資料科學教程
- Python 資料科學 - 主頁
- Python 資料科學 - 快速入門
- Python 資料科學 - 環境設定
- Python 資料科學 - Pandas
- Python 資料科學 - Numpy
- Python 資料科學 - SciPy
- Python 資料科學 - Matplotlib
- Python 資料處理
- Python 資料操作
- Python 資料清洗
- Python 處理 CSV 資料
- Python 處理 JSON 資料
- Python 處理 XLS 資料
- Python 關係型資料庫
- Python NoSQL 資料庫
- Python 日期和時間
- Python 資料整理
- Python 資料聚合
- Python 讀取 HTML 頁面
- Python 處理非結構化資料
- Python 詞彙標記
- Python 詞幹提取和詞形還原
- Python 資料視覺化
- Python 圖表屬性
- Python 圖表樣式
- Python 箱線圖
- Python 熱力圖
- Python 散點圖
- Python 氣泡圖
- Python 3D 圖表
- Python 時間序列
- Python 地理資料
- Python 圖形資料
泊松分佈的 Python 實現
泊松分佈是一種分佈,它顯示了在預定時間內某個事件發生的可能次數。它用於在給定時間間隔內以恆定速率發生的獨立事件。泊松分佈是一個離散函式,這意味著該事件只能測量為發生或未發生,這意味著變數只能以整數測量。
我們使用具有內建功能來建立此類機率分佈圖的 seaborn python 庫。此外,scipy 包有助於建立二項分佈。
from scipy.stats import poisson
import seaborn as sb
data_binom = poisson.rvs(mu=4, size=10000)
ax = sb.distplot(data_binom,
kde=True,
color='green',
hist_kws={"linewidth": 25,'alpha':1})
ax.set(xlabel='Poisson', ylabel='Frequency')
其 輸出 如下所述 −
廣告