Standard Deviation

Article by:
Date Published:
Last Modified:
WARNING

This page is a work-in-progress.

Overview

The standard deviation is a metric which is used to measure the amount of variation in a set of data values.

The standard deviation has the same units as the data.

Equation

$$ \sigma = \sqrt{\frac{ \sum{(x - \bar{x})?^2}}{n}} $$

where:
\( \bar{x} \) is the mean (average) of the samples
\( n \) is the number of samples

For example,

4, 8, 7, 3, 12
\begin{align} \bar{x} &= \frac{1}{5} * (4+8+7+3+12)\\ &= 6.8\\ \\ \sum{(x - \bar{x})} = (4-6.8)^2+(8-6.8)^2+(7-6.8)^2+(3-6.8)^2+(12-6.8)^2\\ = \end{align}

Software

You can calculated the standard deviation of an array in Numpy with np.std():

1
np.std(my_array)

By default, the array is flattened. However, you can specify an axis on which to calculate the standard deviation.


Authors

Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Related Content:

Tags

comments powered by Disqus