July 2017
Beginner to intermediate
420 pages
10h 56m
English
Now we've seen normal, also known as Gaussian, distribution functions already in this book. You can actually visualize those in Python. There is a function called pdf (probability density function) in the scipy.stats.norm package function.
So, let's look at the following example:
from scipy.stats import norm import matplotlib.pyplot as plt x = np.arange(-3, 3, 0.001) plt.plot(x, norm.pdf(x))
In the preceding example, we're creating a list of x values for plotting that range between -3 and 3 with an increment of 0.001 in between them by using the arange function. So those are the x values on the graph and we're going to plot the x-axis with using those values. The y-axis is going to be the normal function, ...
Read now
Unlock full access