How to Draw a Standard Normal Distribution Histogram in Python


In this example we will show how to draw a standard normal distribution histogram in Python.

Source Code

import numpy as np
import matplotlib.pyplot as plt

mu, sigma = 0, 1   # mean and standard deviation
s = np.random.normal(mu, sigma, 1000000)

plt.hist(s, 100)
plt.show()

Output:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments