Range, mean absolute deviation, variance and standard deviation
Range is the maximum minus the minimum; mean absolute deviation is the average distance from the mean. Variance averages squared deviations: divide by N for a population, by n − 1 for a sample (Bessel's correction). The standard deviation is its square root, in the same units as the returns.
Watch the lesson 16 min
The video follows this page: the same examples, then the checkpoint questions.
Before this: Mean, median, mode and what outliers do to them
On the exam
- Calculate, interpret, and evaluate various measures of (1) central tendency and location and (2) dispersion
Calculate, interpret and evaluate the range, mean and median absolute deviation, variance and standard deviation, for a population or a sample. Expect a sample standard deviation where dividing by n is an option, a population variance to turn into a sample figure, and what Bessel's correction does and does not fix.
How deeply to learn each part
- Know the idea
- Understand it in general. It frames other topics, but you will not calculate with it.
- Use it
- Understand it well enough to solve a question with it. Recognize when it applies.
- Memorize
- Learn it by heart. The exam will not give it to you.
You know this one. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still do.
You tested strong here. The full lesson is folded away. The takeaways, formulas and checkpoint below are your quick refresher, and the checkpoint is a fair test of whether you still know it.
What does dispersion measure?
The mean says where returns are centered. Dispersion says how far they stray from it, and for an investor that is the starting point for risk: it puts a number on how uncertain a return is around its average. The measures below are absolute dispersion : they are expressed in the units of the data, either percent or percent squared.
- Range Use it max − min, units: %
- Weakness uses only two values
-
- Mean absolute deviation Use it average of |X − mean|, units: %
- Weakness absolute values are awkward in later math
-
- Median absolute deviation Use it median of |X − median|, robust
- Variance Memorize population: ÷ N; sample: ÷ (n − 1)
- Weakness squared units, hard to read
-
- Standard deviation Memorize √variance, units: %
- Weakness treats up and down moves alike
-
How do the range and the mean absolute deviation work?
The range is the largest value minus the smallest. It is quick, but it ignores every observation in between.
The mean absolute deviation (MAD) is the average distance of the observations from the mean, ignoring direction. It is also called the mean deviation or the average absolute deviation. It beats the range because it uses every observation, but it is seldom used: absolute values are awkward to work with in later formulas.
The median absolute deviation takes the median of the distances from the median. Like the median, it is robust: one wild return barely moves it. On this site MAD always means the mean absolute deviation; the median version is written out in full.
For returns of 1%, 2%, 4%, 9% and 30%, the median is 4. The distances from it are 3, 2, 0, 5 and 26; sorted, 0, 2, 3, 5, 26. Their median is 3%, and the 30% barely matters.
How do you calculate variance and standard deviation?
Square each deviation from the mean, add them up and divide. For a whole group, a population, you divide by N and get the population variance . Its square root is the population standard deviation .
With sample data you divide by n − 1 instead. That is the sample variance , and its square root is the sample standard deviation .
The squared deviations of 5 returns from their mean add up to 144 (in %²). The sample standard deviation is closest to:
√(144 ÷ 4) = √36 = 6.00%
Sample standard deviation, s6.00%
- 144÷(5−1)=the sample variance
- √xthe standard deviation
√x square root
- 144ENTER5ENTER1−÷the sample variance
- g√xthe standard deviation
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
Try this 0 of 3
- Switch the divisor to N (population) and compare the standard deviation
- Keep the range at 16 but move the standard deviation 0.5 or more away from 6%
- Make the mean absolute deviation at least 3 points larger than the median absolute deviation
Drag the top of a bar, or focus it and use the arrow keys. The dashed orange line is the mean (5.00%); purple brackets are the deviations from it.
A square on each deviation: its area is the squared deviation
The dashed square has area Σ ÷ 4 = the variance, so its side is the standard deviation.
Divide the sum of squares by
Mean 5.00%. Big misses count more: the largest deviation (−9) contributes 56% of the sum of squares.
Show working
Mean = (8 − 4 + 12 + 3 + 6) ÷ 5 = 5.00%.
Range = 12 − (−4) = 16 percentage points.
Deviations X − X̄: +3, −9, +7, −2, +1. Mean absolute deviation (MAD) = (3 + 9 + 7 + 2 + 1) ÷ 5 = 4.40%.
Median absolute deviation: the median is 6; distances from it 2, 10, 6, 3, 0; sorted 0, 2, 3, 6, 10; their median is 3.00%, 1.40 below the MAD.
Squared deviations: 9 + 81 + 49 + 4 + 1 = 144.
Sample variance s² = 144 ÷ (5 − 1) = 36.00 (%²). Standard deviation = √36.00 = 6.00%.
MAD (4.40) is never above s (6.00): squaring gives the large deviations more weight.
- 2NDDATA2NDCLR WORKclear old data
- 8ENTER↓↓X01
- 4+|-ENTER↓↓X02
- 12ENTER↓↓X03
- 3ENTER↓↓X04
- 6ENTER↓↓X05
- 2NDSTAT2NDSETrepeat [2ND] [SET] until 1-V shows
- ↓n = 5
- ↓X̄ = 5.00
- ↓Sx = 6.00, the sample standard deviation (n − 1)
- ↓σx = 5.37, divides by n
- ↑x²back to Sx and square it: 36.00, the sample variance
- 2NDQUIT
2ND second function (the shifted label above a key) · DATA data worksheet · CLR WORK clear the worksheet · ENTER enter (on the HP, puts the number on the stack) · +|- change sign · STAT statistics worksheet · SET change the setting · x² square · QUIT leave the worksheet
- fCLEAR Σ
- 8Σ+display 1
- 4CHSΣ+display 2
- 12Σ+display 3
- 3Σ+display 4
- 6Σ+display 5
- gx̄5.00, the mean
- gs6.00, the sample standard deviation (n − 1)
- ENTER×36.00, the sample variance
f gold shift key · CLEAR Σ clear the statistics registers · Σ+ add a data point · CHS change sign · g blue shift key · x̄ mean · s standard deviation · ENTER enter (on the HP, puts the number on the stack)
The HP 12C gives only the sample s. For the population version multiply by √((n − 1) ÷ n); to go from a population variance to a sample one, multiply by n ÷ (n − 1).
Switch between n and n − 1 and watch the standard deviation change. The smaller the sample, the bigger the gap between them.
Exam tip On the BA II Plus, read Sx, not σx. On the HP 12C, [g] [s] is already the sample figure.
Why divide a sample by n − 1?
Memorize
An unbiased estimate is one whose average across many samples equals the true value. The sample mean is unbiased. But deviations measured from a sample mean are slightly too small, so dividing their squares by n systematically underestimates the population variance. Dividing by n − 1 instead, known as Bessel’s correction , removes that bias from the sample variance. n − 1 is also the number of degrees of freedom : 100 observations leave 99.
Two cautions. First, the correction fixes the variance, not the standard deviation: because a square root bends the scale, s still tends to understate σ a little. Second, it matters most in small samples with widely spread values; above roughly 100 observations the difference is small (with n = 100, √(99 ÷ 100) = 0.995, so about 0.5%).
If a figure was computed by dividing by n and you need the sample version, multiply by n ÷ (n − 1).
An analyst computes the variance of 25 returns by dividing by the number of observations and gets 0.004. The sample standard deviation of the returns (as a decimal) is closest to:
√(0.004 × 25 ÷ 24) = √0.004167 = 0.06455
Sample standard deviation, s (as a decimal)0.0645
- 0.004×25÷24=the sample variance
- √xthe sample standard deviation
√x square root
- 0.004ENTER25×24÷the sample variance
- g√xthe sample standard deviation
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
How do you get these in a spreadsheet?
Know the idea
| Measure | Excel | Google Sheets |
|---|---|---|
| Population variance | VAR.P | VARP |
| Sample variance | VAR.S | VAR |
| Population standard deviation | STDEV.P | STDEVP |
| Sample standard deviation | STDEV.S | STDEV |
The .S versions apply Bessel’s correction; the BA II Plus shows both (Sx is the sample figure, σx the population one).
Which measure should you use?
| Measure | Uses all the data | Units | Weakness |
|---|---|---|---|
| Range | No (two values) | % | Driven by extremes |
| MAD | Yes | % | Absolute values are awkward in later math |
| Median absolute deviation | Yes, through the median | % | Ignores how far the extremes are |
| Variance | Yes | %² | Squared units, hard to read |
| Standard deviation | Yes | % | Treats up and down moves alike |
Squaring gives large deviations more weight, which is why the standard deviation is never smaller than the MAD. The standard deviation is the exam’s default measure of risk, and it feeds portfolio variance (Learning Module 8) and the Sharpe ratio later on.
A standard deviation also depends on how often you measure: daily, monthly and annual returns give very different figures. Lesson 7 shows how to convert between them.
Go deeper Population versus sample formulas
If you have every member of the group (a population), the mean is known rather than estimated and you divide by N. Returns over a few years are nearly always a sample of a longer process, so questions use n − 1 unless they say the data are the whole population. As n grows the two converge: with 100 observations the standard deviations differ by only about 0.5%.
Memorize this
MemorizeDispersion formulas
| Measure | Formula | Units |
|---|---|---|
| Range | max − min | % |
| Mean absolute deviation | Σ|X − X̄| ÷ n | % |
| Median absolute deviation | median of |X − median| | % |
| Population variance | Σ(X − μ)² ÷ N | %² |
| Sample variance | Σ(X − X̄)² ÷ (n − 1) | %² |
| Standard deviation | √variance | % |
Memory hook Only a sample variance divides by n − 1. MAD ≤ standard deviation always.
Know it cold Bessel's correction (÷ n − 1) removes the bias from the sample variance, not from the standard deviation. Population → sample: .
- Range Use it max − min, units: %
- Weakness uses only two values
-
- Mean absolute deviation Use it average of |X − mean|, units: %
- Weakness absolute values are awkward in later math
-
- Median absolute deviation Use it median of |X − median|, robust
- Variance Memorize population: ÷ N; sample: ÷ (n − 1)
- Weakness squared units, hard to read
-
- Standard deviation Memorize √variance, units: %
- Weakness treats up and down moves alike
-
Quick example
Returns of 4%, −2%, 9% and 1%. Range = 9 − (−2) = 11 percentage points.
- 9−2+|-= 11
+|- change sign
- 9ENTER2CHS− 11
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
Returns of 7%, −1%, 4% and 6% have mean 4. Distances 3, 5, 0, 2 add to 10, and 10 ÷ 4 = 2.5%.
- 3+5+0+2=÷4= 2.5
- 3ENTER5+0+2+4÷ 2.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
Returns 1%, 2%, 4%, 9%, 30%. Median 4; distances 3, 2, 0, 5, 26; sorted 0, 2, 3, 5, 26; median 3%. The 30% barely matters.
Quick example
A fund family has exactly four funds, returning 7%, −1%, 4% and 6%. μ = 4; squared deviations 9, 25, 0, 4 = 38; σ² = 38 ÷ 4 = 9.5, σ = 3.08%.
- 38÷4= 9.5
- √x 3.0822
√x square root
- 38ENTER4÷ 9.5
- g√x 3.0822
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
Quick example
Population variance 9.5 (%²). √9.5 = 3.08%.
- 9.5√x 3.0822
√x square root
- 9.5g√x 3.0822
g blue shift key · √x square root
Quick example
Squared deviations of 4 returns add to 38. 38 ÷ (4 − 1) = 12.67 (%²).
- 38÷(4−1)= 12.67
- 38ENTER4ENTER1−÷ 12.67
ENTER enter (on the HP, puts the number on the stack)
Quick example
Variance 12.67 (%²). √12.67 = 3.56%.
- 12.67√x 3.56
√x square root
- 12.67g√x 3.56
g blue shift key · √x square root
Quick example
σ² = 0.0090 from 30 returns. s² = 0.0090 × 30 ÷ 29 = 0.009310; s = 9.65%.
- 0.009×30÷29=√x 0.0965
√x square root
- 0.009ENTER30×29÷g√x 0.0965
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
How it is asked
-
Sample standard deviation of a few returns
Returns 7%, −1%, 4%, 6%. Sample standard deviation?
Mean 4, squares 9 + 25 + 0 + 4 = 38, 38 ÷ 3 = 12.67, √ = 3.56%. Traps: 3.08% (÷ n), 2.50% (MAD).
-
Variance or standard deviation?
The question asks for the standard deviation and an option shows the variance.
Take the square root. Variance is in %², so a bare variance is the trap.
-
Population variance given, sample standard deviation asked
Variance of 25 returns computed with ÷ n is 0.0040.
0.0040 × 25 ÷ 24, then √: 6.45%. Traps: 6.32% (no correction), 6.20% (correction backward).
-
Drawback of the range
Main drawback of the range as a measure of dispersion?
It uses only the two most extreme values.
Exam traps
- Dividing by n for a sample. Use n − 1 for the sample variance and standard deviation.
- Reporting the variance when the question asks for the standard deviation (the units are %²).
- Dropping the absolute value signs in MAD, so that deviations cancel to zero.
- Using the population formula (÷ n) because the calculator shows two standard deviations. Read Sx, not σx.
- Saying Bessel's correction makes the sample standard deviation unbiased. It fixes the variance only.
- Converting with (n − 1) ÷ n instead of n ÷ (n − 1): the sample variance is the larger one.
- Measuring deviations from the geometric mean. Variance uses the arithmetic mean.
Checkpoint
5 exam-style questions. About 90 seconds each.
1Four monthly returns are 5%, −3%, 9% and 1%. The sample standard deviation is closest to:
2Compared with the standard deviation of the same data, the mean absolute deviation is most likely:
3The squared deviations of seven monthly returns from their sample mean add up to 96 (%²). The sample standard deviation is closest to:
4An analyst computes the variance of 36 monthly returns by dividing by the number of observations and gets 0.0025. The sample standard deviation of the returns is closest to:
5Which statement about dividing a sample's squared deviations by n − 1 instead of n is most accurate?
Key takeaways
- Population variance divides by N; sample variance by n − 1 (Bessel's correction); the standard deviation is the square root.
- Bessel's correction debiases the variance, not the standard deviation.
- Mean absolute deviation averages distances from the mean and is never above s; the median absolute deviation is the robust version.
- Range uses only two observations, so it says little about the rest.
Quick example
Returns of 4%, −2%, 9% and 1%. Range = 9 − (−2) = 11 percentage points.
- 9−2+|-= 11
+|- change sign
- 9ENTER2CHS− 11
ENTER enter (on the HP, puts the number on the stack) · CHS change sign
Quick example
Returns of 7%, −1%, 4% and 6% have mean 4. Distances 3, 5, 0, 2 add to 10, and 10 ÷ 4 = 2.5%.
- 3+5+0+2=÷4= 2.5
- 3ENTER5+0+2+4÷ 2.5
ENTER enter (on the HP, puts the number on the stack)
Quick example
Returns 1%, 2%, 4%, 9%, 30%. Median 4; distances 3, 2, 0, 5, 26; sorted 0, 2, 3, 5, 26; median 3%. The 30% barely matters.
Quick example
A fund family has exactly four funds, returning 7%, −1%, 4% and 6%. μ = 4; squared deviations 9, 25, 0, 4 = 38; σ² = 38 ÷ 4 = 9.5, σ = 3.08%.
- 38÷4= 9.5
- √x 3.0822
√x square root
- 38ENTER4÷ 9.5
- g√x 3.0822
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
Quick example
Population variance 9.5 (%²). √9.5 = 3.08%.
- 9.5√x 3.0822
√x square root
- 9.5g√x 3.0822
g blue shift key · √x square root
Quick example
Squared deviations of 4 returns add to 38. 38 ÷ (4 − 1) = 12.67 (%²).
- 38÷(4−1)= 12.67
- 38ENTER4ENTER1−÷ 12.67
ENTER enter (on the HP, puts the number on the stack)
Quick example
Variance 12.67 (%²). √12.67 = 3.56%.
- 12.67√x 3.56
√x square root
- 12.67g√x 3.56
g blue shift key · √x square root
Quick example
σ² = 0.0090 from 30 returns. s² = 0.0090 × 30 ÷ 29 = 0.009310; s = 9.65%.
- 0.009×30÷29=√x 0.0965
√x square root
- 0.009ENTER30×29÷g√x 0.0965
ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root
All Quantitative Methods formulas, every lesson
Practice exam-style questions on Statistical Characteristics of Asset Returns
Questions about this lesson?
Where this comes back
- Semi-deviation, downside deviation and the coefficient of variation Statistical Characteristics of Asset Returns
- Portfolio Return and Risk Quantitative Methods
- Portfolio Risk and Return: Part I Portfolio Construction
Questions candidates ask
Why do we divide by n − 1 for sample variance?
Deviations are measured from the sample mean, which was estimated from the same data, so they come out slightly too small. Dividing by n − 1, Bessel's correction, makes the sample variance an unbiased estimate of the population variance. The sample standard deviation, its square root, still runs slightly low.
What is the difference between variance and standard deviation?
The standard deviation is the square root of the variance. Variance is in squared units (%²), which are hard to interpret. The standard deviation is in the same units as the returns, so a 6% standard deviation reads directly as a typical distance from the mean.
What is mean absolute deviation?
The average of the distances between each observation and the mean, ignoring sign: Σ|X − X̄| ÷ n. It is easy to read, but absolute values are awkward in later formulas, so the standard deviation is used instead. The MAD is never larger than the standard deviation.
What is the median absolute deviation?
The median of the distances between each observation and the median. It measures spread the way the median measures the center: robustly. For returns of 8%, −4%, 12%, 3% and 6% it is 3%, against a mean absolute deviation of 4.4%.
Spotted an error? Tell us and we will fix it.