Tutorials › Stochastic Processes › Strong-Law Applications to Frequencies and Averages

Convergence of Random Variables · Tutorial 59 of 994

Strong-Law Applications to Frequencies and Averages

Learn how the strong law turns repeated iid observations into almost-sure limits for sample averages and observed proportions.

Intermediate 9 min read

What You'll Learn

  • State the finite-variance strong law used for these applications.
  • Derive almost-sure convergence of the observed frequency of an event.
  • Obtain limiting proportions for every cell of a finite partition.
  • Find the almost-sure limit of averages of iid measurements.
  • Check how dependence can make a frequency limit fail.
  • Distinguish an almost-sure asymptotic statement from an exact finite-sample claim.

From the Strong Law to Long-Run Frequencies

Repeated observations are often summarized by a sample average or by the fraction of observations satisfying a condition. Examples include the proportion of patients who respond to treatment, the frequency of a particular outcome, and the average of repeated measurements. The strong law explains why these summaries settle down: under suitable independence and moment assumptions, they converge almost surely to their population values.

Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_n)_{n\ge1}\) be an iid sequence of real-valued random variables, with state space \(S\subseteq\mathbb{R}\) and discrete time index \(n\ge1\). “Almost surely” means that the asserted convergence holds for every \(\omega\) in an event of probability one. The strong law with finite variance, established in the earlier material on the strong law, states that if \(\mathbb{E}[X_1]=\mu\) is finite and \(\operatorname{Var}(X_1)<\infty\), then

$$ \frac{1}{n}\sum_{k=1}^{n}X_k\longrightarrow \mu \qquad\text{almost surely as }n\to\infty. $$

The applications below come from choosing what to count or average. For a measurable set \(A\subseteq S\), the indicator \(\mathbf{1}_{\{X_k\in A\}}\) equals \(1\) when observation \(k\) belongs to \(A\), and equals \(0\) otherwise. Its sample average is exactly the observed proportion of observations in \(A\).

Definition: For a measurable set \(A\subseteq S\), the empirical frequency of \(A\) among the first \(n\) observations is $$ \widehat{p}_n(A)=\frac{1}{n}\sum_{k=1}^{n}\mathbf{1}_{\{X_k\in A\}}. $$ The count uses membership in \(A\), including its boundary if \(A\) includes that boundary. The population probability is \(p(A)=\mathbb{P}(X_1\in A)\).

The Frequency and Average Limits

Theorem (Strong-law frequency and average applications): Suppose \((X_n)_{n\ge1}\) is iid on \((\Omega,\mathcal{F},\mathbb{P})\).
  1. For every measurable \(A\subseteq S\), \(\widehat{p}_n(A)\to\mathbb{P}(X_1\in A)\) almost surely.
  2. If \(g:S\to\mathbb{R}\) is measurable and \(\mathbb{E}[g(X_1)]\) is finite with \(\operatorname{Var}(g(X_1))<\infty\), then $$ \frac{1}{n}\sum_{k=1}^{n}g(X_k)\longrightarrow \mathbb{E}[g(X_1)] \qquad\text{almost surely}. $$

Proof. For the first assertion, set \(Y_k=\mathbf{1}_{\{X_k\in A\}}\). Because each \(Y_k\) is a measurable function of \(X_k\), the variables \((Y_k)_{k\ge1}\) are iid. They are bounded between \(0\) and \(1\), so they have finite variance. Their common mean is \(\mathbb{E}[Y_1]=\mathbb{P}(X_1\in A)\). Applying the finite-variance strong law to \((Y_k)\) gives $$ \widehat{p}_n(A)=\frac{1}{n}\sum_{k=1}^{n}Y_k \longrightarrow \mathbb{P}(X_1\in A) \quad\text{almost surely}. $$ For the second assertion, \(g(X_1),g(X_2),\ldots\) are iid because the \(X_k\) are iid and the same measurable function is applied to each. The stated assumptions give them finite mean and finite variance. Applying the same strong law to this transformed sequence proves the claimed limit. \(\square\)

