July 2017
Beginner to intermediate
420 pages
10h 56m
English
Let's write some code here and play with some standard deviation and variances. So If you pull up the StdDevVariance.ipynb file IPython Notebook, and follow along with me here. Please do, because there's an activity at the end that I want you to try. What we're going to do here is just like the previous example, so begin with the following code:
%matplotlib inline import numpy as np import matplotlib.pyplot as plt incomes = np.random.normal(100.0, 20.0, 10000) plt.hist(incomes, 50) plt.show()
We use matplotlib to plot a histogram of some normally distributed random data, and we call it incomes. We're saying it's going to be centered around 100 (hopefully that's an hourly rate or something ...
Read now
Unlock full access