\problemdata       % Takes 5 *mandatory* arguments
  {conditional-flipping}   % latex-friendly label for the prob.
  {conditional probability}% The topic(s) of the problem content.
  {}                       % Source (if known)
  {S02 q3-5}               % Usage (list ones you are aware of).
  {Nick Matsakis, S02}     % Last revision info (author, date).
\begin{problem}[25]
A bag contains $1000$ nickels, of which $999$ are regular (fair)
nickels and $1$ is a two-headed nickel. Experiment X$(k)$ consists of
pulling a coin out of the bag at random, flipping it $k$ times and
then putting it back.
\begin{problemparts}
\problempart[9]
Ben Bitdiddle has volunteered to perform X$(10)$.
\begin{itemize}
\item Let $a$ be the probability that Ben gets $10$ heads given
that he pulled out the two-headed nickel. What is the value of $a$?

\solution[\vspace*{3cm}]{
\begin{eqnarray*}
a&=&1
\end{eqnarray*}
}


\item Let $b$ be the probability that Ben gets $10$ heads given that he
pulled out a regular nickel. What is the value of $b$?

\solution[\vspace*{3cm}]{
\begin{eqnarray*}
b&=&2^{-10}
\end{eqnarray*}
}

\item Let $c$ be the probability that Ben gets 10 heads when he
performs X$(10)$. What is the value of $c$? You may express $c$ in terms of $a$ and $b$.

\solution[\vspace*{3cm}]{
\begin{eqnarray*}
c&=&\paren{\frac{1}{1000}}a+\paren{\frac{999}{1000}}b
\end{eqnarray*}
}

\end{itemize}

\problempart[8] Ben has just performed X$(10)$ and ended up getting
$10$ heads! Let $d$ be the probability that he pulled out the
two-headed coin, given that he flipped 10 heads. Express $d$ in terms
of $a$, $b$ and $c$ (not all variables need be present in your
solution).

\solution[\newpage]{
Let $A$ be the event that Ben pulled out the two-headed coin. Let $B$ be
the event that Ben got $10$ heads. Then:
\[
d~=~Pr(A|B)~ =~ \frac{Pr(A)}{Pr(B)}Pr(B|A)~ =~ \frac{1/1000}{c}\cdot 1~ =~ \frac{1}{1000c}
\]
}

\problempart[8] Another subject, Alyssa, performs X$(10)$, and ends up
getting $10$ heads too. She gets so excited that she wants to keep on
flipping \emph{the same coin} another $10$ times. Let $e$ be the probability
that Alyssa will flip another $10$ heads with the same coin. Express $e$
in terms of $a$, $b$, $c$ and $d$ (not all variables need be present in
your solution). 

\solution[\vspace*{3cm}]{ Alyssa has pulled out the two-headed coin
with probability $d$, and a regular coin with probability
$1-d$. Therefore, the probability of getting another $10$ heads is
\begin{eqnarray*}
d\cdot a + (1-d)\cdot b &=& d + (1-d)\cdot 2^{-10}
\end{eqnarray*}
}
\end{problemparts}
\end{problem}
