Let and . The Lipschitz continuity of cosine and the Cauchy-Schwarz inequality imply
The centered expectation term contributes ; omitting it would leave the Lipschitz bound incomplete. In particular has continuous sample paths on the compact cube, so its maximum exists and is measurable.
Put
Choose a Cartesian finite net whose coordinate spacings are at most , including the endpoints. Every point of the cube is within Euclidean norm distance of , and
On the event , replacing any by a nearby grid point changes by at most . Since and , this is less than . Therefore
The Markov inequality bounds the first event by . At a fixed , the summands are centered, independent and identically distributed, and have absolute value at most . The supplied Hoeffding inequality, with , bounds each grid event by
A union bound now gives
The choice of balances the cost of a large random Lipschitz constant against the covering number of the cube: . Consequently works, with
This uses only the first moment and has a constant independent of . The finite net is deterministic even though the Lipschitz constant is random.
Suppose with a random finite . On , a finite net with radius bounds the full supremum by the grid maximum plus . The Markov inequality controls the exceptional event using , and a union bound controls the grid maximum. Choosing the net spacing balances these two costs.