Measures of central tendency (the mean)

These measures are optimal ways to describe a bunch of data, to give an indication of what is typical or middle, so you can compare different series of data.

For a set of numerical data, these measures can be used:

The mean: specifically the arithmetic mean is the sum of the numbers divided by the number of samples

The median: order the numbers and pick up the one in the middle. If the data points are even, then take the mean of the middle two.
This is useful when the data points are very spread.

The mode: the most common number in the set. There can be multiple modes, if two or more data points occur the same number of times.

Now, how to calculate them in Python, given a set of data points?

Continue reading “Measures of central tendency (the mean)”