File:Poisson approximation to Binomial.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 360 × 288 pixels, file size: 27 KB)

Captions

Captions

Statistics graph showing the convergence of the Poisson and Binomial Distribution

Summary

[edit]
Description
English: Statistics graph showing the convergence of the Poisson and Binomial Distribution.
Date
Source Own work
Author Bscan
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

X = np.arange(7)

plt.clf()
plt.figure(figsize=(4,3.2))
plt.axes([0.17,0.13,0.79,0.8])
ax = plt.gca()

P = stats.poisson.pmf(X, mu=1)
ax.vlines(X, 0, P, color='dimgray', label=r"P($\lambda=1$)")

B10 = stats.binom.pmf(X, n=10, p=1/10)
plt.plot(X, B10, '--', color='orange')
plt.plot(X, B10, 'o', fillstyle='none', color='orange', label=r"B(n=10, p=1/10)")

B100 = stats.binom.pmf(X, n=100, p=1/100)
plt.plot(X, B100, '--', color='purple')
plt.plot(X, B100, 'o', fillstyle='none', color='purple', label=r"B(n=100, p=1/100)")
plt.xlabel("k")
plt.xlim(-0.5,6.5)
plt.legend()
plt.savefig("/dbfs/FileStore/Wikipedia/poisson_approx_pmf.svg")

display()

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:29, 14 May 2019Thumbnail for version as of 15:29, 14 May 2019360 × 288 (27 KB)Bscan (talk | contribs)Minor bug in original code
15:25, 14 May 2019Thumbnail for version as of 15:25, 14 May 2019360 × 288 (27 KB)Bscan (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata