File:Poisson approximation to Binomial.svg

Summary

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

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.

Category:CC-Zero#Poisson%20approximation%20to%20Binomial.svg
Category:Self-published work Category:Statistics Category:Python (programming language)
Category:CC-Zero Category:Python (programming language) Category:Self-published work Category:Statistics