Let Z1,Z2,...,ZnZ_1, Z_2, ..., Z_n be i.i.d. copies of random variable ZZ on [0,1][0, 1]. Let

  1. μk≐1k∑i=1kZi\mu_k \doteq \frac{1}{k} \sum_{i = 1}^k Z_i for 1≤k≤n1 \le k \le n,

  2. μ=E[Z]\mu = \mathbb{E}[Z],

  3. MkM_k be the event such that

    Mk≐{μk+log⁡1δ2k≤μ}, M_k \doteq \left\{ \mu_k + \sqrt{ \frac{ \log \frac{1}{\delta} }{2 k} } \le \mu \right\},

    where 0<δ<10 < \delta < 1.

We are interested in bounding the probability of

Pr⁡[∪k=1nMk]. \Pr[ \cup_{k = 1}^n M_k ].

Hoeffding Inequality

We first prove a bound of

Pr⁡[∪k=1nMk]≤nδ \Pr[ \cup_{k = 1}^n M_k ] \le n \delta

by Hoeffding inequality.

Hoeffding Inequality. For a fixed integer ss, let Z1,Z2,...,ZsZ_1, Z_2, ..., Z_s be i.i.d. copies of a random variable ZZ on [0,1][0, 1]. For any r>0r > 0

Pr⁡[μ−μs≥r]≤exp⁡(−2sr2).  \Pr[ \mu - \mu_s \ge r] \le \exp(- 2 s r^2 ). \\ \

Applying Hoeffding inequality with s=ks = k, r=log⁡1δ2kr = \sqrt{ \frac{ \log \frac{1}{\delta} }{2 k} }, we get

Pr⁡[Mk]≤δ. \Pr[ M_k ] \le \delta.

By sub-additivity of probability,

Pr⁡[∪k=1nMk]≤∑k=1nPr⁡[Mk]=nδ. \Pr[ \cup_{k = 1}^n M_k ] \le \sum_{k = 1}^n \Pr[M_k] = n \delta.

To make the bound meaningful, we require that δ≤1n\delta \le \frac{1}{n}.

Beyond The Naive Union Bound

In this section, we avoid using union bound over nn events and improve the Pr⁡[∪k=1nMk]\Pr[ \cup_{k = 1}^n M_k ] to

Pr⁡[∪k=1nMk]≤(log⁡1αn+1)⋅δα, \Pr[ \cup_{k = 1}^n M_k ] \le ( \log_\frac{1}{\alpha} n + 1 ) \cdot \delta^\alpha,

where α\alpha is any real number that satisfies 0<α<10 < \alpha < 1.

As a sanity check, suppose δ=1n\delta = \frac{1}{n} and α=12\alpha = \frac{1}{2}. The two bounds we have are

  1. Pr⁡[∪k=1nMk]≤nδ=1, \Pr[ \cup_{k = 1}^n M_k ] \le n \delta = 1,

    which is trivial.

  2. (log⁡1αn+1)⋅δα=(log⁡2n+1)⋅1n \begin{aligned} ( \log_\frac{1}{\alpha} n + 1 ) \cdot \delta^\alpha &= (\log_2 n + 1) \cdot {1 \over \sqrt n} \end{aligned}

The proof relies on a strengthened version of Hoeffding inequality.

Fact [1]. For a fixed integer ss, let Z1,Z2,...,ZsZ_1, Z_2, ..., Z_s be i.i.d. copies of a random variable ZZ on [0,1][0, 1]. For any r>0r > 0

Pr⁡[∃t≤s:t⋅μ−t⋅μt≥r]≤exp⁡(−2r2s).  \Pr[ \exists t \le s : \quad t \cdot \mu - t \cdot \mu_t \ge r] \le \exp(- \frac{2 r^2}{s} ). \\ \

Proof. We divide the MkM_k's into ⌊log⁡1αn⌋+1\lfloor \log_\frac{1}{\alpha} n \rfloor + 1 groups. For integer 0≤j≤⌊log⁡1αn⌋0 \le j \le \lfloor \log_\frac{1}{\alpha} n \rfloor, define

Bj≐∪n⋅αj+1<k≤n⋅αjMk={∃n⋅αj+1<k≤n⋅αj,μk+log⁡1δ2k≤μ}={∃n⋅αj+1<k≤n⋅αj,k⋅μk+klog⁡1δ2≤k⋅μ}⊂{∃n⋅αj+1<k≤n⋅αj,k⋅μk+n⋅αj+1log⁡1δ2≤k⋅μ} \begin{aligned} B_j &\doteq \cup_{n \cdot \alpha^{j + 1} < k \le n \cdot \alpha^j } M_k \\ &= \left\{ \exists \quad n \cdot \alpha^{j + 1} < k \le n \cdot \alpha^j, \mu_k + \sqrt{ \frac{ \log \frac{1}{\delta} }{2 k} } \le \mu \right\} \\ &= \left\{ \exists \quad n \cdot \alpha^{j + 1} < k \le n \cdot \alpha^j, k \cdot \mu_k + \sqrt{ \frac{ k \log \frac{1}{\delta} }{2} } \le k \cdot \mu \right\} \\ &\subset \left\{ \exists \quad n \cdot \alpha^{j + 1} < k \le n \cdot \alpha^j, k \cdot \mu_k + \sqrt{ \frac{ n \cdot \alpha^{j + 1} \log \frac{1}{\delta} }{2} } \le k \cdot \mu \right\} \\ \end{aligned}

Applying Fact [1] with s=⌊n⋅αj⌋<n⋅αjs = \lfloor n \cdot \alpha^j \rfloor < n \cdot \alpha^j, r=n⋅αj+1log⁡1δ2r = \sqrt{ \frac{ n \cdot \alpha^{j + 1} \log \frac{1}{\delta} }{2 } }, and by monotonicity of probability, we get

Pr⁡[Bj]≤exp⁡(−n⋅αj+1log⁡1δ22n⋅αj)=δα. \Pr[B_j] \le \exp( - \frac{ n \cdot \alpha^{j + 1} \log \frac{1}{\delta} }{2} \frac{ 2 }{ n \cdot \alpha^j } ) = \delta^{ \alpha }.

Summing over all possible values of jj, we get

Pr⁡[∪j=0⌊log⁡1αn⌋Bj]≤∑j=0⌊log⁡1αn⌋Pr⁡[Bj]≤(log⁡1αn+1)⋅δα. \Pr[ \cup_{j = 0}^{ \lfloor \log_\frac{1}{\alpha} n \rfloor } B_j] \le \sum_{j = 0}^{ \lfloor \log_\frac{1}{\alpha} n \rfloor } \Pr[B_j] \le( \log_\frac{1}{\alpha} n + 1 ) \cdot \delta^\alpha.

Remark: The first inequality still follows from union bound. However the number of events is now bounded by log⁡1αn+1\log_\frac{1}{\alpha} n + 1 instead of nn. This comes with a cost of increasing δ\delta to δα\delta^\alpha.

Reference

[1] S. Lattimore, “Bandit Algorithms,”
[2] S. Bubeck, “Bandits Games and Clustering Foundations,”