File:Poisson pmf.svg

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Poisson_pmf.svg(SVG file, nominally 360 × 288 pixels, file size: 42 KB)

[edit] Summary

Description
English: Plot of the probability mass function for the Poisson distribution.
Date 10 February 2010(2010-02-10)
Source Own work
Author Skbkekas

[edit] Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).


import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
 
X = np.arange(0,21)
 
col = {1: 'orange', 4: 'purple', 10: 'lightblue'}
 
 
##                                                                                
## PMF                                                                            
##                                                                                
 
plt.clf()
plt.figure(figsize=(4,3.2))
plt.axes([0.17,0.13,0.79,0.8])
plt.hold(True)
 
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')
    a = plt.plot(X, P, 'o', color=col[L])
    A.append(a)
 
plt.xlabel("k")
plt.ylabel(r"P(X=k)")
 
bx = plt.legend(A, (r"$\lambda=1$", r"$\lambda=4$", r"$\lambda=10$"),\
                numpoints=1, handletextpad=0, loc="upper right")
bx.draw_frame(False)
plt.xlim(-1,21)
 
plt.savefig("poisson_pmf.pdf")
plt.savefig("poisson_pmf.svg")

File history

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

Date/TimeThumbnailDimensionsUserComment
current20:23, 10 February 2010Thumbnail for version as of 20:23, 10 February 2010360 × 288 (42 KB)Skbkekas (talk | contribs){{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

The following page links to this file:

File usage on other wikis

The following other wikis use this file:

Metadata

Personal tools
Namespaces

Variants
Actions
Navigation
Participate
Toolbox