Know these first
- M-A08: Summation notation
- M-C02: Expectation
- M-C03: Variance and standard deviation
By the end you will be able to
- 1Tell a sample from the population it comes from, and an estimate from the true value.
- 2Calculate the sample mean, the sample variance (dividing by n − 1) and the sample standard deviation.
- 3Give an intuitive reason for dividing by n − 1.
- 4Explain why more data gives steadier estimates.
Why you need it
Nobody hands you the true volatility of a share. You have a list of past returns, and you work out an estimate from it. This atom is about that step: from the data you have to the number you want.
Volatility is estimated from a window of past returns as a sample standard deviation, with n − 1.
You met the formula in L1.5.06: Equity returns and volatility. Here it is explained piece by piece, along with why the answer wobbles.
The idea
You only ever see a sample
Picture a machine that produces daily returns. It has a true average, μ = 0.04%, and a true standard deviation, σ = 1%: that is the population. In real life those numbers are hidden. All you get is a sample of days. Draw a few and compare what you would estimate with the truth.
Draw a sample
Sample 1 · 10 illustrative daily returnsYour last samples of 10
| # | s | |
|---|---|---|
| 1 | −0.168% | 0.64% |
Every sample gives a slightly different answer. The sample mean and sample standard deviation are estimates: sensible guesses at μ and σ, never exactly right.
The rules
The sample mean. Greek letters (μ, σ) are the true values; letters from the data (x̄, s) are the estimates.
The sample variance and standard deviation. Spread is measured by squared deviations from the mean, as in M-C03: Variance and standard deviation, but with one change when you only have a sample.
Why n − 1? No proof needed, just the idea.
Check it with simulated samples. Small samples show the gap best.
Divide by n or by n − 1?
4,000 samples of size n, true variance 1In theory, dividing by n gives on average (n − 1)/n of the true variance: 0.667 for n = 3. The shortfall matters most for small samples.
The rules, for reference
Divide by n − 1 whenever the standard deviation is estimated from a sample, as across the course. Divide by N only when you truly have the whole population and know μ.
Try it
Five analysts each estimate the same volatility from their own illustrative data. Slide the number of days from 2 up to 500 and watch the estimates settle. Press “New samples” a few times: the early estimates jump around, the late ones barely move.
Try itHow many days do you need?
Descriptive statistics calculator →Analyst 1 (the thick line), first 20 days
All 5 analysts after 20 days
Same process, same true σ, different samples: more days, steadier estimates.
Worked examples
1. Volatility from five days
Step 1 of 5- 1
The set-up
Five daily returns, in % (illustrative): 1.4, −0.6, 0.7, −1.3, 0.8.
2. How much does n − 1 matter?
Step 1 of 3- 1
The set-up
Dividing by n − 1 instead of n makes s bigger by a factor . How big is that?
3. How steady is the estimate?
Step 1 of 3- 1
The set-up
Simulate 2,000 analysts, each with their own sample from the same process (true σ = 1%), for three sample sizes. Look at the middle 90% of their estimates.
Common mistakes
Each line below is a tempting slip. Spot what is wrong, then check.
Reaction
Check what stuck
Question 1 · objective 2
What is the sample mean of 2, 4 and 9?
Question 2 · objective 2
What is the sample variance s² of 2, 4 and 9 (divide by n − 1)?
Question 3 · objective 2
What is the sample standard deviation s of 1 and 3, to three decimals?
Question 4 · objective 3
Why does the sample variance divide by n − 1 rather than n?
Question 5 · objective 4
Two analysts estimate the volatility of the same share, one from 20 days and one from 320 days. What do you expect?
Glossary
- Population
- Everything you would like to know about: every possible value, or the process that produces them. Its mean μ and standard deviation σ are the true values.
- Sample
- The values you actually have, such as the last n days of returns. Statistics are worked out from it.
- Estimate
- A number worked out from a sample to stand in for an unknown true value, such as x̄ for μ.
- Sample mean (x̄)
- x̄ = (x₁ + … + xₙ) / n: the ordinary average of the sample.
- Sample variance (s²)
- s² = Σ(xᵢ − x̄)² / (n − 1): the average squared deviation from the sample mean, dividing by n − 1.
- Sample standard deviation (s)
- s = √s²: the sample standard deviation, in the same units as the data. For returns, the volatility estimate.
- Estimation error
- The difference between an estimate and the true value. It shrinks, on average, as the sample grows.