# Standard deviation (standard_deviation)

The sample standard deviation of a list of numbers, or that of a distribution.

## How to write it

### standard_deviation(data)

The square root of the sample variance, which divides by n - 1.

**data**

At least two numbers. Symbols are allowed. Takes a list.

### standard_deviation(distribution)

The square root of the variance of a distribution.

**distribution**

A distribution such as normal_distribution(mu, sigma). Takes an expression.

### standard_deviation(process)

The square root of the variance of a stochastic process at a time.

**process**

A process at a time, written construct(p, t), or p(t) for a stored process p. Takes an expression.

## Examples

- $\displaystyle 2, 4, 4, 4, 5, 5, 7, 9 = \frac{4 \sqrt{14}}{7}$

  `standard_deviation([2, 4, 4, 4, 5, 5, 7, 9])`

  In the solver, `standard_deviation([2, 4, 4, 4, 5, 5, 7, 9])` gives `4sqrt(14)/7`.

  [Open in the solver](https://hilberon.com/?q=standard_deviation%28%5B2%2C%204%2C%204%2C%204%2C%205%2C%205%2C%207%2C%209%5D%29)
- $\displaystyle \sigma_{X},\ X \sim \mathrm{Pois}(\lambda) = \sqrt{\lambda}$

  `standard_deviation(poisson_distribution(lambda))`

  In the solver, `standard_deviation(poisson_distribution(lambda))` gives `sqrt(lambda)`.

  [Open in the solver](https://hilberon.com/?q=standard_deviation%28poisson_distribution%28lambda%29%29)
- $\displaystyle \sigma_{X},\ X \sim \mathrm{Exp}(\lambda) = \frac{1}{\lambda}$

  `standard_deviation(exponential_distribution(lambda))`

  In the solver, `standard_deviation(exponential_distribution(lambda))` gives `1/lambda`.

  [Open in the solver](https://hilberon.com/?q=standard_deviation%28exponential_distribution%28lambda%29%29)
- $\displaystyle \operatorname{construct}(\operatorname{OU}(\mu, \sigma, \theta, x_{0}), t) = \begin{cases} \frac{\sqrt{2} \sqrt{\frac{\sigma^{2} \left(1-\frac{1}{e^{2 t \theta}}\right)}{\theta}}}{2} & \text{if } \theta \neq 0 \end{cases}$

  `standard_deviation(construct(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t))`

  In the solver, `standard_deviation(construct(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t))` gives `sqrt(2)*sqrt(sigma^2*(1 - e^(-2t*theta))/theta)/2 if theta != 0`.

  [Open in the solver](https://hilberon.com/?q=standard_deviation%28construct%28ornstein_uhlenbeck_process%28mu%2C%20sigma%2C%20theta%2C%20x0%29%2C%20t%29%29)

## Functions its examples use

- [poisson_distribution](https://hilberon.com/library/poisson_distribution)

  The number of events in a period when they come at an average rate lambda.
- [exponential_distribution](https://hilberon.com/library/exponential_distribution)

  The waiting time for events that come at rate lambda.
- [construct](https://hilberon.com/library/construct)

  Apply a head that is itself computed to arguments, as in f'(0) or (x => body)(a).
- [ornstein_uhlenbeck_process](https://hilberon.com/library/ornstein_uhlenbeck_process)

  A process pulled toward mu at rate theta, with noise sigma, started at x0.

## Related functions

- [stationary_distribution](https://hilberon.com/library/stationary_distribution)

  The law a process settles into over time, when it has one.
- [quantile](https://hilberon.com/library/quantile)

  The smallest value with at least a share q of a list, or a chance q of a distribution, at or below it.
- [uniform_distribution](https://hilberon.com/library/uniform_distribution)

  The continuous distribution that is equally likely anywhere between a and b.
- [probability](https://hilberon.com/library/probability)

  The probability that a condition holds for a variable with a distribution.
- [variance](https://hilberon.com/library/variance)

  The sample variance of a list of numbers, or the variance of a distribution.
- [weibull_distribution](https://hilberon.com/library/weibull_distribution)

  The lifetime of a unit whose chance of surviving to time x is e^(-(x/scale)^shape).

---
Source: https://hilberon.com/library/standard_deviation
