linguistic:translation, structural:reformatting
Unbiased sample standard deviation

For unbiased estimation of standard deviation, there is no formula that works across all distributions, unlike for mean and variance. Instead, s is used as a basis, and is scaled by a correction factor to produce an unbiased estimate. For the normal distribution, an unbiased estimator is given by s / c, where the correction factor (which depends on N) is given in terms of the Gamma function, and equals: c 4 (N) = 2 N − 1 Γ (N 2) Γ (N − 1 2). {\displaystyle c_{4}(N)\,=\,{\sqrt {\frac {2}{N-1}}}\,\,\,{\frac {\Gamma \left({\frac {N}{2}}\right)}{\Gamma \left({\frac {N-1}{2}}\right)}}.}

This arises because the sampling distribution of the sample standard deviation follows a (scaled) chi distribution, and the correction factor is the mean of the chi distribution.

An approximation can be given by replacing N − 1 with N − 1.5, yielding: σ ^ = 1 N − 1.5 ∑ i = 1 N (x i − x ¯) 2, {\displaystyle {\hat {\sigma }}={\sqrt {{\frac {1}{N-1.5}}\sum _{i=1}^{N}\left(x_{i}-{\bar {x}}\right)^{2}}},}

The error in this approximation decays quadratically (as 1 / N), and it is suited for all but the smallest samples or highest precision: for N = 3 the bias is equal to 1.3%, and for N = 9 the bias is already less than 0.1%.

A more accurate approximation is to replace N − 1.5 above with N − 1.5 + 1 / 8(N − 1).

For other distributions, the correct formula depends on the distribution, but a rule of thumb is to use the further refinement of the approximation: σ ^ = 1 N − 1.5 − 1 4 γ 2 ∑ i = 1 N (x i − x ¯) 2, {\displaystyle {\hat {\sigma }}={\sqrt {{\frac {1}{N-1.5-{\frac {1}{4}}\gamma _{2}}}\sum _{i=1}^{N}\left(x_{i}-{\bar {x}}\right)^{2}}},}

where γ denotes the population excess kurtosis. The excess kurtosis may be either known beforehand for certain distributions, or estimated from the data.