Hexa Scholar

The law of large numbers

A navy bowl of gold and ivory tokens, a wooden scoop, and three empty cream cups on a wooden table.
A bowl of tokens and empty cups, ready for repeated samples.

The question

How often will a sample average miss its target by more than 0.1 as you collect more observations?

Choose a trend, then follow repeated runs of the same experiment.

  1. 1 SeePredict how often averages miss.
  2. 2 TryTest another population and plan a sample.
  3. 3 ProveBuild a probability bound.
  4. 4 ApplyUse the law in five problems.
Before you start · 3 quick checks on means, variance, and events

Two ideas before you start

2 ideas

A running mean uses the observations so far

Observation bars and a dashed line at their arithmetic mean.

Switch the sample. The dashed line is its mean; it is a statistic computed from the whole list.

Exact definition

For observations \(X_1,X_2,\ldots\), the running sample mean after \(n\) observations is

\[\bar X_n=\frac{X_1+\cdots+X_n}{n}.\]

Before sampling, this is a random variable. One realized sequence gives one running-mean path. The sampling-distributions lesson studies its distribution at a fixed sample size. Here we follow that distribution as the size changes.

A miss means leaving a fixed band

A fixed target band and a movable value on a number line.

Select a value to see whether it is outside the band. A value exactly on its edge is inside for this lesson's strict miss event.

Exact definition

Let \(\mu\) be a population mean and \(\varepsilon\gt0\) a fixed tolerance. A miss is \(|\bar X_n-\mu|\gt\varepsilon\). The band includes both endpoints. A miss rate in repeated simulations estimates the probability of this event; it need not equal that probability.

The cards use a target of 0.5 and tolerance 0.1. This classifies a single value. It says nothing yet about how the probability changes with sample size.

The sampling rule matters

Independent and identically distributed, or iid, means that all draws share one distribution and that their joint probabilities factor across draws. The population stays fixed as the sample grows. Each run uses fresh draws, and different runs are independent in the probability model. The page approximates that model with a reproducible pseudorandom generator.

Independently sampling with replacement from a fixed population is an example. Copying an observation, selecting only favorable outcomes, or changing the population midway does not follow this rule. The mean and variance below are population quantities, not estimates substituted from the observed sample.

1 See

Choose the trend before seeing the runs

2 Try

Change the population

Keep independent draws, but use a standard Cauchy population. Its density is \(f(x)=1/[\pi(1+x^2)]\) on the real line. Zero is its symmetry center. Compare the average with that center using the same tolerance.

3 Prove

From variance to a vanishing probability

Weak law, finite-variance version

Let \(X_1,X_2,\ldots\) be iid with finite mean \(\mu\) and finite variance \(\sigma^2\). For every fixed \(\varepsilon\gt0\),

\[P(|\bar X_n-\mu|\gt\varepsilon)\longrightarrow0.\]

This says that \(\bar X_n\) converges to \(\mu\) in probability. The tolerance is fixed while the sample size tends to infinity. It need not hold for a tolerance that itself shrinks arbitrarily fast.

The weak law needs only iid draws with a finite mean. Finite variance is an extra assumption made here because the proof below uses Chebyshev's inequality; the finite-mean version needs a different argument.

For the proof choices, assume \(n\ge2\) and \(\sigma^2\gt0\), and write \(B_n=\sigma^2/(n\varepsilon^2)\). The zero-variance case is handled below. These restrictions keep the alternative equations distinct.

The expectation and variance rules give the moments of a mean. The Markov and Chebyshev lesson supplies the tail inequality. Choose the valid step at each line.

4 Apply

Turn assumptions into a guarantee

Use what you found above. Enter a decimal without units. Probability answers accept absolute error 0.0001. The sample-size answer is an exact integer. Each problem includes hints and a worked solution.

Key point Distinguish a probability bound from an actual probability, a sufficient sample size from a necessary one, and independent observations from repeated copies.
Level IntroPrerequisites expectation, variance, sampling distributions, and ChebyshevTime about 30 min

Further reading