Last active
May 24, 2019 23:09
-
-
Save lucdangelis/36da0e8a4ae41ec8b19cfe26baab1689 to your computer and use it in GitHub Desktop.
This file contains 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
p = 0.52 | |
p_arr = [] | |
for i in range(0,10): | |
proba_inactive = p*(1-p)**(i-1) | |
p_arr.append(proba_inactive) | |
p_arr = np.array(p_arr) | |
p_arr /= p_arr.sum() | |
plt.plot(range(1, 10), p_arr, color='black', linewidth=0.7, zorder=1) | |
plt.ylabel('Probability inactive') | |
plt.xlabel('Number of Transactions') | |
plt.xticks(range(0, 10)) | |
plt.title('(Shifted) Geometric Probability Mass Function') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment