Let (En) be a sequence of events in some probability space. The Borel-Cantelli lemma states:
For example, suppose (Xn) is a sequence of random variables, with Pr(Xn = 0) = 1/n2 for each n. The sum of Pr(Xn = 0) is finite (in fact it is - see Riemann zeta function), so the Borel-Cantelli Lemma says that the probability of Xn = 0 occurring for infinitely many n is 0. In other words Xn is nonzero almost surely for all but finitely many n.
For general measure spaces, the Borel-Cantelli lemma takes the following form:
A related result, sometimes called the second Borel-Cantelli lemma, is a partial converse of the first Borel-Cantelli lemma. It says:
The assumption of independence can be weakened to pairwise independence, but in that case the proof is more difficult.
The infinite monkey theorem is a special case of this lemma.
then there is a sequence Fj of translates
apart from a set of measure zero.
Another related result is the so-called counterpart of the Borel-Cantelli lemma. It is a counterpart of the Lemma in the sense that it gives a necessary and sufficient condition for the limsup to be 1 by replacing the independence assumption by the completely different assumption that is monotone increasing for sufficiently large indices. This Lemma says:
Let be such that , and let denote the complement of .
Then the probability of infinitely many occur (that is, at least one occurs) is one if and only if there exists a strictly increasing sequence of positive integers such that
This simple result can be useful in problems such as for instance those involving hitting probabilities for stochastic process with the choice of the sequence usually being the essence.