\lecture{12}{2023-05-16}{Proof of the CLT}

We now want to prove \autoref{clt}.
The plan is to do the following:
\begin{enumerate}[1.]
    \item Identify the characteristic function of a standard normal
    \item Show that the characteristic functions of the $V_n$ converge pointwise
        to that of $\cN$.
    \item Apply  \autoref{levycontinuity}
\end{enumerate}

First, we need to prove some properties of characteristic functions.

\begin{lemma}
    \label{charfprops}
    For every real random variable $X$, we have
    \begin{enumerate}[(i)]
        \item $\phi_X(0) = 1$ and $|\phi_X(t)| \le  1$ for all $t \in \R$.
        \item $\phi_X$ is uniformly continuous.
        \item If $\bE[|X|^n] < \infty$ for any $n \in \N$, then $\phi_X$ i
            $n$-times continuously differentiable
            and $\bE[X^n] = (-\i)^n \phi_X^{(n)}(0)$.
        \item For independent random variables $X$ and $Y$, we have
            \[
            \phi_{X + Y}(t) = \phi_X(t) \cdot  \phi_Y(t).
            \]
    \end{enumerate}
\end{lemma}
\begin{refproof}{charfprops}
    \begin{enumerate}[(i)]
        \item $\phi_X(0) = \bE[e^{\i 0 X}] = \bE[1] = 1$.
            For $t \in \R$, we have $|\phi_X(t)| = |\bE[e^{\i t X}]| \overset{\text{Jensen}}{\le} \bE|e^{\i t X}|] = 1$.

        \item Let $t, h \in \R$.
            Then
            \begin{IEEEeqnarray*}{rCl}
                |\phi_X(t+h) - \phi_X(t)| &=& |\bE[e^{\i (t+h) X} - e^{\i t X}]|\\
                                          &=& |\bE[e^{\i t X} (e^{\i h X} - 1)]|\\
                                          &\overset{\text{Jensen}}{\le}&
                                          \bE[|e^{\i t X}| \cdot  |e^{\i h X} -1|]\\
                                          &=& \bE[|e^{\i h X} - 1|]\\
            \end{IEEEeqnarray*}

            Hence $\sup_{t \in \R} |\phi_X(t + h) - \phi_X(t) | \le  g(h)$.
            We show that $\lim_{h \to 0} g(h) = 0$.

            For all $\omega \in \Omega$, we realize
            \[
            \lim_{h \to 0} |e^{\i h X(\omega)}- 1| = 0.
            \]
            Thus $|e^{\i h X} - 1| \xrightarrow{h \to 0} 0$ almost surely.
            Since also for all $h \in \R$  we have $|e^{\i h X} - 1| \le 2$,
            it follow that $|e^{\i h X} - 1|$ is dominated for all $h \in \R$.
            Thus, we can apply the dominated convergence theorem % TODO REF
            and obtain
            \[
            \lim_{h \to 0} g(h) = \lim_{h \to 0}  \bE[|e^{\i h X} - 1|]
            = \bE[\lim_{h \to 0} |e^{\i h X} - 1|] = 0.
            \]
            It follows that
            \[
            \lim_{n \to 0} \sup_{t \in \R} | \phi_X(t + h) - \phi_X(t)| = 0,
            \]
            which means that $\phi_X$ is uniformly continuous.
        \item
            \begin{claim}
                \label{charfprop:c1}
                For $y \in \R$, we have $|e^{\i y} - 1| \le  |y|$.
            \end{claim}
            \begin{subproof}
                For $y \ge 0$, we have
                \begin{IEEEeqnarray*}{rCl}
                    |e^{\i y} - 1| &=& |\int_0^y \cos(s) \dif s + \i \int_0^y \sin(s) \dif s|\\
                                   &=& |\int_0^y e^{\i s} \dif s|\\
                                   &\overset{\text{Jensen}}{\le}& \int_0^y |e^{\i s}| ds = y.
                \end{IEEEeqnarray*}
                For $y < 0$, we have $|e^{\i y} - 1| = |e^{-\i y} - 1|$
                and we can apply the above to  $-y$.
            \end{subproof}

            First, we look at $n = 1$. Then $\bE[|X|] < \infty$.
            Consider
            \[
            \frac{\phi_X(t + h) - \phi_X(t)}{h} = \bE\left[e^{\i t X} \frac{e^{\i h X} - 1}{h}\right].
            \]
            We have $e^z = \sum_{n = 0}^\infty \frac{z^k}{n!}$.
            Hence
            \begin{IEEEeqnarray*}{rCl}
                \lim_{n \to \infty} e^{\i t X} \left( \frac{1 + \i h X + \frac{(\i h X)^2}{2} + o(h^2) - 1}{h} \right)
                &=& e^{\i t X} \i X \text{ almost surely.}
            \end{IEEEeqnarray*}

            For arbitrary $h \in \R$, we have
            \begin{IEEEeqnarray*}{rCl}
                |e^{\i t X} \frac{e^{\i h X}}{h}| &\le & \left| \frac{1}{h} \left( e^{\i h X} - 1 \right)\right|\\
                                                  &\overset{\text{\autoref{charfprop:c1}}}{\le }& \left|\frac{1}{h} \i h X\right| = |X|.
            \end{IEEEeqnarray*}
            Thus the dominated convergence theorem can be applied and we obtain
            \[
            \lim_{h \to 0} \frac{\phi_X(t + h) - \phi_X(t)}{h} = \lim_{h \to 0} \bE\left[ e^{\i t X} \left( \frac{e^{\i h X}-1}{h} \right) \right]
            = \bE[e^{\i t X} \i X].
            \]

            It follows that $\phi_X$ is differentiable and $\phi_X(t) = \bE[e^{\i t X} \i X]$.
            For $t = 0$ we get $\phi'_X(0) = \i \bE[X]$, i.e.~
            -$\i \phi'_X(0) = \bE[X]$.

            Adapting the proof of (ii) gives that
            $\phi'_X(t)$ is continuous.

            Adapting the proof of (iii) gives
            the statement for arbitrary $n \in  \N$.

        \item Easy exercise.
    \end{enumerate}
\end{refproof}

\begin{lemma}\label{lec12_2} % Lemma 2
    For $X \sim  \cN(0,1)$, we have $\phi_X(t) = e^{-\frac{t^2}{2}}$
    for all $t \in \R$.
\end{lemma}
\begin{refproof}{lec12_2}
    We have
    \begin{IEEEeqnarray*}{rCl}
        \phi_X(t) &=& \frac{1}{\sqrt{2 \pi} } \int_{-\infty}^\infty e^{\i t x} e^{-\frac{x^2}{2}} \dif x\\
                  &=& \frac{1}{\sqrt{2 \pi} } \int_{-\infty}^\infty (\cos(tx) + \i \sin(tx)) e^{-\frac{x^2}{2}} \dif x\\
                  &=& \frac{1}{\sqrt{2 \pi} } \int_{-\infty}^\infty \cos(t x) e^{-\frac{x^2}{2}} \dif x,\\
    \end{IEEEeqnarray*}
    since, as $x \mapsto \sin(tx)$ is odd and $x \mapsto e^{-\frac{x^2}{2}}$
    is even, their product is odd, wich gives that the integral is $0$.

    \begin{IEEEeqnarray*}{rCl}
        \phi'_X(t) &=& \bE[\i X e^{\i t X}] \\
        &=& \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^\infty \i x \left( \cos(t x) + \i \sin(tx) \right) e^{-\frac{x^2}{2}} \dif x\\
        &=& \frac{1}{\sqrt{2 \pi}} \left( \i \int_{-\infty}^\infty x \cos(tx) \right) e^{-\frac{x^2}{2}} \dif x\\
        &=& \frac{1}{\sqrt{2 \pi} } \left(\underbrace{\i \int_{-\infty}^\infty x \cos(tx) e^{-\frac{x^2}{2}}  \dif x}_{= 0} + \int_{-\infty}^\infty - \sin(t x) e^{-\frac{x^2}{2}} \dif x\right)\\
        &=& \int_{-\infty}^\infty \underbrace{\sin(tx)}_{y(x)} \underbrace{ \frac{1}{\sqrt{2 \pi} }(-x) e^{\i\frac{x^2}{2}}}_{f'(x)} \dif x\\
        &=& \underbrace{[ \sin(tx) \frac{1}{\sqrt{2 \pi}  e^{-\frac{x^2}{2}}}]_{x=-\infty}^\infty}_{=0}
        - \int_{-\infty}^\infty t \cos(tx) \frac{1}{\sqrt{2 \pi} } e^{-\frac{x^2}{2}} \dif x\\
        &=& -t \phi_X(t)
    \end{IEEEeqnarray*}
    Thus, for all $t \in \R$
    \[
        (\log(\phi_X(t))' = \frac{\phi'_X(t)}{\phi_X(t)} = -t.
    \]
    Hence there exists $c \in \R$, such that
    \[
    \log(\phi_X(t)) = -\frac{t^2}{2} + c.
    \]
    Since $\phi_X(0) = 1$, we obtain $c = 0$.
    Thus
    \[
    \phi_X(t) = e^{-\frac{t^2}{2}}.
    \]
\end{refproof}


Now, we can finally prove the CLT:
\begin{refproof}{clt}
    Let $X_1,X_2,\ldots$ be i.i.d.~random variables
    with $\bE[X_1] = \mu_1$, $\Var(X_1) = \sigma^2$.

    Let
    \[
    Y_i \coloneqq \frac{X_i - \mu}{\sigma}
    \]
    i.e.~we normalize to $\bE[Y_1] = 0$ and $\Var(Y_1) = 1$.
    We need to show that
    \[
    V_n \coloneqq \frac{S_n - n \mu}{ \sigma \sqrt{n}} = \frac{Y_1+ \ldots + Y_n}{\sqrt{n}} \xrightarrow{\omega, n\to \infty}  \cN(0,1) % TODO
    \]
    Let $t \in \R$.
    Then
    \begin{IEEEeqnarray*}{rCl}
        \phi_{V_n}(t) &=& \bE[e^{\i t Y_n}]\\
                      &=& \bE[e^{\i t \left( \frac{Y_1 + \ldots + Y_n}{\sqrt{n} } \right) }] \\
    &=& \bE\left[e^{\i t \frac{Y_1}{\sqrt{n}}}\right] \cdot  \ldots \cdot  \bE\left[e^{\i t \frac{Y_n}{\sqrt{n} }}\right]\\
    &=& \left( \phi\left(\frac{t}{\sqrt{n} }\right) \right)^n.
    \end{IEEEeqnarray*}
    where $\phi(t) \coloneqq  \phi_{Y_1}(t)$.

    We have
    \begin{IEEEeqnarray*}{rCl}
        \phi(s) &=& \phi(0) + \phi'(0) s + \frac{\phi''(0)}{2} s^2 + o(s^2), \text{ as $s \to 0$}\\
                &=& 1 - \underbrace{\i \bE[Y_1] s}_{=0}
                - \bE[Y_1^2] \frac{s^2}{2} + o(s^2), \text{ as $s \to 0$}
\\
                &=& 1 - \frac{s^2}{2} + o(s^2), \text{ as $s \to 0$}
    \end{IEEEeqnarray*}

    Setting $s \coloneqq  \frac{t}{\sqrt{n}}$ we obtain
    \[
    \phi\left(\frac{t}{ \sqrt{n} }\right) = 1 - \frac{t^2}{2n} + o\left( \frac{t^2}{n} \right) \text{ as $n \to  \infty$}
    \]


    \[
    \phi_{V_n}(t) = \left( \phi\left( \frac{t}{\sqrt{n} } \right) \right)^n =
    1 - \frac{t^2}{2 n } + o\left( \frac{t^2}{n} \right)^n \xrightarrow{n \to \infty} e^{-\frac{t^2}{2}},
    \]
    where we have used the following:

    \begin{claim}
    For a sequence $a_n, n\in \N$ with $\lim_{n \to \infty} n a_n = \lambda$,
    it holds that $\lim_{n \to \infty} (1 + a_n)^n = e^{\lambda}$.
    \end{claim}


    We have shown that
    \[
    \phi_n(t) \xrightarrow{n \to \infty} e^{-\frac{t^2}{2}} = \phi_N(t).
    \]
    Using \autoref{levycontinuity}, we obtain \autoref{clt}.
\end{refproof}

\begin{remark}
    If $X: \Omega \to \R^d$ with distribution $\nu$,
    we define
    \begin{IEEEeqnarray*}{rCl}
        \phi_X: \R^d &\longrightarrow & \C \\
        t &\longmapsto & \bE[e^{\i \langle t , X\rangle}]
    \end{IEEEeqnarray*}
    where $\langle t, X\rangle \coloneqq \sum_{i = 1}^d t_i X_i$.
\end{remark}
Exercise: Find out, which properties also hold for $d > 1$.
