# Standard Deviation

In statistics, the standard deviation is a measure that is used to quantify the amount of variation or dispersion of a set of data values. A low standard deviation indicates that the data points tend to be close to the mean (also called the expected value) of the set, while a high standard deviation indicates that the data points are spread out over a wider range of values.

Standard deviation is used in calculating other technical indicators such as Bollinger Bands.

Of Closing Prices |
`STDDEV(x, z)` |
`x` =Period, `z` =Offset |

`STDDEVx.z` | ||

Generalized |
`SQR(ABS(SUM((w) ^ 2, x)- x * AVG(w, x) ^ 2) / x)` |
`w` =Numeric, `x` =Period |

`w`

can be any formula which returns a numeric value.

`x`

, `y`

, and `z`

must be integer numbers and cannot be formulas.

### Examples

The 20 period standard deviation of price can be written as follows.

`STDDEV(20)`

The 30 period standard deviation of price from 10 bars ago can be written as follows.

`STDDEV30.10`

The 10 period standard deviation of the 15 period simple moving average can be written as follows.

`SQR(ABS(SUM((AVGC15) ^ 2, 10)- 10 * AVG(AVGC15, 10) ^ 2) / 10)`