Last active
July 17, 2020 09:24
-
-
Save SaraM92/ccc7533ea7f5bb54da8d0ffcd3b214bf to your computer and use it in GitHub Desktop.
This file contains 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
#Importing Essential Libraries | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.stats as stat | |
#Genrating the Poisson Distribution | |
n = np.arange(0, 10) | |
mu = 2 #average number of events | |
poisson = stat.poisson.pmf(n, lamda) | |
plt.plot(n, poisson, '-s', label="Mu = {:f}".format(mu), color="#8d0801") | |
plt.xlabel('# of Events', fontsize=15) | |
plt.ylabel('Probability', fontsize=15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment