The following examples are taken from Wikipedia.

http://en.wikipedia.org/wiki/Standard_deviation

- >>> standard_deviation([0, 0, 14, 14])

- >>> standard_deviation([0, 6, 8, 14])

- >>> standard_deviation([6, 6, 8, 8])

+ >>> standard_deviation([0, 0, 14, 14])

+ >>> standard_deviation([0, 6, 8, 14])

+ >>> standard_deviation([6, 6, 8, 8])

(Wikipedia reports 7, 5, and 1 respectively. Some of the difference is

due to rounding, but the rest may be a bug?)

+ # Fictitious average monthly temperatures in Southern California.

+ # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

+ >>> standard_deviation([70, 70, 70, 75, 80, 85, 90, 95, 90, 80, 75, 70])

- # Fictitious average monthly temperatures in Southern California.

- # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

- >>> standard_deviation([70, 70, 70, 75, 80, 85, 90, 95, 90, 80, 75, 70])

- # Fictitious average mothly temperatures in Montana.

- # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

- >>> standard_deviation([-32, -10, 20, 30, 60, 90, 100, 80, 60, 30, 10, -32])

+ # Fictitious average mothly temperatures in Montana.

+ # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

+ >>> standard_deviation([-32, -10, 20, 30, 60, 90, 100, 80, 60, 30, 10, -32])

Most natural and random phenomena follow the normal distribution (aka the

bell curve), which says that most values are close to average but a few are

"""Calculate a few simple stats on data.

This class calculates the minimum, maximum, and count of all the values

- given to it. The values are not saved in the object. Usage:

+ given to it. The values are not saved in the object. Usage::

- >>> stats = SimpleStats()

- >>> stats(2) # Add one data value.

- >>> stats.extend([6, 4]) # Add several data values at once.

+ >>> stats = SimpleStats()

+ >>> stats(2) # Add one data value.

+ >>> stats.extend([6, 4]) # Add several data values at once.

- The statistics are available as instance attributes:

+ The statistics are available as instance attributes::

Non-numeric data is also allowed:

>>> stats.standard_deviation

- All data is stored in a list and a set for later use:

+ All data is stored in a list and a set for later use::

(The double prompt ">>" is used to hide the example from doctest.)