# Hoeffding's inequality implementation wrong?

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?

I think, in the lecture, they have used as the values for the coin tosses the pair $$\{0, 1\}$$ instead of the claimed pair $$\{-1, 1\}$$.
Using $$\{0, 1\}$$, we have: \begin{align} 2 \exp \left(-\frac{2 n^{2} t^{2}}{\sum_{i=1}^{n}\left(b_{i}-a_{i}\right)^{2}}\right) &= 2 \exp \left(-\frac{2 n^{2} t^{2}}{n}\right)\\ &= 2 \exp(-2nt^2). \end{align}