Trading Dev AcademyFree quant education

Free lesson · Statistics

The central limit theorem: sampling means under explicit assumptions

Open interactive lessonPractice calculationsExplore labs

Start with the idea

The central limit theorem concerns a suitably standardised average, not a promise that raw returns become normal. Its main practical benefit is a scale for sampling error. Dependence, very heavy tails and selection can make a naive standard error much too optimistic.

Symbols, units & horizon
  • Xᵢ: independent observations with a common distribution (IID)
  • μ: population mean
  • μ₀: mean under the null hypothesis
  • σ: population standard deviation
  • x̄ or X̄: sample average
  • s: sample standard deviation
  • n: sample count
  • SE: estimated standard error of the mean, in the units of X
  • t: standardised mean difference
  • N(μ,v): normal distribution with mean μ and variance v (not SD)
  • N(0,1): standard normal distribution
  • ∞: infinity, the limiting sample size
  • →: converges in distribution when used in the CLT

When and why to use this

Use standard errors to plan a study and to distinguish a large estimated mean from a precise one. Combine inference with economic materiality and independent evaluation.

Individual trades come from an ugly distribution: skewed, fat-tailed, sometimes bimodal. The CLT says the average of many independent, identically distributed draws with finite variance is approximately normal, with standard deviation shrinking as 1n.

x‾n≈𝒩(μ,σ2n)as n→∞
Variance algebra + CLT approximation

Derive the scale of the sample mean

  1. For IID X with mean μ and variance σ², linearity gives E[X‾]=nμn=μ. Independence gives Var(∑Xi)=nσ2.
  2. Dividing by n² gives Var(X‾)=σ2n and SD σn. The CLT additionally states that n(X‾−μ)σ approaches a standard normal distribution under its conditions.
  3. Estimate SE using s. Then t=(x‾−μ0)(sn). Halving SE at the same variance requires quadrupling n.
Work it by hand

Mean $40, s=$400, n=100 gives SE=$40 and t=1 versus a zero mean. n=400 would give SE=$20 only if the sampling model and variance remained appropriate.

Three consequences you will use constantly:

  • Sample size. To halve the noise in your estimated EV you need four times the trades. A 30-trade backtest has an EV estimate with error σ30≈0.18σ — for most strategies, bigger than the EV itself.
  • Portfolio-level statistics are cleaner. Diversification can reduce idiosyncratic variation, but shared factors and tail dependence can leave portfolio returns strongly non-normal. Do not infer normality from the number of positions.
  • The t-statistic. t=x‾(sn). Under an appropriate sampling model, compare the estimated mean with its standard error. A threshold near 2 is not universal and does not account for dependence, model search or costs.
A strategy shows mean +$40 and σ = $400 per trade over 100 trades. What is its t-statistic?

Standard error is 400100=40, so t=4040=1. The mean is one estimated standard error above zero under IID assumptions. With unchanged mean and variance, 400 trades would give t ≈ 2, but this is not a stopping or deployment rule.

Explain to a friend why a 20-trade demo account with a 65% win rate isn't evidence of an edge.

With 20 coin flips, the win rate's standard error is 0.5⋅0.520≈11 percentage points. A 65% result is about 1.3 standard errors above 50% — something a fair coin does around one time in ten. The CLT tells you how much data it takes to see through the noise, and 20 trades is not it.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

from statistics import mean, stdev
from math import sqrt

def mean_inference(values, null_mean=0):
    """IID standard error; not a HAC or selection-adjusted test."""
    se = stdev(values)/sqrt(len(values))
    if se == 0:
        raise ValueError("Nonzero sample dispersion required")
    return se, (mean(values)-null_mean)/se

def sample_size_for_se(sd, target_se):
    from math import ceil
    return ceil((sd/target_se)**2)

print(sample_size_for_se(400, 20))  # 400

Continue learning

Statistics & Probability — all lessons
  1. Start with counts, probabilities and averages
  2. Random outcomes, sample averages and the limits of the bell curve
  3. Conditional probability: update a belief with evidence
  4. Prediction markets: probability, price and net expected value
  5. Expected value: measure the payoff before choosing the risk
  6. Correlation: how many strategies do you really have?
  7. Conditional probability and Bayes: where the edge actually lives
  8. The central limit theorem: sampling means under explicit assumptions
  9. Estimation uncertainty and Bayesian updating

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations