The Bernoulli bond percolation subgraph of a graph G at parameter p is a random subgraph obtained from G by deleting every edge of G with probability 1−p, independently. The infinite complete binary tree T is an infinite tree where one vertex (called the root) has two neighbors and every other vertex has three neighbors. The second moment method can be used to show that at every parameter p ∈ (1/2, 1] with positive probability the connected component of the root in the percolation subgraph of T is infinite.
Let K be the percolation component of the root, and let Tn be the set of vertices of T that are at distance n from the root. Let Xn be the number of vertices in Tn ∩ K.
To prove that K is infinite with positive probability, it is enough to show that
. Since the events
form a decreasing sequence, by continuity of probability measures this is equivalent to showing that
.
The Cauchy–Schwarz inequality gives
Therefore, it is sufficient to show that
that is, that the second moment is bounded from above by a constant times the first moment squared (and both are nonzero). In many applications of the second moment method, one is not able to calculate the moments precisely, but can nevertheless establish this inequality.
In this particular application, these moments can be calculated. For every specific v in Tn,
Since
, it follows that
which is the first moment. Now comes the second moment calculation.
For each pair v, u in Tn let w(v, u) denote the vertex in T that is farthest away from the root and lies on the simple path in T to each of the two vertices v and u, and let k(v, u) denote the distance from w to the root. In order for v, u to both be in K, it is necessary and sufficient for the three simple paths from w(v, u) to v, u and the root to be in K. Since the number of edges contained in the union of these three paths is 2n − k(v, u), we obtain
The number of pairs (v, u) such that k(v, u) = s is equal to
, for
and equal to
for
. Hence, for
,
so that
which completes the proof.
The choice of the random variable to which the moment method is applied often makes a difference. One example arises in the context of graph coloring. Here, letting Z denote the number of all q-colorings, one obtains an upper bound on the q-colorability threshold, which is not tight. Considering instead the number Zbal, namely the number of nearly-balanced colorings—i.e., those where each color class contains around n/q vertices—one obtains an improved threshold, which is tight.
- The choice of the random variables Xn was rather natural in this setup. In some more difficult applications of the method, some ingenuity might be required in order to choose the random variables Xn for which the argument can be carried through.
- The Paley–Zygmund inequality is sometimes used instead of the Cauchy–Schwarz inequality and may occasionally give more refined results.
- Under the (incorrect) assumption that the events v, u in K are always independent, one has
, and the second moment is equal to the first moment squared. The second moment method typically works in situations in which the corresponding events or random variables are “nearly independent".
- In this application, the random variables Xn are given as sums
In other applications, the corresponding useful random variables are integrals
where the functions fn are random. In such a situation, one considers the product measure μ × μ and calculates
where the last step is typically justified using Fubini's theorem.