(Berstein inequality).
Let X1,...,Xn be random variables with range [0,1] and
t=1∑nVar[Xt∣Xt−1,...,X1]=σ2Let Sn=X1+...+Xn. Then for all a≥0
Pr[Sn≥E[Sn]+an]≤exp(−σ2+na/2n2a2/2)Suppose we would like to calculate the confidence interval with probability δ, then we need to solve the following equation:
exp(−σ2+na/2n2a2/2)=δAfter transformation, we get
n2a2−nalnδ1−2σ2lnδ1=0Therefore,
a=2n2nlnδ1+n2ln2δ1+8σ2n2lnδ1=2nlnδ1+ln2δ1+8σ2lnδ1But
ln2δ1+8σ2lnδ1≤ln2δ1+8σ2lnδ1=lnδ1+2σ2lnδ1It follows that
a=nlnδ1+nσ2lnδ1Corollary: If X1,...,Xn are i.i.d. random variables and
t=1∑nVar[Xt∣Xt−1,...,X1]=nVar[X1]Then
a=nlnδ1+n2Var[X1]lnδ1