# Variance and Standard Deviation

> Variance and standard deviation measure how spread out values are. Learn the formulas, sample vs population, annualising volatility and their role in trading risk.

Source: https://learn.tradelabsai.com/math/variance-and-standard-deviation/  
Track: Math and Statistics · Level: Intermediate · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Variance and Standard Deviation", https://learn.tradelabsai.com/math/variance-and-standard-deviation/

Variance and standard deviation measure how spread out a set of values is around its average. In trading, they are the most common measures of risk and volatility: a stock whose daily returns swing widely has a high standard deviation; one that barely moves has a low one. Standard deviation underpins historical volatility, the Sharpe ratio, position sizing by volatility, Bollinger Bands and option pricing.

## The formulas

```
population variance σ² = Σ (x - μ)² / N
sample variance s² = Σ (x - x̄)² / (n - 1)
standard deviation = √variance
```

- **μ or x̄:** the mean
- **N or n:** number of values

The sample formula divides by n minus 1 (Bessel's correction) to avoid underestimating variance when using a sample. In trading, you almost always use the sample version.

Variance is in squared units; standard deviation is in the original units, such as percent returns, which makes it easier to interpret.

## Worked example

**Example: Daily returns**
Five daily returns: +1.0%, minus 0.5%, +2.0%, minus 1.5%, +0.5%.

Mean = (1.0 minus 0.5 + 2.0 minus 1.5 + 0.5) / 5 = 1.5 / 5 = 0.3%.
Deviations: 0.7, minus 0.8, 1.7, minus 1.8, 0.2.
Squared: 0.49, 0.64, 2.89, 3.24, 0.04. Sum = 7.30.
Sample variance = 7.30 / 4 = 1.825 (percent squared).
Standard deviation = √1.825 ≈ 1.35% per day.

## Annualising volatility

If daily returns are roughly independent, variance scales with time, so standard deviation scales with the square root of time:

```
annual volatility ≈ daily standard deviation × √252
monthly volatility ≈ annual volatility / √12
```

A daily standard deviation of 1.35% implies annual volatility of about 1.35% × 15.87 ≈ 21.4%. See [Historical and Realized Volatility](https://learn.tradelabsai.com/volatility/historical-volatility/).

## Interpreting standard deviation

For roughly normal data:

| Range | Share of values (approx.) |
|---|---|
| Within 1 standard deviation of the mean | 68% |
| Within 2 standard deviations | 95% |
| Within 3 standard deviations | 99.7% |

Real market returns have fatter tails than the normal distribution, so moves of 3 or more standard deviations happen more often than these numbers suggest. See [Normal Distribution](https://learn.tradelabsai.com/math/normal-distribution/) and [Fat Tails](https://learn.tradelabsai.com/math/fat-tails/).

## Where standard deviation appears in trading

| Use | Lesson |
|---|---|
| Historical volatility | [Historical and Realized Volatility](https://learn.tradelabsai.com/volatility/historical-volatility/) |
| Implied volatility (options) | [Implied Volatility (IV)](https://learn.tradelabsai.com/volatility/implied-volatility/) |
| Sharpe ratio (return per unit of volatility) | [Sharpe Ratio](https://learn.tradelabsai.com/portfolio/sharpe-ratio/) |
| Volatility based position sizing | [Volatility and ATR-Based Sizing](https://learn.tradelabsai.com/risk/volatility-and-atr-based-sizing/) |
| Bollinger Bands | [Bollinger Bands](https://learn.tradelabsai.com/indicators/bollinger-bands/) |
| Z scores | [Percentiles, Quantiles and Z-Scores](https://learn.tradelabsai.com/math/z-scores/) |
| Portfolio risk | [Portfolio Construction](https://learn.tradelabsai.com/portfolio/portfolio-construction/) |

## Limits of standard deviation as risk

- **Treats upside and downside equally:** a big gain counts as "risk". The Sortino ratio uses only downside deviation. See [Sortino Ratio](https://learn.tradelabsai.com/portfolio/sortino-ratio/).
- **Misses tail risk:** strategies that sell options can show low standard deviation until a crash. See [Theta Harvesting](https://learn.tradelabsai.com/options/theta-harvesting/).
- **Changes over time:** volatility clusters. See [GARCH](https://learn.tradelabsai.com/math/garch/).
- **Depends on the window** used to calculate it.

## Variance of a portfolio

Portfolio variance depends on each asset's variance and how they move together:

```
σ²_p = w1² σ1² + w2² σ2² + 2 w1 w2 ρ σ1 σ2
```

Combining assets with low or negative correlation reduces portfolio risk. See [Covariance and Correlation](https://learn.tradelabsai.com/math/covariance-and-correlation/) and [Diversification](https://learn.tradelabsai.com/portfolio/diversification/).

## Downside deviation and semivariance

Because traders care more about losses than gains, some measures only count returns below a target, often zero or the risk free rate. Downside deviation is the square root of the average squared shortfall below the target. It powers the Sortino ratio and gives a clearer picture of risk for strategies with skewed returns. See [Sortino Ratio](https://learn.tradelabsai.com/portfolio/sortino-ratio/) and [Skewness and Kurtosis](https://learn.tradelabsai.com/math/skewness-and-kurtosis/).

## Variance in position sizing

Many traders size positions so that each one contributes a similar amount of volatility to the portfolio. If one asset is twice as volatile as another, it gets roughly half the position size. This inverse volatility approach keeps a single volatile position from dominating results. See [Volatility and ATR-Based Sizing](https://learn.tradelabsai.com/risk/volatility-and-atr-based-sizing/) and [Risk Budgeting and Risk Parity](https://learn.tradelabsai.com/portfolio/risk-budgeting-and-risk-parity/).

## Frequently asked questions

### What is standard deviation in trading?

A measure of how much returns vary around their average, commonly used as a measure of volatility and risk.

### What is the difference between variance and standard deviation?

Variance is the average squared deviation from the mean; standard deviation is its square root, expressed in the same units as the data.

### How do you annualise daily volatility?

Multiply the daily standard deviation by the square root of the number of trading days in a year, usually √252.

Next, learn to measure how unusual a value is in [Percentiles, Quantiles and Z-Scores](https://learn.tradelabsai.com/math/z-scores/).

## Continue learning

- Next lesson: [Percentiles, Quantiles and Z-Scores](https://learn.tradelabsai.com/math/z-scores/)
- Previous lesson: [Mean, Median and Mode](https://learn.tradelabsai.com/math/mean-median-and-mode/)
- Related: [Mean, Median and Mode](https://learn.tradelabsai.com/math/mean-median-and-mode/): The mean, median and mode measure the centre of data in different ways. Learn when each is best for trading data, how outliers distort averages and geometric means.
- Related: [Historical and Realized Volatility](https://learn.tradelabsai.com/volatility/historical-volatility/): Historical volatility measures how much a price actually moved, using past returns. Learn the standard formula, range based estimators and how traders use it.
- Related: [Percentiles, Quantiles and Z-Scores](https://learn.tradelabsai.com/math/z-scores/): A z score shows how many standard deviations a value is from its mean. Learn the formula, its uses in mean reversion and pairs trading, and the pitfalls.
- Related: [Covariance and Correlation](https://learn.tradelabsai.com/math/covariance-and-correlation/): Covariance and correlation measure how two assets move together. Learn the formulas, how to read them, why correlations change in crises and their portfolio role.
- Related: [Sharpe Ratio](https://learn.tradelabsai.com/portfolio/sharpe-ratio/): The Sharpe ratio measures return per unit of risk. Learn the formula, how to annualise it, what counts as a good Sharpe ratio, its limitations and common mistakes.
- Related: [Normal Distribution](https://learn.tradelabsai.com/math/normal-distribution/): The normal distribution is the bell curve behind many financial models. Learn its properties, the 68 95 99.7 rule, where traders use it and why markets break it.
