First moment method (source code)

= First moment method

The <first moment method> uses the <expected value> of a count to control whether any counted occurrence exists. For a <random variable> $N$ taking nonnegative <integer> values, <Markov's inequality> gives
$$
\mathbb P(N\geq1)\leq\mathbb EN.
$$
Consequently, $\mathbb EN<1$ implies $\mathbb P(N=0)\geq1-\mathbb EN>0$, proving that an outcome with no counted occurrence exists. For a sequence of such counts, $\mathbb EN\to0$ shows that $N=0$ with <probability> tending to one. The <first moment method> uses information about the average count, while the complementary <second moment method> also uses its <variance>.