Skip to content

Instantly share code, notes, and snippets.

@sahasourav17
Created February 7, 2022 10:52
Show Gist options
  • Save sahasourav17/850ce70475e7640fd21eae97e2673db5 to your computer and use it in GitHub Desktop.
Save sahasourav17/850ce70475e7640fd21eae97e2673db5 to your computer and use it in GitHub Desktop.
#importing required libraries
from scipy.stats import expon
import seaborn as sns
import matplotlib.pyplot as plt
#creating the exponential distribution
data = expon.rvs(loc=0,scale=10,size=10000)
#plotting the data
ax = sns.distplot(data,
bins=100,
kde=True,
color='skyblue',
)
ax.set(xlabel='Exponential Distribution', ylabel='Frequency')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment