Summable and harmonic event probabilities (source code)

= Summable and harmonic event probabilities

Take <independent random variables> $U_n$, each with the <continuous uniform distribution> on $[0,1]$, and set $A_n=\{U_n\leq p_n\}$. Then $\mathbb P(A_n)=p_n$, and the <events> are mutually <independent events>. The <product probability space> supplies a model for the entire infinite sequence; a finite list of simulated values is only an illustration.

For $p_n=1/(n+1)^2$, the <p-series> is <summable>:
$$
\sum_{n=1}^{\infty}p_n=\frac{\pi^2}{6}-1,\qquad
\sum_{n=m}^{\infty}p_n\leq\int_m^{\infty}\frac{dx}{x^2}=\frac1m.
$$
The <Basel problem> supplies the total sum, and the <integral test for convergence> gives the displayed tail bound. The <First Borel-Cantelli lemma> makes the <limsup of events> have <probability> zero. In fact, the tail bound implies that the <probability> of even one alarm at or after $m$ is at most $1/m$; for $m=100$, it is at most $0.01$. This bound remains valid for dependent <events> with the same individual <probabilities>.

For $p_n=1/(n+1)$, the <harmonic series> diverges, so the <Second Borel-Cantelli lemma> makes the <limsup of events> have <probability> one. There is also an exact finite-horizon calculation using <independent events>:
$$
\mathbb P\left(\bigcap_{n=m}^{M}A_n^c\right)
=\prod_{n=m}^{M}\frac{n}{n+1}=\frac{m}{M+1}.
$$
For any fixed $m$, this finite <product of numbers> tends to zero as $M\to\infty$. Every infinite tail therefore contains an alarm <almost surely>, even though the individual <probabilities> tend to zero.

\Image[/borel-cantelli-series-and-tail-probabilities.png]
{title=Summable and harmonic probabilities: partial sums and the probability of a later event}
{description=The left panel shows finite <partial sums>. On the right, the blue curve is the infinite tail of the squared-reciprocal <p-series>, bounding the <probability> of a later <event> by the <union bound>; the gray curve is its $1/m$ upper bound. For harmonic <probabilities>, mutually <independent events> have a later occurrence with <probability> one, while the <shared-uniform counterexample to the second Borel-Cantelli lemma> has tail <probability> $1/(m+1)$. The infinite claims follow from the calculations, not from the finite plotted range.}