% vim: tw=50
% 22/01/2022 11AM

\begin{example}[Coincident Birthdays]
    $n$ people. What is the probability that at
    least two share a birthday? \\
    Assumptions:
    \begin{itemize}
        \item No leap years! (365 days)
        \item All birthdays equally likely.
    \end{itemize}
    Now note that
    \[ \Omega = \{1, \dots, 365\}^n \qquad
    \mathcal{F} = \mathcal{P}(\Omega) \]
    \[ A = \{\text{at least 2 people share a
    birthday}\} \]
    \[ A^c = \{\text{all $n$ birthdays
    different}\} \]
    \[ \PP(A^c) = \frac{|A^c|}{|\Omega|} =
    \frac{365 \times 364 \times \cdots \times (365
    - n + 1)}{365^n} \]
    so
    \[ \PP(A) = 1 - \frac{365 \times 364 \times
    \cdot \times (365 - n + 1)}{365^n} \]
    \[ \begin{cases}
        n = 22: & \PP(A) \approx 0.476 \\
        n = 23: & \PP(A) \approx 0.507
    \end{cases} \]
    $n \ge 366$: $\PP(A) = 1$.
\end{example}

\subsection{Choosing uniformly from infinite countable set}

(For example $\Omega = \NN$ or $\Omega = \QQ \cap
[0, 1]$)
Suppose possible, then
\begin{itemize}
    \item $\PP(\{\omega\}) = \alpha > 0
        \,\,\forall\,\, \omega \in \Omega$. Then
        \[ \PP(\Omega) = \sum_{\omega \in \Omega}
        \PP(\{\omega\}) = \sum_{\omega \in \Omega}
        \alpha = \infty \qquad \contradiction \]
    \item $\PP(\{\omega\}) = 0 \,\,\forall\,\,
        \omega \in \Omega$. Then
        \[ \PP(\Omega) = \sum_{\omega \in \Omega}
        \PP(\{\omega\}) = \sum_{\omega \in \Omega}
        0 = 0 \qquad \contradiction \]
\end{itemize}
Note possible, but still, there exist lots of
interesting probability measures of $\NN$!

\subsection{Combinatorial Analysis}

Subsets: $\Omega$ finite. $|\Omega| = n$. \\
Question: How many ways to \emph{partition}
$\Omega$ into $k$ disjoint subsets $\Omega_1,
\dots, \Omega_k$ with $|\Omega_i| = n_i$ (with
$\sum_{i = 1}^k n_i = n$)?
\begin{align*}
    M
    &= {n \choose _1} {n - n_1 \choose n_2}{n -
    n_1 - n_2 \choose n_3} \cdots {n - (n_1 +
    \cdots + n_{k - 1} \choose n_k} \\
    &= \frac{n!}{n_1!\cancel{(n - n_1)!}} \times
    \frac{\cancel{(n - n_1)!}}{n_2!\cancel{(n -
    n_1 - n_2)!}} \times \cdots \times \frac{
    \cancel{[n - (n_1 + \cdots + n_{k - 1})]!}}
    {n_k! 0!} \\
    &= \frac{n!}{n_1!n_2! \cdots n_k!} \\
    &=: {n \choose n_1,n_2,\dots,n_k}
\end{align*}

\noindent
Key sanity check: Does ordering of subsets matter?
For example, do we have
\[ \big[ \Omega_2 = \{3, 4, 7\}, \Omega_3 = \{1, 5,
8\} \big] \stackrel{\text{\color{red} different}}{=}
\big[ \Omega_2 = \{1, 5, 8\}, \Omega_3 = \{3, 4,
7\} \big] ?\]
Yes!

\subsubsection*{Random Walks}

\[ \Omega = \{(X_0, X_1, \dots, X_n) : X_0 = 0,
|X_k - X_{k - 1}| = 1, k = 1, \dots, n\} \qquad
|\Omega| = 2^n .\]
\begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/b3e344007b7911ec.png}
\end{center}
Could ask: $\PP(X_n = 0)$?
\[ \PP(X_n = n) = \frac{1}{2^n} \]
\[ \PP(X_n = 0) = 0 \qquad \text{if $n$ is odd} \]
If $n$ is even? \\
Idea - Choose $\frac{n}{2}$ $k$s for $X_k = X_{k -
1} + 1$ and the rest $X_k = X_{k - 1} - 1$. So
\begin{align*}
    \PP(X_n = 0)
    &= 2^{-n} {n \choose n/2} \\
    &= \frac{n!}{2^n \left[ \left( \frac{n}{2}
    \right) ! \right]^2}
\end{align*}
Question: What happens when $n$ is large?

\subsubsection*{Stirling's Formula}

\begin{notation*}
    $(a_n)$, $(b_n0$ two sequences.
\end{notation*}

\noindent
Say $a_n \sim b_n$ as $n \to \infty$ if
$\frac{a_n}{b_n} \to 1$ as $n \to \infty$. For
example, $n^2 + 5n + \frac{6}{n} \sim n^2$.
Non-example: $\exp\left( n^2 + 5n + \frac{6}{n}
\right) \not\sim \exp(n^2)$.

\begin{theorem*}[Stirling]
    \[ n! \sim \sqrt{2\pi} n^{n + 1/2} e^{-n} \]
    as $n \to \infty$. \\
    Weaker version:
    \[ \log(n!) \sim n \log n .\]
\end{theorem*}
