Gaussian averages, Bernoulli averages, and Gibbs' measures

We prove a new comparison principle between the expected value of the supremum of a family of r.v. of the type Σi ≤ N giai, where (gi) are i.i.d. standard gaussian, and the expected value of the supremum of the same family when the r.v. gi are replaced by Bernoulli r.v. ηi, P(ηi = ± 1) = 1/2. The main idea is to approximate the supremum by a weighted average, an idea well known in the theory of spin glasses.