Created
January 19, 2022 02:11
-
-
Save shubham0204/0024a15f8eef16f1053ad6bd08cb4f2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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