import numpy as np
import numpy.random as rd
import matplotlib.pyplot as plt
X = rd.binomial(10, 0.4, 10000)
f = np.zeros(11)
for k in range (0,11):
f[k] = np.mean(X == k)
print(f)
x = np.linspace(0,10,11)
plt.scatter(x,f)
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: