Machine Learning, AI, Math.
students p = 0.7 # probability of passing the exam # Possible values x_binom = np.arange(0, n+1) # Binomial probabilities probabilities_binom = binom.pmf(x_binom, n, p) # Create the binomial plot plt.figure(figsize=(10, 6)) plt.bar(x_binom, probabilities_binom) plt.xlabel('Number of Students