Standard error of the mean
The sample mean is itself random. Its standard deviation, the standard error, is the single-observation volatility divided by the square root of the sample size.
01The formula
- the standard error: the typical distance between the sample mean and the true mean
- the standard deviation of one observation
- the number of observations averaged
02See it move
03Where it is used
- Quant researcherPuts error bars on backtest returns before trusting a signal.
- Portfolio managerJudges whether a manager's average return over a few years is distinguishable from zero.
- Execution traderDecides how many orders are needed before an average slippage figure is reliable.
04Why traders use it
It turns 'we have some data' into 'this is how wrong our average could be'. Every confidence interval and test statistic for a mean is built on it.
05Worked example
With daily volatility 1.0% and 50 days, the standard error of the average daily return is 0.141%, which is 14.1% of one day's volatility. About 95% of sample means land within 0.277% of the truth.
06How it is built
- The sum of independent observations has variance .
- The mean divides the sum by , which divides the variance by : .
- Take the square root: .
07The common mistake
Applying it to overlapping or autocorrelated data. Daily-sampled monthly returns share most of their days, so the true standard error is much larger than σ/√n suggests.
08In Python and LaTeX
import numpy as np sigma, n = 0.01, 50 print(round(sigma/np.sqrt(n), 5))
\operatorname{SE}(\bar{x}) = \frac{\sigma}{\sqrt{n}}09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.