import numpy as np
import numpy.random as rd
import matplotlib.pyplot as plt
X = rd.geometric(0.4,10000)
f = np.zeros(11)
for k in range(1,11):
f[k-1] = np.mean(X == k)
print(f)
x = np.linspace(1,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: