Analyst Dojo
Lesson 3 of 7 11–14% of the exam

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.

6 min cram, 26 min full read. Based on the 2027 CFA® Program Level I curriculum, Quantitative Methods, Learning Module 5. Sitting in November 2026? The 2026 version of this lesson is still available.

Tailor this to you: take the self-assessment

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.

Cram mode: the one-screen version of this lesson. Switch to Full for the explanations, worked examples and interactives.

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.

Measures of absolute dispersion
Dispersionhow far returns spread around the center
  • 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.

Range Use it
Range=Xmax⁡−Xmin⁡\text{Range} = X_{\max} - X_{\min}

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.

Mean absolute deviation Use it
MAD=∑i=1n∣Xi−Xˉ∣nMAD = \frac{\sum_{i=1}^{n} |X_i - \bar{X}|}{n}

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.

Median absolute deviation Use it
Median absolute deviation=Median( ∣Xi−Median(X)∣ )\text{Median absolute deviation} = \text{Median}\left(\,|X_i - \text{Median}(X)|\,\right)

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 .

Population variance Memorize
σ2=∑i=1N(Xi−μ)2N\sigma^2 = \frac{\sum_{i=1}^{N} (X_i - \mu)^2}{N}
Population standard deviation Use it
σ=σ2\sigma = \sqrt{\sigma^2}

With sample data you divide by n − 1 instead. That is the sample variance , and its square root is the sample standard deviation .

Sample variance Memorize
s2=∑i=1n(Xi−Xˉ)2n−1s^2 = \frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}
Sample standard deviation Memorize
s=∑i=1n(Xi−Xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}}
Rearrange itSample standard deviation: solve for s, the sum of squares or n
The question asks for
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%

On your calculator
  1. 144÷(5−1)=the sample variance
  2. √xthe standard deviation

√x square root

  1. 144ENTER5ENTER1−÷the sample variance
  2. g√xthe standard deviation

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

InteractiveDeviations, squared: where variance comes from

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
−10%−5%0%5%10%15%20%Year 1+38Year 2−9−4Year 3+712Year 4−23Year 5+16

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

9+381−949+74−21+1→s² 36.00side s 6.00

The dashed square has area Σ ÷ 4 = the variance, so its side is the standard deviation.

Divide the sum of squares by

Range16
Mean absolute deviation4.40%
Median absolute deviation3.00%
Variance (÷ n − 1)36.00 (%²)
Standard deviation (÷ n − 1)6.00%

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.

Standard deviation on your calculator
  1. 2NDDATA2NDCLR WORKclear old data
  2. 8ENTER↓↓X01
  3. 4+|-ENTER↓↓X02
  4. 12ENTER↓↓X03
  5. 3ENTER↓↓X04
  6. 6ENTER↓↓X05
  7. 2NDSTAT2NDSETrepeat [2ND] [SET] until 1-V shows
  8. ↓n = 5
  9. ↓X̄ = 5.00
  10. ↓Sx = 6.00, the sample standard deviation (n − 1)
  11. ↓σx = 5.37, divides by n
  12. ↑x²back to Sx and square it: 36.00, the sample variance
  13. 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

  1. fCLEAR Σ
  2. 8Σ+display 1
  3. 4CHSΣ+display 2
  4. 12Σ+display 3
  5. 3Σ+display 4
  6. 6Σ+display 5
  7. gx̄5.00, the mean
  8. gs6.00, the sample standard deviation (n − 1)
  9. 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).

Variance squares the distances, so big misses count more.

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).

Sample variance from a population variance Use it
s2=σ2×nn−1s^2 = \sigma^2 \times \frac{n}{n - 1}
Rearrange itPopulation variance to sample standard deviation, or back
The question asks for
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

On your calculator
  1. 0.004×25÷24=the sample variance
  2. √xthe sample standard deviation

√x square root

  1. 0.004ENTER25×24÷the sample variance
  2. 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

MeasureExcelGoogle Sheets
Population varianceVAR.PVARP
Sample varianceVAR.SVAR
Population standard deviationSTDEV.PSTDEVP
Sample standard deviationSTDEV.SSTDEV

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?

MeasureUses all the dataUnitsWeakness
RangeNo (two values)%Driven by extremes
MADYes%Absolute values are awkward in later math
Median absolute deviationYes, through the median%Ignores how far the extremes are
VarianceYes%²Squared units, hard to read
Standard deviationYes%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

MeasureFormulaUnits
Rangemax − min%
Mean absolute deviationΣ|X − X̄| ÷ n%
Median absolute deviationmedian 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: s2=σ2 n/(n−1)s^2 = \sigma^2 \, n/(n-1).

Measures of absolute dispersion
Dispersionhow far returns spread around the center
  • 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
Range Use it
Range=Xmax⁡−Xmin⁡\text{Range} = X_{\max} - X_{\min}
Quick example

Returns of 4%, −2%, 9% and 1%. Range = 9 − (−2) = 11 percentage points.

On your calculator
  1. 9−2+|-= 11

+|- change sign

  1. 9ENTER2CHS− 11

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Mean absolute deviation Use it
MAD=∑i=1n∣Xi−Xˉ∣nMAD = \frac{\sum_{i=1}^{n} |X_i - \bar{X}|}{n}
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%.

On your calculator
  1. 3+5+0+2=÷4= 2.5
  1. 3ENTER5+0+2+4÷ 2.5

ENTER enter (on the HP, puts the number on the stack)

Median absolute deviation Use it
Median absolute deviation=Median( ∣Xi−Median(X)∣ )\text{Median absolute deviation} = \text{Median}\left(\,|X_i - \text{Median}(X)|\,\right)
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.

Population variance Memorize
σ2=∑i=1N(Xi−μ)2N\sigma^2 = \frac{\sum_{i=1}^{N} (X_i - \mu)^2}{N}
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%.

On your calculator
  1. 38÷4= 9.5
  2. √x 3.0822

√x square root

  1. 38ENTER4÷ 9.5
  2. g√x 3.0822

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

Population standard deviation Use it
σ=σ2\sigma = \sqrt{\sigma^2}
Quick example

Population variance 9.5 (%²). √9.5 = 3.08%.

On your calculator
  1. 9.5√x 3.0822

√x square root

  1. 9.5g√x 3.0822

g blue shift key · √x square root

Sample variance Memorize
s2=∑i=1n(Xi−Xˉ)2n−1s^2 = \frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}
Quick example

Squared deviations of 4 returns add to 38. 38 ÷ (4 − 1) = 12.67 (%²).

On your calculator
  1. 38÷(4−1)= 12.67
  1. 38ENTER4ENTER1−÷ 12.67

ENTER enter (on the HP, puts the number on the stack)

Sample standard deviation Memorize
s=∑i=1n(Xi−Xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}}
Quick example

Variance 12.67 (%²). √12.67 = 3.56%.

On your calculator
  1. 12.67√x 3.56

√x square root

  1. 12.67g√x 3.56

g blue shift key · √x square root

Sample variance from a population variance Use it
s2=σ2×nn−1s^2 = \sigma^2 \times \frac{n}{n - 1}
Quick example

σ² = 0.0090 from 30 returns. s² = 0.0090 × 30 ÷ 29 = 0.009310; s = 9.65%.

On your calculator
  1. 0.009×30÷29=√x 0.0965

√x square root

  1. 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

  1. 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).

  2. 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.

  3. 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).

  4. 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.

  1. 1Four monthly returns are 5%, −3%, 9% and 1%. The sample standard deviation is closest to:

  2. 2Compared with the standard deviation of the same data, the mean absolute deviation is most likely:

  3. 3The squared deviations of seven monthly returns from their sample mean add up to 96 (%²). The sample standard deviation is closest to:

  4. 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:

  5. 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.
