Law of large numbers
The law of large numbers states that, under suitable conditions, the average of increasingly many observations converges toward its expected value.
The Coder Cafe
The law of large numbers states that the average outcome of repeated random trials tends to approach the expected value as the number of trials increases.
- How it is used
- Applies randomized sampling to approximate high-volume counters and reduce hot-row database contention.
- How deep it goes
- Defines convergence, demonstrates coin flips and like counts, and discusses tuning and popularity limits without formal probability.
- Examples
- Uses repeated coin flips and a probabilistic social-media like counter with weighted increments.
- What you can do after
- Apply probabilistic increment to reduce counter-write frequency when approximate totals are acceptable.
Math and Architectures of Deep Learning
A probabilistic principle stating that sample averages converge toward the expected value as the number of samples grows.
- How it is used
- Uses repeated sampling to justify estimating an unknown distribution’s mean with a sample average.
- How deep it goes
- Defines convergence informally, explains finite-sample uncertainty, and relates required sample size to variance without specifying a threshold.
- Examples
- Uses casino betting and repeated game outcomes to illustrate expected value emerging over many trials.
- What you can do after
- Evaluate whether a sample average can approximate a distribution’s expected value and recognize when higher variance requires more samples.
Read how Math and Architectures of Deep Learning explains law of large numbers →
What to know first
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
Related concepts
- probabilistic incrementused by · Probabilistic increment is an approximate counting technique that randomly samples increment operations and compensates sampled updates with a larger increment.
- TD-learningused by · Temporal-difference learning is a reinforcement-learning method that incrementally updates value estimates using observed rewards and bootstrapped estimates of subsequent values.
- independencecontrasts with · Two random events or quantities are independent when the occurrence or value of one does not change the probability distribution of the other.
- meanmeasures · The mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
- varianceused by · Variance is the expected squared deviation of a random variable from its mean and measures the dispersion of its values.
Questions about law of large numbers
What is law of large numbers?
The law of large numbers states that, under suitable conditions, the average of increasingly many observations converges toward its expected value.
Which Manning books explain law of large numbers?
The Coder Cafe and Math and Architectures of Deep Learning.
What should I know before learning law of large numbers?
Manning books that teach law of large numbers usually introduce mean first.
What is the difference between law of large numbers and independence?
The law of large numbers states that, under suitable conditions, the average of increasingly many observations converges toward its expected value. Two random events or quantities are independent when the occurrence or value of one does not change the probability distribution of the other.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

