Finding Chernoff bounds maximum estimators I am currently trying to resolve the following exercise about Chernoff bounds:


*

*Let $X_{1}, X_{2}, \dots, X_{n}$ be independent, identically distributed (i.i.d) random variables with distribution $N(0,\sigma^{2})$. Show that for every $\varepsilon > 0$:
$$P(\overline{X_{n}} > \varepsilon) \le e^{\frac{-n\varepsilon^{2}}{2\sigma^{2}}}$$

*A random variable $X$ with $E(X) = 0$ is said to be Subgaussian for the parameter $\sigma > 0$ if its moment generating function $M_{x}(t)$ is such that $M_{x}(t) \le e^{\frac{t^{2}\sigma^{2}}{2}}$ for all $t \in \mathbb{R} $. Show that the inequality in the previous point holds if $X_{1}, X_{2}, \dots, X_{n}$ are i.i.d random variables, and Subgaussian for the parameter $\sigma > 0$
In the first point I know I am working with Chernoff bounds since the exercise already gives its upper tail, with $\mu = 0$, so I have something like:
$$P(\overline{X_{n}} > \varepsilon +  0) \le e^{-ng(t)}$$
Where $$g(t) = \varepsilon t - \log M_{X_{1}}(t)$$ Recalling that, in this case, $$M_{X_{1}}(t) = e^{\frac{t^{2}\sigma^{2}}{2}}$$ We have $$g(t) = \varepsilon t - \frac{t^{2}\sigma^{2}}{2}$$
Now here comes the problem. In order to discover my upper tail, I have to find a maximum estimator $t^{\star}$ so I can compute $g(t^{*})$. The solution of the exercise says $t^{\star} = \frac{\varepsilon}{\sigma^{2}}$, but I don't know why. So, what I ask is how I can find maximum estimators when it comes to this type of exercises.
About the second point, since I already have $g(t^{\star})$, how can this result will be useful to prove the inequality for all the Subgaussian. Wasn't this implicitly proved in the previous point? 
 A: In both cases, you can write
\begin{align*}
Pr(\overline X_n > \varepsilon) &= Pr(\overline X_n > \varepsilon)\\&=
Pr({e}^{\overline X_n} > {e}^{\varepsilon})\\ &=
Pr({e}^{t\overline X_n} > {e}^{t\varepsilon}),
\end{align*}
for $t>0.$ Then, apply Markovs inequality to get that
\begin{align*}
Pr({e}^{t\overline X_n} > {e}^{t\varepsilon}) \leq
\frac{\mathbb{E}({e}^{t\overline X_n})}
{{e}^{t\varepsilon}} = {e}^{-t\varepsilon}
\mathbb{E}({e}^{t\overline X_n}).
\end{align*}
In the case where each $X_i\sim N(0, \sigma^2),$ you have that $t\overline X_n\sim N(0, \frac{t^2\sigma^2}{n}),$ and therefore that ${e}^{t\overline X_n} \sim \text{lognormal}(0, t^2\sigma^2),$ so $$\mathbb{E}({e}^{t\overline X_n}) = {e}^{0 + \frac{t^2\sigma^2}{2n}} = {e}^{\frac{t^2\sigma^2}{2n}}.$$
For the second case, observe that
\begin{align*}
\mathbb{E}({e}^{t\overline X_n}) &= \mathbb{E}({e}^{\frac{t}{n}\sum_{i=1}^n X_i})\\ &=
\mathbb{E}\left(\prod_{i=1}^n{e}^{\frac{t}{n}X_i}\right)\\
&= \prod_{i=1}^n\mathbb{E}\left({e}^{\frac{t}{n}X_i}\right)\\&=
\prod_{i=1}^nM_{X_i}\left(\frac{t}{n}\right)\\&\leq
\prod_{i=1}^n{e}^{\frac{\frac{t^2}{n^2}\sigma^2}{2}} = 
{e}^{\frac{t^2\sigma^2}{2n^2}}.
\end{align*}
Thus, in both cases we get that
\begin{align*}
Pr(\overline X_n > \varepsilon) \leq {e}^{\frac{t^2\sigma^2}{2n} - t\varepsilon}.
\end{align*}
Setting $t = \frac{n\varepsilon}{\sigma^2},$ we get that 
\begin{align*}
Pr(\overline X_n > \varepsilon) \leq {e}^{\left(\frac{n\varepsilon}{\sigma^2}\right)^2\frac{\sigma^2}{2n} - \frac{n\varepsilon}{\sigma^2}\varepsilon} =
{e}^{\frac{n\varepsilon^2}{2\sigma^2} - \frac{n\varepsilon^2}{\sigma^2}}
= {e}^{-\frac{n\varepsilon^2}{2\sigma^2}}.
\end{align*}
