\documentclass{article}
\usepackage{fullpage,parskip}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{xcolor}
\usepackage{xfrac}
\newcommand{\XXX}{{\color{red} \textsf{\textbf{XXX}}}}
\begin{document}
% To run this file, you'll need to have LaTeX installed. All of the
% lab computers have it. You can download a complete LaTeX
% distribution from
% https://www.tug.org/texlive/acquire-netinstall.html.
% Once you have LaTeX, you can either build your PDF on the
% command-line by running 'pdflatex hwXX.tex' to generate hwXX.pdf, or
% you can use an editor like LyX, TeXShop, or ShareLaTeX which
% automates the building of your PDF.
% Please print out your solution double-sided (a/k/a duplex) and bring
% it to class on the Wednesday it's due.
\noindent
% fill in the XXXs below
{\Large CS055 HW09 \qquad Name: \XXX \qquad CAS ID: \XXX} \\[.5em]
% I encourage you to collaborate, but please list any other students
% you talked to about the homework. If you worked alone, please just
% remove the XXXs.
Collaborators: \XXX
% Okay! Solve the problems below. please don't delete the problem
% statement or the ``enumerate'' bracketing which provides the
% numbering.
\begin{enumerate}
\item The \textit{population count} of a bit-string is the number of
1s in it; e.g., the population count of 0000 is 0, while population
count of 0100 and 0001 are both 1. The following questions concern
the population count of random bit-strings of length 4.
\begin{enumerate}
\item What's the probability that the population count is 0 in a
random bit-string of length 4?
\textbf{Answer:} \XXX
\item What's the probability the population count is 3 in a random
bit-string of length 4?
\textbf{Answer:} \XXX
\item Draw up the distribution of population counts on bit-strings
of length 4.
\textbf{Answer:} \XXX
\item Prove that the probability that the population count of a
bit-string is positive (i.e., greater than 0) is \textit{not} independent of the
probability that the first digit is a zero.
\textbf{Answer:} \XXX
\end{enumerate}
\item Suppose we roll two fair, four-sided dice. Let the random
variable $S$ denote the sum of the two rolls.
\begin{enumerate}
\item What is the probability that $S \ge 7$?
\textbf{Answer:} \XXX
\item Given that one die shows a four, what's the probability that
$S \ge 7$?
\textbf{Answer:} \XXX
\end{enumerate}
\item Suppose $E$ and $F$ are two events in a sample space $S$. Prove
that $P(E) = P(E \cap F) + P(E \cap \overline{F})$, where the event
$\overline{F}$ means ``$F$ doesn't happen'', i.e., those events in
$S \setminus F$.
\textbf{Proof:} \XXX
\item Let $Q$ and $R$ be events from a sample space $S$. If $P(Q) =
\sfrac{1}{3}$ and $P(R) = \sfrac{1}{2}$ and $P(R|Q) = \sfrac{5}{6}$,
find $P(Q|R)$.
\textbf{Answer:} \XXX
\item Suppose one out of every five thousand trees in a forest has
truffles growing under it. Your truffle-hunting dog has a keen sense
of smell: when there is a truffle under the tree, she wags her tail
80\% of the time; when there isn't a truffle under the tree, she
wags her tail 10\% of the time.
\begin{enumerate}
\item When your dog wags her tail, what's the probability that
there's a truffle under the tree?
\textbf{Answer:} \XXX
\item For your truffle hunting to be worth it, suppose you need at
least 10\% accuracy out of your dog, i.e., when she wags her tail,
the probability that there's a truffle is at least 10\%.
Suppose that she will always wag her tail 80\% of the time when
there is a truffle. How hard must you train her to \textit{not}
wag when there's no truffle? That is, how often can she wag her
tail at a tree with no truffles and still allow you to find a
truffle 10\% of the time?
\textbf{Answer:} \XXX
\end{enumerate}
\item Suppose that we flip a fair coin until either it comes up heads
three times or we've flipped the coin five times. What's the
expected number of flips we'll perform?
\textbf{Answer:} \XXX
\item Suppose we roll two fair six-sided dice and ignore the lower
roll. What is the expected value of the higher one?
\textbf{Answer:} \XXX
\end{enumerate}
\end{document}