% vim: tw=50
% 15/03/2022 11AM

\begin{proof}
    $X = (X_1, X_2)$ independent. If $m_X((u_1,
    u_2))$ splits as a product $f_1(u_1)f_2(u_2)$.
    In our setting:
    \begin{align*}
        \exp (u^\top \mu)
        &= \exp(u_1 \mu_2) \exp(u_2 \mu_2) \\
        \exp \left( \half u^\top V u \right)
        &= \exp(u_1^2 \sigma_1^2) \exp(u_2^2
        \sigma_2^2) \exp(2u_1u_2 \mathrm{Cov}(X_1,
        x_2))
    \end{align*}
    So it splits as a product if and only if
    $\mathrm{Cov} = 0$.
\end{proof}

\myskip
Motivation: $\mathrm{Cov}(100X_1, X_2) =
100\mathrm{Cov}(X_1, X_2)$ so ``\emph{large}
covariance'' doesn't imply ``\emph{very}
dependent''.

\begin{definition*}
    \emph{Correlation} of $X$, $Y$ is
    \[ \mathrm{Corr}(X, Y) = \frac{\mathrm{Cov}(X,
    Y)}{\sqrt{\mathrm{Var}(X)\mathrm{Var}(Y)}} \]
    (It is a fact that this is always $\in [-1,
    1]$)
\end{definition*}

\begin{proposition*}
    If $(X, Y)$ Gaussian, then $Y = aX + Z$ where
    $Z$ is Gaussian, and $(X, Z)$ independent.
\end{proposition*}

\begin{proof}
    Define $Z = Y - aX$ for $a \in \RR$.
    \begin{claim*}
        $(X, Z)$ is Gaussian.
    \end{claim*}
    \begin{proof}
        \[ u_1 X + u_2 Z = u_1 X + u_2 (Y - aX) =
        (u_1 - au_2) X + u_2 Y .\]
    \end{proof}
    \myskip
    Goal: find $a$ such that $\mathrm{Cov}(X, Z) =
    0$.
    \[ \mathrm{Cov}(X, Z) = \mathrm{Cov}(X, Y -
    aX) = \mathrm{Cov}(X, Y) - a\mathrm{Var}(X) \]
    so take
    \[ a = \frac{\mathrm{Cov}(X,
    Y)}{\mathrm{Var}(X)} \]
    Then $\mathrm{Cov}(X, Z) = 0$ so $X, Z$
    independent.
\end{proof}

\subsection{Two Historical Models}

\subsubsection*{Bertrand's Paradox}

Goal: choose a uniform chord of circle. Two
methods:
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/40ae266aa45211ec.png}
\end{center}
\begin{enumerate}[(i)]
    \item $A$, $B$ uniform on circumference.
    \item midpoint $M$ uniform on disc.
\end{enumerate}
Conclusion: Gives different distributions.
(Completely unsurprising?)

\myskip
\ul{Method (i)}
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/6d2bf11ca45311ec.png}
\end{center}
$\theta \sim \mathrm{Unif} \left[ 0, \frac{\pi}{2}
\right]$ then $|AB| = 2r \sin \theta$. Note $|OM|
= r\cos\theta$, so $\PP(|OM| \le \eps r) \approx
r\eps$ when $\eps \to 0$.

\myskip
\ul{Method (ii)} \\
$\PP(|OM| \le \eps r) = \frac{\pi(\eps r)^2}{\pi
r^2} = \eps^2$.

\subsubsection*{Buffon's Needle}

\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/96ace8f2a45311ec.png}
\end{center}
\begin{itemize}
    \item Lines spaced $L$ apart.
    \item Needle length $L$ dropped ``uniformly''
    \item Observe whether intersects a line.
\end{itemize}
We work ``modulo $L$'':
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/fbc5e2fca45311ec.png}
\end{center}
\[ \text{$X$ centre} \sim \mathrm{Unif}[0, L) \]
\[ \text{Angle }\theta \sim \mathrm{Unif}[0, \pi) \]
Density of $(X, \theta)$ constant $=
\frac{1}{L\pi}$. Crosses line if
\[ X \le \frac{L}{2} \sin \theta \]
or
\[ L - X \le \frac{L}{2} \sin\theta \]
\begin{align*}
    \PP(\text{crosses line})
    &= \PP \left( \min(X, L - X) \le \frac{L}{2}
    \sin\theta \right) \\
    &= 2\PP \left( X \le \frac{L}{2} \sin \theta
    \right) \\
    &= 2 \int_{\theta = 0}^{\pi} \int_{x =
    0}^{\frac{L}{2} \sin\theta} \frac{1}{L\pi} \dd
    x \dd \theta \\
    &= 2 \int_{\theta = 0}^{\pi} \frac{1}{2\pi}
    \sin\theta \dd \theta \\
    &= \frac{2}{\pi} \\
    &\approx 0.64
\end{align*}
What's the point? Calculate $\pi$ experimentally.
\\
Efficiency? Try $n$ times. Number of
intersections: $S_n \sim \mathrm{Bin} \left( n,
\frac{\pi}{2} \right)$. \\
Proportion $\hat{p}_n$ of intersections $=
\frac{S_n}{n}$. By CLT:
\[ \hat{p}_n = p + \sqrt{\frac{p(1 - p)}{n}} Z \]
so
\[ \hat{p}_n - p \approx \sqrt{\frac{p(1 - p)}{n}}
Z .\]
Estimate:
\[ \hat{\pi}_n = \frac{2}{\hat{p}_n} \]
Taylor expanding:
\begin{align*}
    \hat{\pi}_n
    &= \frac{2}{\hat{p}_n} \\
    &\approx \frac{2}{p} - (\hat{p}_n - p)
    \frac{2}{p^2}
\end{align*}
so
\[ \hat{\pi}_n - \pi \approx -\frac{\pi^2}{2}
\sqrt{\frac{p(1 - p)}{n}} Z \approx
\frac{-2.4}{\sqrt{n}} Z \]
So if you seek
\[ \hat{\pi}_n - \pi \approx O(10^{-k}) \]
(correct to $k$ decimal places) then we need $n
\approx 10^{2k}$.
\begin{itemize}
    \item Historical interest.
    \item Not computationally efficient.
    \item Detailed calculation of \emph{sampling
        errors} in other settings on problem
        sheet.
\end{itemize}
