Skip to content

Sample standard deviation

Compute sample standard deviation, track percentage-point units, and distinguish observation dispersion from mean standard error and uncertainty in estimated volatility.

The sample standard deviation is the nonnegative square root of the usual sample variance. It measures how dispersed observed values are around their sample mean, in the original data units. For a sample of n≥2n\ge2 finite observations,
xˉ=1n∑i=1nxi,s=1n−1∑i=1n(xi−xˉ)2.\bar x=\frac{1}{n}\sum_{i=1}^n x_i, \qquad s=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar x)^2}.
The square root converts the squared units of sample variance back to the units of each observation. A return SD can therefore be compared with a return; a variance cannot. The calculation itself needs no normality or independence assumption. Such assumptions enter when interpreting ss as an estimate of a population's standard deviation, or assessing its uncertainty.

Five returns, three numbers worth keeping separate

A researcher checks five synthetic one-day simple returns on one strategy: −2%, −1%, 0%, +1% and +2%. Express the observations in percentage points (pp), so a 1% return is recorded as 11, rather than 0.010.01.

ObservationReturn (pp)Deviation from mean (pp)Squared deviation (pp²)
1−2−24
2−1−11
3000
4111
5224

The sample mean is zero, and the centred squares sum to 10 pp210\text{ pp}^2. Thus

s2=105−1=2.5 pp2,s=2.5≈1.5811 pp.s^2=\frac{10}{5-1}=2.5\text{ pp}^2, \qquad s=\sqrt{2.5}\approx1.5811\text{ pp}.
This is a measure of dispersion around the observed mean. It is not a maximum possible daily loss or a claim that a fixed proportion of returns lies within one SD. Squaring gives large deviations extra weight, so one extreme observation can materially change the estimate. Whether an outlier is a data error or a real risk event needs investigation before deletion.

Now change the statistical question:

  • Describe only these five observations as an empirical population. Give each record probability 1/51/5. Its divisor-nn variance is 10/5=2 pp210/5=2\text{ pp}^2, and its SD is 2≈1.4142 pp\sqrt2\approx1.4142\text{ pp}. This is a valid descriptive convention, distinct from the usual divisor-n−1n-1 sample SD.
  • Estimate uncertainty in the mean of an iid return model. If the observations are independent draws from the same finite-variance distribution, the estimated standard error of the sample mean is s/n=0.5≈0.7071 pps/\sqrt n=\sqrt{0.5}\approx0.7071\text{ pp}. That number concerns the average across hypothetical repeated samples, rather than the spread of individual returns.
Five synthetic daily returns are −2, −1, 0, 1 and 2 percentage points. Sample SD is 1.5811 pp, empirical divisor-n SD is 1.4142 pp, and the estimated iid mean standard error is 0.7071 pp.
Five synthetic daily returns are −2, −1, 0, 1 and 2 percentage points. Sample SD is 1.5811 pp, empirical divisor-n SD is 1.4142 pp, and the estimated iid mean standard error is 0.7071 pp.
Original synthetic one-day example. The bars compare numerical scales in percentage points; they are not probability intervals. Only the mean-SE row invokes an iid sampling model.
The last number is also not the standard error of the estimated volatility ss. Uncertainty about a mean and uncertainty about a standard deviation are different estimation problems. Five observations provide little evidence about the stability or tails of a strategy's return distribution, even when the arithmetic is exact.

What the correction fixes—and what it does not

After subtracting the fitted mean, the deviations sum to zero. Only n−1n-1 deviations can vary freely. For iid observations with finite population variance σ2\sigma^2, the expected centred sum of squares is (n−1)σ2(n-1)\sigma^2. Dividing by n−1n-1 therefore makes the random statistic S2S^2 an unbiased estimator of that variance:
E[S2]=σ2.\mathbb E[S^2]=\sigma^2.
Taking a square root does not preserve unbiasedness. An exact small example shows why. Draw two independent observations, each equal to −1 pp or +1 pp with equal probability. The population SD is 1 pp. Half the samples have matching signs and give S=0S=0; half have opposite signs and give S=2S=\sqrt2 pp. Consequently,
E[S2]=1 pp2,E[S]=22 pp≈0.7071 pp<1 pp.\mathbb E[S^2]=1\text{ pp}^2, \qquad \mathbb E[S]=\frac{\sqrt2}{2}\text{ pp}\approx0.7071\text{ pp}<1\text{ pp}.

The sample variance is unbiased; the sample SD is not. More generally, concavity of the square root gives E[S]≤E[S2]=σ\mathbb E[S]\le\sqrt{\mathbb E[S^2]}=\sigma under this iid finite-variance setup. The correction concerns averages over repeated samples, not a promise that any single estimate equals the true risk. Dependence or selective data collection requires separate reasoning.

Units, horizon and software conventions

If the original returns are stored as decimals, the same five numbers are −0.02, −0.01, 0, 0.01 and 0.02. The sample variance is then 0.000250.00025 in squared decimal-return units, and

s=0.0158113883 in decimal-return units=1.58113883 pp.s=0.0158113883\text{ in decimal-return units} =1.58113883\text{ pp}.

Variance scales by the square of the conversion factor; SD scales by its absolute value. For transformed data yi=a+bxiy_i=a+bx_i, sy=∣b∣sxs_y=|b|s_x: adding a constant changes the mean but not dispersion, and reversing signs does not make SD negative. A constant sample has s=0s=0; with fewer than two observations the divisor-n−1n-1 statistic is undefined.

A report should name the return definition, observation interval, window, units and divisor. Software conventions differ, so verify the divisor rather than inferring it from a function's name.

Calling a return SD historical volatility still leaves the horizon explicit. Multiplying daily SD by a square root of an annual observation count requires an aggregation model: variance adds for uncorrelated additive increments with a common variance. Log returns add through time; simple returns compound. Serial covariances, changing volatility and overlapping intervals can alter the calculation. The five-day sample here supplies no automatic annualised figure and no forecast guarantee.
For the calculation alongside other basic summaries, see Basic Statistics and Regression (full lesson free with a signed-in account). For the return-definition and dependence issues behind a volatility interpretation, see Financial Return Characteristics (public preview; full lesson requires membership).

Sources

Last updated
  • sample statistics
  • standard deviation
  • dispersion
  • volatility
  • estimation
← Back to the glossaryBack to top ↑