A sample's statistics estimate a population's, with error. This lesson covers sampling methods and biases, the standard error of the mean, confidence intervals, hypothesis tests with test statistics and p-values, and the two kinds of error a test can make.
Samples and sampling error
A population is every member of a group (all monthly returns a strategy could produce); a sample is the part observed. Sampling error is the gap between a sample statistic and the population value it estimates. In simple random sampling every member has the same chance of selection. In stratified random sampling the population is split into subgroups (by sector, credit rating or maturity) and each is sampled in proportion, which is how many bond index funds hold a manageable subset that still matches the index's profile.
Return data carry known biases. Survivorship bias: databases that drop closed funds overstate past returns. Data snooping: testing many rules on one data set until one "works". Look-ahead bias: using information that wasn't available at the time. Time-period bias: results that hold only in the chosen years.
Standard error and the central limit theorem
The central limit theorem says that for a large sample (a common rule of thumb is 30 or more), the sample mean is approximately normal around the population mean, whatever the population's shape, provided its variance is finite. Its standard deviation, the standard error, is σ / sqrt(n), estimated by s / sqrt(n) when the population σ is unknown.
Example: 36 monthly returns from a strategy have a mean of 0.80% and a standard deviation of 3.0%. The standard error is 3.0 / sqrt(36) = 0.50%. Because of the square root, quadrupling the sample halves the standard error.
Confidence intervals
A confidence interval is the point estimate plus or minus a reliability factor times the standard error. The factor is a z-value when σ is known (1.96 for 95%), and a t-value with n - 1 degrees of freedom whenever σ is estimated by s; for large samples z gives nearly the same value. For the strategy, t with 35 degrees of freedom is about 2.03 at 95%:
0.80 ± 2.03 x 0.50 = -0.215% to 1.815%
The 95% is a property of the procedure, not of one interval: build intervals this way from sample after sample and roughly 19 in 20 will capture the true mean. Any single interval either contains it or doesn't. Intervals widen with higher confidence or noisier data, and narrow as n grows.
Testing a hypothesis
- State the null hypothesis H0 (usually "no effect", including the equal sign) and the alternative Ha.
- Choose the test statistic and the significance level α.
- Find the critical value: one-tailed if Ha points one way, two-tailed if it says "different from".
- Compute the statistic: t = (sample mean - hypothesized mean) / standard error.
- Reject H0 if the statistic falls beyond the critical value; otherwise fail to reject it.
For the strategy, testing H0: mean = 0 against Ha: mean ≠ 0 at 5%, t = 0.80 / 0.50 = 1.60, inside ±2.03, so H0 is not rejected; the interval above includes zero, which says the same. "Fail to reject" is not proof that H0 is true.
p-values and the two errors
The p-value is the smallest significance level at which H0 would be rejected. Reject when the p-value is below α.
| Decision | H0 true | H0 false |
|---|---|---|
| Reject H0 | Type I error (probability α) | Correct |
| Fail to reject H0 | Correct | Type II error (probability β) |
The power of a test, 1 - β, is its chance of rejecting a false H0. For a given sample, cutting α raises β; a larger sample can lower both. A result can be statistically significant yet too small to matter economically once trading costs, taxes and risk are counted.
On the exam
- Standard error divides by sqrt(n), not n.
- Use t with n - 1 degrees of freedom when σ is estimated from the sample.
- Match the critical value to one or two tails and to α.
- Reject when the statistic is beyond the critical value, or when p < α.
- A p-value is not the probability that H0 is true.