Skip to main content
1 of 4
Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229

Actually, Bernstein's inequality does not really require boundedness of the i.i.d. random summands; a finite exponential moment of the absolute value of a random summand will suffice. However, here we can just use Markov's inequality.

Let $X,X_1,\dots,X_n$ be independent identically distributed random variables (i.i.d. r.v.'s) such that $P(X=z)=\mu(z)\in(0,1)$ for all $z$ in a finite set $Z$, with $\sum_z\mu(z)=1$. Let $Y:=-\ln\mu(X)$, $Y_i:=-\ln\mu(X_i)$, and $S_n:=\frac1n\,\sum_1^n Y_i$. Then $$ES_n=EY=-\sum_z\mu(z)\ln\mu(z)=:H(\mu)>0 $$ and $$Ee^{hY}=\sum_z\mu(z)^{1-h},\quad Ee^{hS_n}=(Ee^{hY/n})^n \tag{1} $$ for all real $h$. Note also that $$-\max_z\ln\mu(z)=\min Y<EY=H(\mu)<\max Y=-\min_z\ln\mu(z).$$

Take now any real $t$ such that $H(\mu)=EY\le t\le \max Y$. For all real $h\ge0$, by Markov's inequality, $$P(S_n\ge t)\le\exp\{-ht+\ln Ee^{hS_n}\}=\exp\{-ht+n\ln Ee^{hY/n}\}. $$ The derivative of the exponent $-ht+n\ln Ee^{hY/n}$ in $h$ is $-t+\frac{EYe^{hY/n}}{Ee^{hY/n}}$, which strictly and continuously increases from $-t+EY\le 0$ to $-t+\max Y\ge0$ as $h$ increases from $0$ to $\infty$, and so, the exponent $-ht+n\ln Ee^{hY/n}$ is minimized when $h=h_{t,+}$ is the only nonnegative root of the equation $$\frac{EYe^{hY/n}}{Ee^{hY/n}}=t. \tag{2} $$

Similarly, for any real $t$ such that $H(\mu)=EY\ge t\ge\min Y$, the best upper exponential bound on the left-tail probability $P(S_n\le t)$ is $\exp\{-ht+n\ln Ee^{hY/n}\}$, where now $h=h_{t,-}$ is the only non-positive root of the equation $(2)$.

In view of $(1)$, equation $(2)$ can be rewritten as $$\sum_z(t+\ln\mu(z))\mu(z)^{1-h/n}=0, $$ and it can be easily solved numerically if the set $Z$ is not too large.

Iosif Pinelis
  • 127.9k
  • 8
  • 107
  • 229