Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created January 19, 2022 02:11
Show Gist options
  • Save shubham0204/0024a15f8eef16f1053ad6bd08cb4f2d to your computer and use it in GitHub Desktop.
Save shubham0204/0024a15f8eef16f1053ad6bd08cb4f2d to your computer and use it in GitHub Desktop.
import math
import matplotlib.pyplot as plt
def poisson( lambda_ , x ):
return ( (lambda_)**x * math.exp(-lambda_) ) / math.factorial(x)
x = []
y = []
for i in range( 100 ):
x.append( i )
y.append( poisson( 51 , i ) )
print( y[i] )
plt.plot( x , y )
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment