In probability theory, the Borel-Cantelli lemma is a theorem about sequences of events. In a slightly more general form, it is also a result in measure theory.

Let (En) be a sequence of events in some probability space. The Borel-Cantelli Lemma states that

if the sum of the probabilities of the En is finite, then the probability that infinitely many of them occur is 0.

Note that no assumption of independence is required.

For example, suppose (Xn) is a sequence of random variables, with P(Xn = 0) = 1/n2 for each n. The sum of the P(Xn = 0) is finite (in fact it is π2/6 - 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, with probability 1, Xn is nonzero for all but finitely many n.

For general measure spaces, the Borel-Cantelli Lemma takes the following form:

Let μ be a measure on a set X, with σ-algebra F, and let (An) be a sequence in F. If
then μ(lim sup An) = 0.

To see that this really is a generalization of the version given earlier, recall that lim sup An consists of those elements which are in An for infinitely many values of n.

A similar result, sometimes called one of two "Borel-Cantelli" lemmas, says that if the events En are independent and the sum of their probabilities diverges to infinity, then the probability that infinitely many of them occur is 1. (The assumption of independence can be weakened to pairwise independence, but in that case the proof is more difficult.)