Home / Maths for AI / Symbols / Probability and statistics

Standard deviation (sigma)

Say it: "sigma"

What it means

How spread out values are: the square root of the variance. σ2\sigma^2 is the variance; ss is the sample standard deviation.

Example

σ=1n∑(xi−xˉ)2\sigma = \sqrt{\tfrac{1}{n}\textstyle\sum (x_i - \bar{x})^2}

A typical distance from the mean.

In code

import numpy as np
x = np.array([2, 4, 4, 4, 5, 5, 7, 9])
print(np.std(x), np.std(x, ddof=1).round(3))   # population, sample

Output

2.0 2.138

Where it appears in machine learning

Standardising features, z=(x−μ)/σz = (x - \mu)/\sigma, and describing noise. (σ(z)\sigma(z) with a bracket is the sigmoid.)

Related symbols

Learn it properly in the free lesson Describing Data, with practice questions that check your answers.