


Let's for example generate random numbers from a normal distribution: import numpy as np import matplotlib.pyplot as plt N = 100000 data = np.random.randn(N) 2 - Create an histogram with matplotlib hx, hy, _ = plt.hist(data, bins=50, normed=1,color="lightblue") plt.ylim(0.0,max(hx)+0.05) plt.title('Generate random numbers \n from a standard normal distribution with python') plt.grid() plt.savefig("cumulative_density_distribution_01.png", bbox_inches='tight') #plt.show() plt.close() 4 - Using the function cdf in the case of data distributed from a normal distribution.3 - Option 1: Calculate the cumulative distribution function using the histogram.2 - Create an histogram with matplotlib.