Range Use it
Range=Xmax⁡−Xmin⁡\text{Range} = X_{\max} - X_{\min}
Quick example

Returns of 4%, −2%, 9% and 1%. Range = 9 − (−2) = 11 percentage points.

On your calculator
  1. 9−2+|-= 11

+|- change sign

  1. 9ENTER2CHS− 11

ENTER enter (on the HP, puts the number on the stack) · CHS change sign

Mean absolute deviation Use it
MAD=∑i=1n∣Xi−Xˉ∣nMAD = \frac{\sum_{i=1}^{n} |X_i - \bar{X}|}{n}
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%.

On your calculator
  1. 3+5+0+2=÷4= 2.5
  1. 3ENTER5+0+2+4÷ 2.5

ENTER enter (on the HP, puts the number on the stack)

Median absolute deviation Use it
Median absolute deviation=Median( ∣Xi−Median(X)∣ )\text{Median absolute deviation} = \text{Median}\left(\,|X_i - \text{Median}(X)|\,\right)
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.

Population variance Memorize
σ2=∑i=1N(Xi−μ)2N\sigma^2 = \frac{\sum_{i=1}^{N} (X_i - \mu)^2}{N}
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%.

On your calculator
  1. 38÷4= 9.5
  2. √x 3.0822

√x square root

  1. 38ENTER4÷ 9.5
  2. g√x 3.0822

ENTER enter (on the HP, puts the number on the stack) · g blue shift key · √x square root

Population standard deviation Use it
σ=σ2\sigma = \sqrt{\sigma^2}
Quick example

Population variance 9.5 (%²). √9.5 = 3.08%.

On your calculator
  1. 9.5√x 3.0822

√x square root

  1. 9.5g√x 3.0822

g blue shift key · √x square root

Sample variance Memorize
s2=∑i=1n(Xi−Xˉ)2n−1s^2 = \frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}
Quick example

Squared deviations of 4 returns add to 38. 38 ÷ (4 − 1) = 12.67 (%²).

On your calculator
  1. 38÷(4−1)= 12.67
  1. 38ENTER4ENTER1−÷ 12.67

ENTER enter (on the HP, puts the number on the stack)

Sample standard deviation Memorize
s=∑i=1n(Xi−Xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n} (X_i - \bar{X})^2}{n - 1}}
Quick example

Variance 12.67 (%²). √12.67 = 3.56%.

On your calculator
  1. 12.67√x 3.56

√x square root

  1. 12.67g√x 3.56

g blue shift key · √x square root

Sample variance from a population variance Use it
s2=σ2×nn−1s^2 = \sigma^2 \times \frac{n}{n - 1}
Quick example

σ² = 0.0090 from 30 returns. s² = 0.0090 × 30 ÷ 29 = 0.009310; s = 9.65%.

On your calculator
  1. 0.009×30÷29=√x 0.0965

√x square root

  1. 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

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.

  1. Mean, median, mode and what outliers do to them
  2. Quartiles, percentiles and box plots
  3. Range, mean absolute deviation, variance and standard deviation
  4. Semi-deviation, downside deviation and the coefficient of variation
  5. Skewness and kurtosis
  6. Covariance and correlation
  7. Scaling volatility over time: data frequency and the root-of-time law

Ask Sensei Listen instead

Questions on Range, mean absolute deviation, variance and standard deviation

Learn with Sensei, out loud The voice tutor, in early access

Sensei teaches the lesson aloud and stops when you interrupt: "wait, why is the geometric mean lower?" It answers with the lesson's own example, then quizzes you by voice. Every account can try Sensei on one module, with one voice question.

USD 149 a month founding price (regular USD 199), kept for as long as you stay subscribed. Everything in Plus included.

In active development and improving every day. Send feedback · Plans and pricing

Analyst Dojo Plus

Your free review list holds 10 items.

Plus keeps everything you save, for USD 19 a month. To make room on the free plan, remove something from your review list.

See Plus

Lessons, checkpoints and the lesson questions in practice stay free. Compare plans