A useful consequence is that a finite collection of categories can be treated all at once. The individual limits hold almost surely; because there are only finitely many categories, their probability-one events have a probability-one intersection. Thus all category proportions converge simultaneously, not just one at a time.

Proposition (Finite partition proportions): Let \(A_1,\ldots,A_r\) be a finite measurable partition of \(S\): the sets are pairwise disjoint and their union is \(S\). Then, almost surely, for every \(j\in\{1,\ldots,r\}\), $$ \widehat{p}_n(A_j)\longrightarrow \mathbb{P}(X_1\in A_j), $$ and the limiting probabilities sum to \(1\).

Proof. By the frequency result, for each \(j\) there is an event \(E_j\) of probability one on which the frequency of \(A_j\) converges to \(\mathbb{P}(X_1\in A_j)\). The intersection \(E=\bigcap_{j=1}^{r}E_j\) has probability one: its complement is a finite union of probability-zero sets. On \(E\), all \(r\) limits hold. For every \(n\) and every observation \(X_k\), exactly one of the partition indicators is \(1\). Therefore $$ \sum_{j=1}^{r}\widehat{p}_n(A_j) =\frac{1}{n}\sum_{k=1}^{n}\sum_{j=1}^{r}\mathbf{1}_{\{X_k\in A_j\}} =\frac{1}{n}\sum_{k=1}^{n}1=1. $$ Taking the finite sum of the limits on \(E\) gives \(\sum_{j=1}^{r}\mathbb{P}(X_1\in A_j)=1\), as required. \(\square\)

Worked Applications

Worked Example: The Long-Run Proportion of Heads

Let \((X_n)_{n\ge1}\) record repeated independent coin tosses, with state space \(S=\{0,1\}\), where \(1\) denotes heads and \(0\) denotes tails. Suppose each toss has probability \(2/5\) of heads. Find the almost-sure limit of the fraction of heads.

Take \(A=\{1\}\). The indicator \(Y_k=\mathbf{1}_{\{X_k=1\}}\) has mean $$ \mathbb{E}[Y_k]=1\cdot\frac25+0\cdot\frac35=\frac25. $$ Its second moment is \(\mathbb{E}[Y_k^2]=1^2\cdot\frac25+0^2\cdot\frac35=\frac25\), so its variance is \(\frac25-(\frac25)^2=\frac25-\frac4{25}=\frac6{25}\), which is finite. The frequency theorem therefore gives $$ \frac{\#\{\text{heads in the first }n\text{ tosses}\}}{n} =\frac1n\sum_{k=1}^{n}Y_k \longrightarrow\frac25 \quad\text{almost surely}. $$

Check: The complementary tail indicator is \(1-Y_k\), so its frequency is \(1-\widehat{p}_n(A)\). Its limit is \(1-\frac25=\frac35\); the two limiting proportions sum to \(\frac25+\frac35=1\).

Worked Example: Average of Discrete Measurements

Suppose iid measurements \(X_1,X_2,\ldots\), with state space \(S=\{-1,2,5\}\), take values \(-1,2,5\) with respective probabilities \(1/4,1/2,1/4\). Find the almost-sure limit of their sample average.

First calculate the population mean: $$ \mathbb{E}[X_1]=(-1)\frac14+2\frac12+5\frac14 =-\frac14+1+\frac54=2. $$ The second moment is $$ \mathbb{E}[X_1^2]=(-1)^2\frac14+2^2\frac12+5^2\frac14 =\frac14+2+\frac{25}{4}=\frac{17}{2}. $$ Thus \(\operatorname{Var}(X_1)=\frac{17}{2}-2^2=\frac{17}{2}-4=\frac92\), which is finite. Applying the average part of the theorem yields $$ \frac{X_1+\cdots+X_n}{n}\longrightarrow 2 \quad\text{almost surely}. $$

Check: The probabilities sum to \(\frac14+\frac12+\frac14=1\). Also the computed variance is positive, and substituting the mean and second moment gives \(\frac{17}{2}-4=\frac92\). The strong-law limit is the population mean, not the second moment.

Worked Example: Proportions in Three Categories

A fair six-sided die is rolled independently on each trial. Use the partition \(A_1=\{1,2\}\), \(A_2=\{3,4\}\), \(A_3=\{5,6\}\) of the state space \(S=\{1,2,3,4,5,6\}\). Find the three limiting proportions.

Every outcome has probability \(1/6\), so $$ \mathbb{P}(X_1\in A_1)=\frac16+\frac16=\frac13,\quad \mathbb{P}(X_1\in A_2)=\frac16+\frac16=\frac13,\quad \mathbb{P}(X_1\in A_3)=\frac16+\frac16=\frac13. $$ The finite-partition result shows that, almost surely, all three observed proportions converge simultaneously to \(1/3\).

Check: Each category contains two outcomes, and the three categories contain all six outcomes without overlap. Their limiting proportions add to \(\frac13+\frac13+\frac13=1\), consistent with the fact that every roll belongs to exactly one category.

What the Limit Does—and Does Not—Say

An almost-sure limit is a statement about an infinite sequence of observations: with probability one, along that realized sequence, the empirical quantity approaches its stated value. It does not say that the frequency after a particular finite number of trials equals the probability, nor does it give a bound on the error at that sample size. A finite sample can have a proportion quite different from its limiting value. The strong law also does not assert that the proportion is exactly equal to its limit at any finite \(n\).

The independence assumption matters. Having the same marginal probability on every trial is not sufficient. For example, choose a single Bernoulli random variable \(Z\) with \(\mathbb{P}(Z=1)=\mathbb{P}(Z=0)=1/2\), and set \(X_n=Z\) for every \(n\). This is a sequence of dependent observations, each with probability \(1/2\) of being \(1\). But for every \(n\), $$ \frac1n\sum_{k=1}^{n}\mathbf{1}_{\{X_k=1\}} =\frac1n\sum_{k=1}^{n}Z=Z. $$ The frequency is therefore \(0\) with probability \(1/2\) and \(1\) with probability \(1/2\); it does not converge almost surely to \(1/2\). The repeated observations carry no new information after \(Z\) is chosen.

Common mistake. It is incorrect to say, “Each trial has probability \(1/2\) of success, so the observed proportion must be \(1/2\) in the first \(n\) trials.” That confuses the expected proportion with its realized value. For iid Bernoulli trials, linearity of expectation gives \(\mathbb{E}[\widehat{p}_n]=1/2\) at each \(n\), but this equality of expectations does not imply \(\widehat{p}_n=1/2\) for each sample. The strong law instead says that the sequence of proportions converges to \(1/2\) almost surely as \(n\) grows. In the dependent construction above, even that long-run conclusion fails.

For practical use, identify the quantity to average, check that its terms are iid, and verify the finite-variance condition when using the finite-variance strong law. For an event frequency, the terms are indicators and are automatically bounded; for a measurement average, the required moments must be checked for the measurements themselves. These steps distinguish a valid asymptotic conclusion from an unsupported claim about a finite sample or a dependent sequence.

Check Your Understanding

For each question, identify the random variables being averaged and state which strong-law application is relevant.

  1. If iid observations have probability \(3/10\) of belonging to a specified measurable set \(A\), what is the almost-sure limit of their empirical frequency in \(A\)?
  2. For iid measurements \(X_n\) with finite mean and finite variance, what is the limit of \(n^{-1}\sum_{k=1}^{n}(X_k-4)\)?
  3. Why can the limits for all cells of a finite partition be asserted simultaneously almost surely?
  4. In the dependent construction \(X_n=Z\) for all \(n\), what is the empirical frequency of the event \(\{X_n=1\}\), and why does it fail to converge almost surely to its marginal probability?
  5. Does the strong law imply that the empirical frequency equals its limit for every finite sample size? Explain the distinction.