File:Poisson pmf.svg

頁面內容唔支援其他語言。
出自維基百科,自由嘅百科全書

原本檔案(SVG檔案,表面大細: 330 × 255 像素,檔案大細:86 KB)

摘要

描述
English: Plot of the probability mass function for the Poisson distribution.
日期
來源 自己作品
作者 Skbkekas
SVG genesis
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
原始碼
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp

col = {1 : 'orange', 4: 'purple', 10: 'lightblue'}

X = np.arange(0, 21)

plt.rc('text', usetex = True)
plt.rc('font', family = 'serif', size = 12)

##                                                                                
## PMF                                                                            
## 

plt.clf()
plt.figure(figsize=(4,3.2))

A = []
for L in 1,4,10:

    P = -L + X*np.log(L) - sp.gammaln(X+1)
    P = np.exp(P)

    plt.plot(X, P, '-', color='grey', label='_nolegend_')
    a = plt.plot(X, P, 'o', color=col[L], markeredgecolor='k', markeredgewidth=0.5)
    A.append(a)

plt.xlabel("$k$")
plt.ylabel(r"$P(x=k)$")
plt.ylim([0,0.4])
plt.yticks(np.arange(0,0.42,.05))
plt.tick_params(direction='in', top=True, right=True)

plt.legend((r"$\lambda=1$", r"$\lambda=4$", r"$\lambda=10$"),
                numpoints=1, handlelength=0.75, handletextpad=0.5,\
                loc="upper right", frameon=False)
plt.xlim(-1,21)

plt.savefig("poisson_pmf.pdf")
plt.savefig("poisson_pmf.svg")

協議

我,呢份作品嘅作者,決定用以下許可發佈呢件作品:
w:en:Creative Commons
署名
Ĉi tiu dosiero estas disponebla laŭ la permesilo Krea Komunaĵo Atribuite 3.0 Neadaptita.
你可以:
  • 去分享 – 複製、發佈同傳播呢個作品
  • 再改 – 創作演繹作品
要遵照下面嘅條件:
  • 署名 – 你一定要畀合適嘅表彰、畀返指向呢個授權條款嘅連結,同埋寫明有無改過嚟。你可以用任何合理方式去做,但唔可以用任何方式暗示授權人認可咗你或者你嘅使用方式。

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

圖中顯示嘅係

10 2 2010

image/svg+xml

檔案歷史

撳個日期/時間去睇響嗰個時間出現過嘅檔案。

日期/時間縮圖尺寸用戶註解
現時2020年11月21號 (六) 03:26響2020年11月21號 (六) 03:26嘅縮圖版本330 × 255(86 KB)AkanoToERemoved white background and recropped to fit axis labels
2020年11月21號 (六) 03:23響2020年11月21號 (六) 03:23嘅縮圖版本360 × 288(39 KB)AkanoToEMade all text LaTeX, fixed legend text spacing
2015年9月12號 (六) 01:22響2015年9月12號 (六) 01:22嘅縮圖版本360 × 288(42 KB)TrlklyRemoved outer white background for aesthetic reasons (by hand).
2010年2月10號 (三) 20:23響2010年2月10號 (三) 20:23嘅縮圖版本360 × 288(42 KB)Skbkekas{{Information |Description={{en|1=Plot of the probability mass function for the Poisson distribution.}} |Source={{own}} |Author=Skbkekas |Date=2-10-2010 |Permission= |other_versions= }} Category:Statistical diagrams

以下嘅1版用到呢個檔:

全域檔案使用情況

下面嘅維基都用緊呢個檔案:

Metadata