%% ================================================================
\newpage
\section{Probability}
\label{appx:prb}

Probability theory is sketched here at a bare-minimum level to support the
concepts in this paper.  Footnotes in this section are intended for the reader
with a knowledge of probability theory; other readers may ignore them.  See
\cite{bib:griffiths}, \cite{bib:kerl}, \cite{bib:gs}, and \cite{bib:fg},
respectively, for treatments of probability with increasing levels of rigor.

%% ----------------------------------------------------------------
\subsection{Probability spaces}

For purposes of this paper, I care only about finite or countably infinite
probability spaces.

\begin{defn}
A \bfidx{probability space} is a finite or countably
infinite\footnote{Uncountably infinite probability spaces can be considered; I
avoid them here.} set $\Omega$, called a \bfidx{sample space}, along
with\footnote{The $\sigma$-algebra is the full power set $\mcF=2^\Omega$ and is
implicit in this discussion.} a {probability measure} which is a function
$P:2^\Omega \to [0,1]$ which\footnote{Values of $P$ on singletons suffice to
uniquely define the probability measure on all of $\mcF$.} assigns to each
$\omega \in \Omega$ a number $P(\omega) \in [0,1]$ such that
$$
	\sum_{\omega \in \Omega} P(\omega) = 1.
$$
We extend $P$ to a function on finite subsets of $\Omega$ by
$$
	P(\{\omega_1, \ldots, \omega_m\})
		= P(\omega_1) + \ldots + P(\omega_m)
$$
as long as the $\omega_i$'s are distinct.
(With the convention that an empty sum is zero, we have $P(\emptyset) = 0$.)
Some standard probability terminology is that an $\omega\in\Omega$ is called an
\bfidx{outcome}; a subset of $\Omega$ is called an \bfidx{event}.
\end{defn}

\begin{defn}
\label{defn:pmf}
The mapping $\omega \to P(\omega)$ is called the \bfidx{probability mass
function} or \bfidx{p.m.f.} or \bfidx{probability distribution} for the
probability space $(\Omega, P)$.
\end{defn}

\beginex
Consider the toss of a coin with probability $p$ of landing heads-up.  Then
$$
	\Omega = \{H, T\}
$$
and
$$
	P(H) = p, \quad P(T) = 1-p.
$$
The p.m.f. is
$$
	\begin{tabular}{|c|c|}
	\hline $\omega$ & $P(\omega)$ \\
	\hline
	\hline $H$ & $p$ \\
	\hline $T$ & $1-p$ \\
	\hline
	\end{tabular}
$$
\mendex

\beginex
If there are $n$ such coins, then $\#\Omega = 2^n$ and $P$ of a particular
sequence $(\veps_1, \ldots, \veps_n)$ is
$$
	\prod_{i=1}^n p^{1-\veps_i} (1-p)^{\veps_i}
$$
where $\veps=0$ for heads and $\veps=1$ for tails.  With $n=2$,
the p.m.f. is
$$
	\begin{tabular}{|c|c|}
	\hline $\omega$ & $P(\omega)$ \\
	\hline
	\hline $(H,H)$ & $p^2$ \\
	\hline $(H,T)$ & $p(1-p)$ \\
	\hline $(T,H)$ & $p(1-p)$ \\
	\hline $(T,T)$ & $(1-p)^2$ \\
	\hline
	\end{tabular}
$$
\mendex

\beginex
Another example is the toss of a fair six-sided die.  The sample space is
$$
	\Omega = \{1,2,3,4,5,6\}
$$
with
$$
	P(1) = P(2) = \ldots = P(6) = 1/6.
$$
Some example events include $\emptyset$, $\{2\}$, and $\{1, 3, 5\}$.  We have
$P(\emptyset)=0$, $P(\{2\})=1/6$, and
$$
	P(\{1,3,5\})=P(\{1\}) + P(\{3\}) = P(\{5\}) = 1/6+1/6+1/6 = 1/2.
