\lecture{5}{2023-04-21}{Laws of large numbers}
\subsection{The Laws of Large Numbers}


We want to show laws of large numbers:
The LHS is random and represents ``sane'' averaging.
The RHS is constant, which we can explicitly compute from the distribution of the RHS.

We fix a probability space $(\Omega, \cF, \bP)$ once and for all.

\begin{theorem}
    \label{lln}
    Let $X_1, X_2,\ldots$ be i.i.d.~random variables on $(\R, \cB(\R))$
    and $m = \bE[X_i] < \infty$
    and $\sigma^{2} = \Var(X_i) = \bE[ (X_i - \bE(X_i))^2] = \bE[X_i^2] - \bE[X_i]^2 < \infty$.

    Then
    \begin{enumerate}[(a)]
        \item $\frac{X_1 + \ldots + X_n}{n} \xrightarrow{n \to  \infty} m$
            in probability (\vocab{weak law of large numbers}, WLLN),
        \item $\frac{X_1 + \ldots + X_n}{n} \xrightarrow{n \to \infty} m$
            almost surely (\vocab{strong law of large numbers}, SLLN).
    \end{enumerate}
\end{theorem}
\begin{refproof}{lln}
    \begin{enumerate}[(a)]
        \item Given $\epsilon > 0$, we need to show that
            \[
            \bP\left[ \left| \frac{X_1 + \ldots + X_n}{n}\right| > \epsilon\right] \to  0 \]
            as $n \to 0$.

            Let $S_n \coloneqq  X_1 + \ldots + X_n$.
            Then $\bE[S_n] = \bE[X_1] + \ldots + \bE[X_n] = nm$.
            We have
            \begin{IEEEeqnarray*}{rCl}
                \bP\left[ \left| \frac{X_1 + \ldots + X_n}{n}\right| > \epsilon\right] &=& \bP\left[\left|\frac{S_n}{n}-m\right| > \epsilon\right]\\
                                                                                       &\overset{\text{Chebyshev}}{\le }& \frac{\Var\left( \frac{S_n}{n} \right) }{\epsilon^2} = \frac{1}{n} \frac{\Var(X_1)}{\epsilon^2} \xrightarrow{n \to \infty} 0
            \end{IEEEeqnarray*}
            since
            \[\Var(\frac{S_n}{n}) = \frac{1}{n^2} \Var(S_n) = \frac{1}{n^2} n \Var(X_i).\]
    \end{enumerate}
\end{refproof}
For the proof of (b) we need the following general result:
\begin{theorem}
    \label{thm2}
    Let $X_1, X_2, \ldots$ be independent (but not necessarily identically distributed) random variables with $\bE[X_i] = 0$ for all $i$
    and
    \[\sum_{i=1}^n \Var(X_i) < \infty.\]
    Then $\sum_{n \ge 1} X_n$ converges almost surely.
\end{theorem}
We'll prove this later\todo{Move proof}

\begin{question}
    Does the converse hold? I.e.~does $\sum_{n \ge 1} X_n < \infty$ a.s.~
    then $\sum_{n \ge 1} \Var(X_n) < \infty$.
\end{question}
This does not hold. Consider for example $X_n = \frac{1}{n^2} \delta_n + \frac{1}{n^2} \delta_{-n} + (1-\frac{2}{n^2}) \delta_0$.
