% Lecture 13 2023-05
%The difficult part is to show \autoref{levycontinuity}.
%This is the last lecture, where we will deal with independent random variables.

We have seen, that
if $X_1, X_2,\ldots$ are i.i.d.~with $ \mu = \bE[X_1]$,
    $\sigma^2 = \Var(X_1)$,
    then $\frac{\sum_{i=1}^{n} (X_i - \mu)}{\sigma \sqrt{n} } \xrightarrow{(d)} \cN(0,1)$.

\begin{question}
    What happens if $X_1, X_2,\ldots$ are independent, but not identically distributed? Do we still have a CLT?
\end{question}

\begin{theorem}[Lindeberg CLT]
    \label{lindebergclt}
    Assume $X_1, X_2, \ldots,$ are independent (but not necessarily identically distributed) with $\mu_i = \bE[X_i] < \infty$ and $\sigma_i^2 = \Var(X_i) < \infty$.
    Let $S_n = \sqrt{\sum_{i=1}^{n} \sigma_i^2}$
    and assume that $\lim_{n \to \infty} \frac{1}{S_n^2} \bE\left[(X_i - \mu_i)^2 \One_{|X_i - \mu_i| > \epsilon \S_n}\right] = 0$ for all $\epsilon > 0$
    (\vocab{Lindeberg condition}, ``The truncated variance is negligible compared to the variance.'').

    Then the CLT holds, i.e.~
    \[
    \frac{\sum_{i=1}^n (X_i - \mu_i)}{S_n} \xrightarrow{(d)}  \cN(0,1).
    \] 
\end{theorem}

\begin{theorem}[Lyapunov condition]
    \label{lyapunovclt}
    Let $X_1, X_2,\ldots$ be independent, $\mu_i = \bE[X_i] < \infty$,
    $\sigma_i^2 = \Var(X_i) < \infty$
    and $S_n \coloneqq  \sqrt{\sum_{i=1}^n \sigma_i^2}$.
    Then, assume that, for some $\delta > 0$,
    \[
    \lim_{n \to \infty} \sum_{i=1}^{n} \bE[(X_i - \mu_i)^{2 + \delta}] = 0
    \] 
    (\vocab{Lyapunov condition}).
    Then the CLT holds.
\end{theorem}
\begin{remark}
    The Lyapunov condition implies the Lindeberg condition.
    (Exercise).
\end{remark}
We will not prove the \autoref{linebergclt} or \autoref{lyapunovclt}
in this lecture. However, they are quite important.

We will now sketch the proof of \autoref{levycontinuity},
details can be found in the notes.\todo{Complete this}
A generalized version of \autoref{levycontinuity} is the following:
\begin{theorem}[A generalized version of Levy's continuity \autoref{levycontinuity}]
    \label{genlevycontinuity}
    Suppose we have random variables $(X_n)_n$ such that
    $\bE[e^{\i t X_n}] \xrightarrow{n \to \infty}  \phi(t)$ for all $t \in \R$
    for some function $\phi$ on $\R$.
    Then the following are equivalent:
    \begin{enumerate}[(a)]
        \item The distribution of $X_n$ is \vocab[Distribution!tight]{tight} (dt. ``straff''),
            i.e.~$\lim_{a \to \infty} \sup_{n \in \N} \bP[|X_n| > a] = 0$.
        \item $X_n \xrightarrow{(d)} X$ for some real-valued random variable $X$.
        \item  $\phi$ is the characteristic function of $X$.
        \item $\phi$ is continuous on all of $\R$.
        \item $\phi$ is continuous at $0$.
    \end{enumerate}
\end{theorem}
\begin{example}
    Let $Z \sim \cN(0,1)$ and $X_n \coloneqq  n Z$.
    We have $\phi_{X_n}(t) = \bE[[e^{\i t X_n}] = e^{-\frac{1}{2} t^2 n^2} \xrightarrow{n \to \infty} \One_{\{t = 0\} }$.
    $\One_{\{t = 0\}}$ is not continuous at $0$.
    By \autoref{genlevycontinuity}, $X_n$ can not converge to a real-valued
    random variable.

    Exercise: $X_n \xrightarrow{(d)} \overline{X}$,
    where $\bP[\overline{X} = \infty] = \frac{1}{2} = \bP[\overline{X} = -\infty]$.

    Similar examples are $\mu_n \coloneqq  \delta_n$ and
    $\mu_n \coloneqq  \frac{1}{2} \delta_n + \frac{1}{2} \delta_{-n}$.
\end{example}

\begin{example}
    Suppose that $X_1, X_2,\ldots$ are i.d.d.~with $\bE[X_1] = 0$.
    Let $\sigma^2 \coloneqq  \Var(X_i)$.
    Then the distribution of $\frac{S_n}{\sigma \sqrt{n}}$ is tight:

    \begin{IEEEeqnarray*}{rCl}
    \bE\left[ \left( \frac{S_n}{\sqrt{n} }^2 \right)^2 \right] &=&
        \frac{1}{n} \bE[ (X_1+ \ldots + X_n)^2]\\
                                                          &=& \sigma^2
    \end{IEEEeqnarray*}
    For $a > 0$, by Chebyshev's inequality, % TODO
    we have
    \[
    \bP\left[ \left| \frac{S_n}{\sqrt{n}} \right| > a \right] \leq \frac{\sigma^2}{a^2} \xrightarrow{a \to \infty} 0.
    \]
    verifying \autoref{genlevycontinuity}.
\end{example}

\begin{example}
    Suppose $C$ is a random variable which is Cauchy distributed, i.e.~$C$
    has probability distribution $f_C(x) = \frac{1}{\pi} \frac{1}{1 + x^2}$.

    We know that $\bE[|C|] = \infty$.

    We have $\phi_C(t) = \bE[e^{\i t C}] = e^{-|t|}$.
    Suppose $C_1, C_2, \ldots, C_n$ are i.i.d.~Cauchy distributed
    and let $S_n \coloneqq  C_1 + \ldots + C_n$.

    Exercise: $\phi_{S_n}(t) = e^{-|t|} = \phi_{C_1}(t)$, thus $S_n \sim  C$.
\end{example}


