\problemdata       % Takes 5 *mandatory* arguments
  {gambling-variance}      % latex-friendly label for the prob.
  {variance}               % The topic(s) of the problem content.
  {Lecture Notes}          % Source (if known)
  {S02 cp12M-1}            % Usage (list ones you are aware of).
  {Nick Matsakis, S02}     % Last revision info (author, date).
\begin{problem}

Consider the following two gambling games.

Game A: We win \$2 with probability $2/3$ and lose \$1 with probability
$1/3$.

Game B: We win \$1002 with probability $2/3$ and lose \$2001 with
probability $1/3$.

\begin{problemparts}
\problempart What is the expected win in each case?

\solution{From the Notes: Let random variables $A$ and $B$ be the
payoffs for the two games.  For example, $A$ is 2 with probability 2/3
and -1 with probability 1/3.  We can compute the expected payoff for
each game as follows:

\begin{eqnarray*}
\expect{A} = 2 \cdot \frac{2}{3} + (-1) \cdot \frac{1}{3} = 1, \\
\expect{B} = 1002 \cdot \frac{2}{3} + (-2001) \cdot \frac{1}{3} = 1.
\end{eqnarray*}

We have the same probability, 2/3, of winning each game and the same
expected return for each game.
}

\problempart What is the variance in each case?  

%\insolutions{\bf NOTE to TAs: the point of this problem is to make sure
%they understand what calculating variance means by doing a concrete
%example - they should be able to use BOTH formulas of variance to do
%this.}
%
\solution{The variances of the two games are very different. We can
compute the $\variance{A}$ by working ``from the inside out'' as
follows:

\begin{eqnarray*}
A - \expect{A}
        & = &   \left\{
                \begin{array}{cl}
                        1 & \text{ with probability } \frac{2}{3} \\
                        -2 & \text{ with probability } \frac{1}{3}
                \end{array}
                \right. \\
(A - \expect{A})^2
        & = &   \left\{
                \begin{array}{cl}
                        1 & \text{ with probability } \frac{2}{3} \\
                        4 & \text{ with probability } \frac{1}{3}
                \end{array}
                \right. \\
\expect{(A - \expect{A})^2}
        & = &   1 \cdot \frac{2}{3} + 4 \cdot \frac{1}{3} \\
\variance{A} & = & 2.
\end{eqnarray*}

Similarly, we have for $\variance{B}$:
\begin{eqnarray*}
B - \expect{B}
        & = &   \left\{
                \begin{array}{cl}
                        1001 & \text{ with probability } \frac{2}{3} \\
                        -2002 & \text{ with probability } \frac{1}{3}
                \end{array}
                \right. \\
(B - \expect{B})^2
        & = &   \left\{
                \begin{array}{cl}
                        1,002,001 & \text{ with probability } \frac{2}{3} \\
                        4,008,004 & \text{ with probability } \frac{1}{3}
                \end{array}
                \right. \\
\expect{(B - \expect{B})^2}
        & = &   1,002,001 \cdot \frac{2}{3} + 4,008,004 \cdot \frac{1}{3} \\
\variance{B} & = & 2,004,002.
\end{eqnarray*}

The variance of Game A is 2 and the variance of Game B is more than
two million!  Intuitively, this means that the payoff in Game A is
usually close to the expected value of \$1, but the payoff in Game B
can deviate very far from this expected value.

High variance is often associated with high risk.  For example, in ten
rounds of Game A, we expect to make \$10, but could conceivably lose
\$10 instead.  On the other hand, in ten rounds of game B, we also
expect to make \$10, but could actually lose more than
\$20,000!
}
\end{problemparts}
\end{problem}
