Estimators and their errors
An estimator is a rule that turns data into a guess of an unknown parameter . Two numbers describe how good it is:
- Bias: .
- Variance: , whose square root is the standard error.
They combine into the mean squared error, . A slightly biased estimator with much lower variance can be the better choice.
The sample mean of i.i.d. observations with standard deviation is unbiased with
The is the most important number in statistics: to halve your error you need four times the data.
The central limit theorem and confidence intervals
For large , is approximately normal whatever the distribution of each observation (as long as it has finite variance):
So is an approximate 95% confidence interval. Numbers worth memorising: , , , and .
For a sum of i.i.d. variables, the mean is and the standard deviation is . Ten dice have mean and standard deviation .
Hypothesis tests
A test asks whether the data are surprising under a null hypothesis .
- Choose a test statistic, for example , or when is estimated by the sample standard deviation .
- The p-value is the probability, under , of a statistic at least as extreme as the one observed.
- Reject if the p-value is below the significance level (often 5%).
A type I error rejects a true null (probability ). A type II error fails to reject a false null; power is one minus its probability. A p-value is not the probability that the null is true.
Worked example
is this strategy real?
A strategy returned an average of 0.05% per day with a daily standard deviation of 1% over one year of 252 trading days. Is the mean return significantly positive?
Show solutionHide solution
The t-statistic is
That is far below 2, so one year of data cannot distinguish this from luck. A useful identity: . Here the Sharpe ratio is about , and you would need roughly years for .
Multiple testing: the backtest trap
Test strategies with no edge at and you should expect false discoveries. The chance of at least one is , which is 64% for .
Defences:
- Bonferroni: use threshold . Simple and conservative.
- Hold-out data: decide what to test before looking at the out-of-sample period, then look once.
- Raise the bar: many researchers ask for for a new factor, because so many have been tried.
- Count your trials honestly, including the parameter settings you tried and discarded.
Knowledge check
400 observations have a standard deviation of 2. What is the standard error of their mean?
Knowledge check
You want a confidence interval one third as wide. By what factor must the sample size grow?
Knowledge check
You test 50 strategy variants and want a 5% chance of any false discovery overall. Under Bonferroni, what p-value should each test need?
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).