Created
February 7, 2022 11:08
-
-
Save sahasourav17/6376077f459b1dc0bfe3c4e97fcdffc1 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
#importing required libraries | |
from scipy.stats import binom | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
#creating the binomial distribution | |
data = binom.rvs(n=20,p=0.7,size=10000) | |
#plotting the data | |
ax = sns.distplot(data, | |
bins=100, | |
kde=False, | |
color='blue', | |
) | |
ax.set(xlabel='Binomial Distribution', ylabel='Frequency') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment