Statistics, Probability, Probability Distributions, Binomial, Bernoulli.
import matplotlib.pyplot as plt # Probability of success (p) p = 0.7 outcomes = [0,1] probability = [1-p,p] #Plotting the distribution plt.bar(outcomes, probability) plt.xticks([0,1]) plt.xlabel('Outcome') plt.ylabel('Probability') plt.title('Bernoulli Distribution with 70% probability of Success')