Free lesson · Statistics
Law of large numbers: what averaging can and cannot establish
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- If repeated observations follow the required stable sampling rule and have a finite average absolute size, their average becomes more likely to be close to the true mean as the sample grows.
Symbols, units & horizon
- X_i: net P&L in dollars for trade i
- n: number of trades
- i: observation index
- X̄_n: sample average in dollars per trade
- μ: population expected dollars per trade under the fixed sampling distribution
- E: expectation
- →p: convergence in probability as n grows
- the observations use one fixed trade horizon
When and why to use this
Use the law to understand why Monte Carlo averages and strategy mean estimates can be consistent. Verify the sampling distribution, finite moments, and dependence assumptions before invoking it.
Start here · the same idea in everyday words
| Technical term | Everyday meaning | Concrete example |
|---|---|---|
| Estimator | A rule that turns a sample into an estimate. | Add the observed trade profits and divide by the trade count. |
| Independent and identically distributed (iid) | Observations do not affect one another and all follow the same probability rule. | Separate draws from the same unchanged bag are an idealised example. Adjacent market returns need not behave this way. |
| Convergence in probability | As sample size grows, the chance of an error larger than any fixed tolerance tends to zero. | Pick an error tolerance of $1; the theorem describes the chance of missing the true mean by more than $1 as sample size grows. |
Unpack a technical sentence
Technical wording: The sample mean is consistent under iid integrability.
Read it as: If repeated observations follow the required stable sampling rule and have a finite average absolute size, their average becomes more likely to be close to the true mean as the sample grows.
A slower worked example · one step at a time
- A synthetic trade pays either $3 or −$1 with equal probabilities. Its population mean is .5 times 3 plus .5 times −1, or $1 per trade.
- A sample of two wins has mean $3. A sample of one win and one loss has mean $1. Both are possible from the same unchanged process.
- For a sample [3,−1,3,−1], add the outcomes to get $4 and divide by four trades to get $1 per trade.
- Add another loss. The new sum is $3 across five trades, so the sample mean becomes $.60 per trade. More observations did not move this particular sample closer to $1.
- The theorem concerns the probability of an estimation error over repeated samples as size grows. It does not say each added observation must improve the estimate. Real data also require checks for dependence and changing distributions.
Self-assessed: Can a larger sample move its average farther from the true mean?
Yes. Consistency is a large-sample probability statement. It does not make every individual path improve steadily.
Study loop: predict the result, work through the arithmetic, run the Python, then explain which assumption would make the result unreliable.
- Start with repeated net P&L observations measured in dollars per trade. The arithmetic mean adds them and divides by the number observed.
- The weak law of large numbers says that for independent, identically distributed observations with a finite absolute first moment, the sample mean converges in probability to the population mean. Convergence in probability means the chance of a fixed-size estimation error tends to zero.
- It does not promise a particular finite-sample error or a monotone path toward the answer. Dependent data need a different set of conditions, such as an appropriate ergodic theorem. Repeating a biased measurement does not remove its bias.
Before reading the working, evaluate (-2+1+3+2)/4. Give the result in dollars per trade.
The sample mean is $1 per trade. The unknown population mean is not revealed exactly by this sample.
Law of large numbers: what averaging can and cannot establish
- For observed P&L [−2,1,3,2], add −2+1+3+2=4 dollars.
- Divide by n=4 to obtain 1 dollar per trade. This is an arithmetic identity.
- The theorem concerns the sequence of averages as n increases under its assumptions; four observations alone do not prove the population mean is 1.
The sample mean is $1 per trade. The unknown population mean is not revealed exactly by this sample.
An analogy to remember
Repeated measurements can reduce sampling noise around the same target; a miscalibrated ruler keeps its systematic error.
How this becomes a building block
A simulation engine uses repeated scenario values to estimate an expectation. Consistency belongs to the sampling procedure and assumptions.
Python · run and reuse
Architecture pseudocode
# Python 3.10+; standard library only unless NumPy is imported.
# Synthetic teaching inputs; no historical performance claim.
from math import isfinite
def sample_mean(values):
values = list(values) # Same horizon and units for every observation.
if not values or not all(isfinite(x) for x in values):
raise ValueError("Nonempty finite sample required")
return sum(values)/len(values)
print(sample_mean([-2,1,3,2]))
# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
from math import exp, e # Standard library; no extra dependency.
return {
"population": .5*3+.5*(-1),
"four_mean": (3-1+3-1)/4,
"five_mean": (3-1+3-1-1)/5,
}
print(plain_language_example())Self-assessed: explain the calculation, its output units, and one condition under which it fails.
Use the law to understand why Monte Carlo averages and strategy mean estimates can be consistent. Verify the sampling distribution, finite moments, and dependence assumptions before invoking it. Market regime changes, selection bias, infinite means or inappropriate dependence assumptions can defeat the stated convergence claim.
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.
# Python 3.10+; standard library only unless NumPy is imported.
# Synthetic teaching inputs; no historical performance claim.
from math import isfinite
def sample_mean(values):
values = list(values) # Same horizon and units for every observation.
if not values or not all(isfinite(x) for x in values):
raise ValueError("Nonempty finite sample required")
return sum(values)/len(values)
print(sample_mean([-2,1,3,2]))
# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
from math import exp, e # Standard library; no extra dependency.
return {
"population": .5*3+.5*(-1),
"four_mean": (3-1+3-1)/4,
"five_mean": (3-1+3-1-1)/5,
}
print(plain_language_example())Continue learning
Statistics & Probability — all lessons- Start with counts, probabilities and averages
- Random outcomes, sample averages and the limits of the bell curve
- Conditional probability: update a belief with evidence
- Prediction markets: probability, price and net expected value
- Expected value: measure the payoff before choosing the risk
- Correlation: how many strategies do you really have?
- Conditional probability and Bayes: where the edge actually lives
- The central limit theorem: sampling means under explicit assumptions
- Law of large numbers: what averaging can and cannot establish
- Central limit theorem, standard errors and confidence intervals
- Total expectation and total variance: within-regime and between-regime risk
- Markov, Chebyshev and Jensen: bounds without a full distribution
- Gauss–Markov theorem: what a regression hedge ratio guarantees
- Delta method: propagate estimator uncertainty through a smooth function
- Multiple testing and the union bound: account for the whole search
- Estimation uncertainty and Bayesian updating
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations