Using mean, median, and mode in Python
Let's start doing some real coding in Python and see how you compute the mean, median, and mode using Python in an IPython Notebook file.
So go ahead and open up the MeanMedianMode.ipynb
file from the data files for this section if you'd like to follow along, which I definitely encourage you to do. If you need to go back to that earlier section on where to download these materials from, please go do that, because you will need these files for the section. Let's dive in!
Calculating mean using the NumPy package
What we're going to do is create some fake income data, getting back to our example from the previous section. We're going to create some fake data where the typical American makes around $27,000 a year in this example, we're going to say that's distributed with a normal distribution and a standard deviation of 15,000. All numbers are completely made up, and if you don't know what normal distribution and standard deviation means yet, don't worry...