$$
\mendex

%% ----------------------------------------------------------------
\subsection{Random variables}

\begin{defn}
A \bfidx{random variable} $X$ is a function\footnote{Technically, a measurable
function from the probability space$(\Omega,\mcF,P)$ to a measurable space
$(\Omega', \mcF')$.} from the probability space $(\Omega, P)$ to $\R^d$ or
$\C^d$ --- in particular, often $\R$ or $\C$.
\end{defn}

\beginex
\label{ex:game23}
For the coin-flip example, we might take
$$
	X(H) = +2 \qqand X(T) = -3.
$$
This represent my winnings in a game where we flip a coin with the rule that
you give me \$2 for heads and I give you \$3 for tails.
\mendex

%% ----------------------------------------------------------------
\subsection{Expectations}
\label{sec:mean}

\begin{defn}
The \bfidx{expectation} or \bfidx{expected value} or \bfidx{mean} of a
random variable $X$ is
$$
	E[X] = \expn{X} = \sum_{\omega \in \Omega} P(\omega) X(\omega).
$$
(For countably infinite $\Omega$, we say the expectation of $X$ is undefined if
the sum does not converge.) We usually omit mention of $\omega$'s and instead
write
$$
	E[X] = \expn{X} = \sum_x x P(X=x)
$$
where the sum is over all $x$ in the range $X(\Omega)$.
\end{defn}

\beginex
Continuing example \ref{ex:game23}, the range $X(\Omega) = \{2,-3\}$ and my
expected winnings over many such games are
$$
	\expn{X} = X(H) P(H) + X(T) P(T) = 2p - 3(1-p) = 5p-3.
$$
(Then I'll lose money at this in the long run unless the coin has probability
of heads $p>0.6$.)
\mendex

\begin{prop}
More generally, for a function $f(X)$ (e.g. $f:\C \to \C$),
\begin{align}
\label{eqn:expn_fj}
	\expn{f(X)} = \sum_x f(x) P(X=x).
\end{align}
\end{prop}

This is called the \bfidx{Law of the Unconscious Statistician}.  See
\cite{bib:kerl} for more information.

%%% ----------------------------------------------------------------
%\subsection{The IID paradigm}
%
%Let $X$ be a sequence of IID RVs.  Form $\Xnbar=\sum X_i/n$.  (This is called
%the \bfidx{sample mean}.) Cite the LLN.  Note that
%$\expn{\Xnbar}=\expn{X}$.  Also $\Var(\Xnbar)=\sigma^2/n$, so
%$\sigma(\Xnbar)=\sigma/\sqrt{n}$.  Emphasize that this is the\index{standard
%deviation of the mean} standard deviation \emph{of the mean itself}.
%
%Example:  Experiment is 1000 tosses of a fair coin.  (Or, toss 1000 fair coins
%all at once).  Then count heads.  1st time:  Maybe 510.  2nd time: 493.  3rd
%time: 507.  Etc.  Do \emph{that} many times and the average of your results
%will tend toward 500.  Compute the sample standard deviations of your data;
%the result will tend toward will be $\sqrt{4000}/\sqrt{N}$.  Elaborate.
%
%Caveat about wave-function collapse for QM --- do \emph{identical}
%experiments, not \emph{repeated} experiment.

%% ----------------------------------------------------------------
%$\Var(X) = E[X^2]-E[X]^2$.  $\sigma_X(x)=\sqrt{\Var(X)}$.
%
% independence
%
%variance and stddev
%
%multiple RVs:  mention joint PDF.
%
%maybe mention LLN and CLT
%
%PRB, FA/LA, PDEs/ODEs.

%%% ----------------------------------------------------------------
%\subsection{Multiple random variables}
%
%joint CDF and joint PDF.
%
%%% ================================================================

\begin{vim_bug_workaround}
\end{vim_bug_workaround}



