        \problemdata       % Takes 5 *mandatory* arguments
        {carnival-dice}             % latex-friendly label for the prob.
        {expectation}  % The topic(s) of the problem content.
        {}               % Source (if known)
        {S02 cp11m-1} % Usage (list ones you are aware of).
        {Ashish, S02}        % Last revision info (author, date).



%% NOTES FOR THE FUTURE: carnival dice took a long time for people who
%% had not done 041, and very few got to cool stickers at all. cool
%% stickers was too much for the first class - should instead have one
%% a straightforward mean time to failure example that wpould have
%% allowsed them to work through the series.

%% 
%% Carnival Dice
%% Prove Linearity formula
%% Hatcheck
%% Couples
%% Cool stickers?

\begin{problem}
\begin{problemparts}
\problempart In the game of Carnival Dice, the player chooses a number
from 1 to 6.  She then throws three fair and mutually independent
dice.  She wins one dollar if any die matches, and loses a dollar
otherwise. Let R be a random variable equal to her profit in one
round. What is $\expect[R]$?

\solution{
Let the random variable $R$ be the amount of money won or lost by the
player in a round.  We can compute the expected value of $R$ as
follows:
\begin{eqnarray*}
\expect{R}  & = &   -1 \cdot \pr{\mbox{0 matches}} +
                     1 \cdot \pr{\mbox{any match}}\\
            & = &   -1 \cdot \left(\frac{5}{6}\right)^3 +
                     1 \cdot \left(1 - \frac{5}{6}\right)^3\\
            & = &   \frac{-34}{216}
\end{eqnarray*}
The player can expect to lose approx 16 cents any round.
}

\problempart Consider a modified version of Carnival Dice. The game is
the same except she wins one dollar for \emph{each} die that matches
her number, and she loses one dollar if no die matches. What is
her expected profit now?

\solution{At first glance the new game appears to be fair; after all,
the player is now ``justly compensated'' if she rolls her number on
more than one die. But its not much better.

Let the random variable $R$ be the amount of money won or lost by the
player in a round.  We can compute the expected value of $R$ as
follows:
\begin{eqnarray*}
\expect{R}  & = &   -1  \cdot \pr{\mbox{0 matches}} +
                     1 \cdot \pr{\mbox{1 match}} +
                     2  \cdot \pr{\mbox{2 matches}} +
                     3 \cdot \pr{\mbox{3 matches}} \\
        & = &   -1 \cdot \left(\frac{5}{6}\right)^3 +
                1 \cdot 3\left(\frac{1}{6}\right)\left(\frac{5}{6}\right)^2+
                2 \cdot 3\left(\frac{1}{6}\right)^2\left(\frac{5}{6}\right)+
                3 \cdot \left(\frac{1}{6}\right)^3 \\
        & = &   \frac{-125 + 75 + 30 + 3}{216} \\
        & = &   \frac{-17}{216}
\end{eqnarray*}

Even with a \$3 payoff for three matching dice, the player can expect
to lose $17/216$ of a dollar, or about 8 cents, in every round. This
is still a horrible game for the player! }
\end{problemparts}
\end{problem}
