Skip to content

Instantly share code, notes, and snippets.

@sahasourav17
Created February 7, 2022 11:20
Show Gist options
  • Save sahasourav17/b2094595d1f0cce2b1012a0071b958e0 to your computer and use it in GitHub Desktop.
Save sahasourav17/b2094595d1f0cce2b1012a0071b958e0 to your computer and use it in GitHub Desktop.
#importing required libraries
from scipy.stats import poisson
import seaborn as sns
import matplotlib.pyplot as plt
#creating the Poisson distribution
data = poisson.rvs(mu=3, size=10000,random_state = 93)
#plotting the data
ax = sns.distplot(data,
bins=100,
kde=False,
color='blue',
)
ax.set(xlabel='Poisson Distribution', ylabel='Frequency')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment