Sub topic 1
Sampling distributions and the standard error
A sample mean is one draw from many possible sample means, and the spread of those possible means is what hypothesis tests and confidence intervals rely on. This chapter builds that idea: what a sampling distribution is, why the central limit theorem lets you treat it as approximately normal, and how the standard error measures its spread.
Prerequisites
This chapter assumes you can already do the following:
- Compute a mean, variance, and standard deviation from data.
- Convert a value to a z-score and read a normal table.
- Use basic probability, including the idea of a random variable.
- Understand that a sample is a subset drawn from a larger population.
Population, sample, and sampling error
A population parameter, such as the true mean return μ, is a fixed number you usually cannot observe. A sample statistic, such as the sample mean x̄, is computed from the data you have. If you drew a different sample, you would get a different x̄.
The gap between a statistic and the parameter it estimates is the sampling error: x̄ − μ. It is not a mistake in the arithmetic. It arises because you observed only part of the population.
The sampling distribution
The sampling distribution of a statistic is the probability distribution of that statistic over all possible samples of the same size n from the same population.
Imagine drawing a sample of n observations, computing x̄, and repeating this many times. The collection of x̄ values forms a distribution with its own mean and standard deviation. Hypothesis tests ask whether your one observed x̄ is plausible under an assumed value of μ, and that question can only be answered by knowing this distribution.
The central limit theorem
The central limit theorem (CLT) states that for a population with finite mean μ and finite variance σ², the sampling distribution of the sample mean from random samples of size n approaches a normal distribution as n grows. Its mean is μ, and its standard deviation is σ/√n.
- The population does not need to be normal.
- A common rule of thumb is that n ≥ 30 is large enough. Very skewed populations may need more.
- If the population is itself normal, the sample mean is normal for any n.
The CLT is why z-tests and t-tests on means work for returns data that are not perfectly normal.
The standard error
The standard error of the mean is the standard deviation of the sampling distribution of x̄.
- When σ is known: σ_x̄ = σ / √n
- When σ is unknown, use the sample standard deviation s: s_x̄ = s / √n
Both are called the standard error. In practice σ is rarely known, so you will almost always use s/√n.
| Quantity | Describes | Formula |
|---|---|---|
| Standard deviation (s) | Spread of individual observations | √[Σ(xᵢ − x̄)² / (n − 1)] |
| Standard error (s_x̄) | Spread of the sample mean across samples | s / √n |
Two consequences follow from the √n in the denominator:
- A larger sample gives a smaller standard error. The sample mean becomes a more precise estimate of μ.
- The gain shrinks as n grows. To halve the standard error you need four times as many observations.
Worked example
A fund's monthly returns have a sample standard deviation of 12.0%. You have n = 36 monthly observations.
- Standard error: 12.0 / √36 = 12.0 / 6 = 2.0%.
- If you had n = 144 observations with the same s, the standard error would be 12.0 / 12 = 1.0%.
Quadrupling the sample cut the standard error in half. Note that s itself did not change. The fund's month-to-month volatility is the same, but the average of more months is better pinned down.
Seeing it by simulation
The code below draws repeated samples from a strongly skewed population (exponential, with mean 2 and standard deviation 2). It compares the observed spread of the sample means with the theoretical σ/√n.
import numpy as np
rng = np.random.default_rng(42)
sigma = 2.0 # exponential with scale 2 has mean 2 and st. dev. 2
for n in (4, 16, 64, 256):
# 20,000 samples of size n, one sample mean per row
means = rng.exponential(scale=2.0, size=(20_000, n)).mean(axis=1)
print(f"n={n:>3} mean of means={means.mean():.3f} "
f"observed SE={means.std(ddof=1):.3f} "
f"sigma/sqrt(n)={sigma / np.sqrt(n):.3f}")The mean of the sample means stays near 2 at every n, so the sample mean is centered on μ. The observed standard deviation of the means tracks σ/√n closely. As n rises, a histogram of the means also becomes more symmetric and bell-shaped, even though the underlying population is heavily skewed.
Standard error in a test statistic
Many test statistics have the same structure:
(sample statistic − hypothesized value) / standard error of the statistic
For a single mean this is (x̄ − μ₀) / (s/√n). The standard error converts a raw difference into a count of standard errors, which can then be compared with a critical value. Later chapters apply this same pattern to differences between means, correlations, and regression slopes. Each has its own standard error formula, but the logic is identical.
The t-distribution and unknown σ
When you replace σ with s, you add extra uncertainty, because s is itself a random quantity. The standardized mean (x̄ − μ) / (s/√n) then follows a t-distribution with n − 1 degrees of freedom rather than a normal distribution.
- The t-distribution is symmetric and centered at zero, like the normal, but has fatter tails.
- It approaches the normal as the degrees of freedom increase.
- Fat tails mean larger critical values for small n, which makes the test more cautious.
Common errors
- Confusing s and s/√n. Standard deviation describes individual observations. Standard error describes the estimate of the mean. Reporting s when the question asks for the standard error is a frequent exam mistake.
- Forgetting the square root. Dividing by n instead of √n understates the standard error badly.
- Assuming the CLT fixes everything. It describes the mean of a sample with finite variance. It does not make the observations themselves normal, and it does not rescue badly dependent data.
- Treating n ≥ 30 as a guarantee. It is a rule of thumb. Heavy skew or extreme outliers can require much larger samples.
- Ignoring dependence. The σ/√n formula assumes independent observations. Positive autocorrelation in a return series makes the true standard error larger than the formula suggests.
Exercise
A sample of n = 100 monthly returns has a mean of 1.5% and a sample standard deviation of 5.0%. (a) Compute the standard error of the mean. (b) How large would the sample need to be to reduce the standard error to half of your answer in (a), assuming s stays the same?
Show answer
(a) The standard error is s/√n = 5.0 / √100 = 5.0 / 10 = 0.5%. (b) Halving the standard error requires four times the sample size, so n = 400. Check: 5.0 / √400 = 5.0 / 20 = 0.25%.
Exercise
A colleague says that because the central limit theorem applies, a sample of 40 daily returns must be normally distributed. What is wrong with this statement?
Show answer
The central limit theorem concerns the sampling distribution of the sample mean, not the distribution of the individual observations. The 40 returns can still be skewed or fat-tailed. What the theorem says is that the mean of such samples is approximately normal, with mean μ and standard deviation σ/√n, provided the variance is finite and the observations are independent.