I've learned Hoeffding'e inequality from Wikipedia, and to check if I understand correctly the formula, I refer to this lecture for exact example that I can solve. But why do I think I get a different result with this lecture?
The example in the lecture stated as follows:
Let us now use Hoeffding's inequality in our case study example of coin tosses. There each random variable is between $-1$ and 1 so we have that by Hoeffding's inequality: $$ \mathbb{P}(|\bar{X}-\mu| \geq t) \leq 2 \exp \left(-2 n t^{2}\right)\tag{1} $$
From Wikipedia, Hoeffding's inequality should be $$ \mathrm{P}(|\bar{X}-\mathrm{E}[\bar{X}]| \geq t) \leq 2 \exp \left(-\frac{2 n^{2} t^{2}}{\sum_{i=1}^{n}\left(b_{i}-a_{i}\right)^{2}}\right) \tag{2} $$ and $b_i,a_i$ stands for the domain of the random variable $X_i$. So in the example of the lecure, the domonator of eq.(2) I think should be $\sum_i^n2^2=4n$, so finally we get $\mathbb{P}(|\bar{X}-\mu| \geq t) \leq 2 \exp \left(- \frac{n t^{2}}{2}\right)$ insdead the eq.(1). So is the lecture wrong? Or I made some mistakes?