Probability, Probability Distributions, Probability Theory, Python, Statistics.
50 k = 4 x = np.arange(k+1, n+1) reject = 0.2 accept = 1 - reject px = [] for i in range(k+1, n+1): p = comb(i-1, k-1) * (reject ** k) * (accept ** (i - k)) px.append(p) px = np.array(px) plt.bar(x, px) plt.xlabel('trial(x = 1, 2, ...)') plt.ylabel('probability') plt.title('The PMF of Pascal Random