The normal distribution

The normal distribution may be plotted from sampled data as a histogram:

In [x]: mu, sigma = 100., 8.
In [x]: samples = np.random.normal(loc=mu, scale=sigma, size=10000)
In [x]: counts, bins, patches = pylab.hist(samples, bins=100, normed=True)
In [x]: pylab.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *
...                np.exp( -(bins - mu)**2 / (2 * sigma**2) ), lw=2)
In [x]: pylab.show()

The normal distribution