\documentclass[12pt]{article}
\usepackage{latex-macros/course}
%\renewcommand{\pr}[1]{\Pr\left(#1\right)}
%\renewcommand{\paren}[1]{\left(#1\right)}
%\newcommand{\ex}[1]{\operatorname{Ex}\left(#1\right)}

\begin{document}

\inclassproblems{14, Mon.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
Here are seven propositions:
%
\[
\begin{array}{rcrcr}
x_1 & \vee & x_3 & \vee & \neg x_7 \\
\neg x_5 & \vee & x_6 & \vee & x_7 \\
x_2 & \vee & \neg x_4 & \vee & x_6 \\
\neg x_4 & \vee & x_5 & \vee & \neg x_7 \\
x_3 & \vee & \neg x_5 & \vee & \neg x_8 \\
x_9 & \vee & \neg x_8 & \vee & x_2 \\
\neg x_3 & \vee & x_9 & \vee & x_4
\end{array}
\]
%
Note that:

\begin{enumerate}

\item Each proposition is the OR of three terms of the form $x_i$ or
the form $\neg x_i$.

\item The variables in the three terms in each proposition are all
different.

\end{enumerate}

\noindent Suppose that we assign true/false values to the variables
$x_1, \ldots, x_9$ independently and with equal probability.

\bparts

\ppart What is the probability that a single proposition is true?
\solution{
Each proposition is true unless all three of its terms are false.
Thus, each proposition is true with probability:
%
\[
1 - \paren{\frac{1}{2}}^3 = \frac{7}{8}
\]
}
\ppart What is the expected number of true propositions?

\solution{
Let $T_i$ be an indicator for the event that the $i$-th proposition is
true.  Then the number of true propositions is $T_1 +
\ldots + T_7$ and the expected number is:
%
\begin{align*}
\expect{T_1 + \ldots + T_7}
    & = \expect{T_1} + \ldots + \expect{T_7} \\
    & = 7/8 + \ldots + 7/8 \\
    & = 49/8 = 6 \frac{1}{8}
\end{align*}}

\ppart Use your answer to prove that there exists an assignment to the
variables that makes \textit{all} of the propositions true.

\solution{A random variable can not always be less than its
expectation, so there must be some assignment such that:
%
\[
T_1 + \ldots T_7 \geq 6 \frac{1}{8}
\]
%
This implies that $T_1 + \ldots + T_7 = 7$ for at least one outcome.
This outcome is an assignment to the variables such that all of the
propositions are true.}

\eparts

\end{problem}

\instatements{\newpage}
\begin{problem}
Final exams in 6.042 are graded according to a rigorous procedure:

\begin{itemize}

\item With probability $4/7$ the exam is graded by a
\textit{recitation instructor}, with probability $2/7$ it is graded
by a \textit{lecturer}, and with probability $1/7$, it is
accidentally dropped behind the radiator and arbitrarily given a score
of 84.

\item \textit{Recitation instructors} score an exam by scoring each
problem individually and then taking the sum.

\begin{itemize}

\item There are ten true/false questions worth 2 points each.  For
each, full credit is given with probability $3/4$, and no
credit is given with probability $1/4$.

\item There are four questions worth 15 points each.  For each, the
score is determined by rolling two fair dice, summing the results, and
adding 3.

\item The single 20 point question is awarded either 12 or 18 points
with equal probability.

\end{itemize}

\item \textit{Lecturers} score an exam by rolling a fair die twice,
multiplying the results, and then adding a ``general impression''
score.

\begin{itemize}

\item With probability $4/10$, the general impression score is 40.

\item With probability $3/10$, the general impression score is 50.

\item With probability $3/10$, the general impression score is 60.

\end{itemize}

\end{itemize}

Assume all random choices during the grading process are mutually
independent.

\bparts

\ppart What is the expected score on an exam graded by a recitation
instructor?

\solution{ Let $X$ equal the exam score and $C$ be the event
that the exam is graded by a recitation instructor.  We want to
calculate $\expcond{X}{C}$.  By linearity of (conditional) expectation, the
expected sum of the problem scores is the sum of the expected problem
scores.  Therefore, we have:
%
\begin{align*}
\expcond{X}{C}   & =     10 \cdot \expcond{\text{T/F score}}{C} +
                4 \cdot \expcond{\text{15pt prob score}}{C} +
                \expcond{\text{20pt prob score}}{C} \\
        & = 
        10 \cdot \left(\frac{3}{4} \cdot 2 + \frac{1}{4} \cdot 0 \right)
        + 4 \cdot \left( 2 \cdot \frac{7}{2} + 3 \right)
        + \left(\frac{1}{2} \cdot 12 + \frac{1}{2} \cdot 18 \right) \\
        & =     10 \cdot \frac{3}{2} + 4 \cdot 10 + 15  = 70
\end{align*}
}

\ppart What is the expected score on an exam graded by a lecturer?

\solution{
Now we want $\expcond{X}{\bar{C}}$, the expected score a lecturer would
give.  Employing linearity again, we have:
%
\begin{align*}
\expcond{X}{\bar{C}} &  = \expcond{\text{product of dice}}{\bar{C}}\\
                    & \quad + \expcond{\text{general impression}}{\bar{C}} \\
        & =  \paren{\frac{7}{2}}^2  & \text{(because the dice are independent)}\\
        & \quad + \paren{\frac{4}{10} \cdot 40 + 
                \frac{3}{10} \cdot 50 + 
                \frac{3}{10} \cdot 60} \\
        & =     \frac{49}{4} + 49  =    61 \frac{1}{4}
\end{align*}
}

\ppart What is the expected score on a 6.042 exam?

\solution{Let $X$ equal the true exam score.  The Total Expectation
Theorem implies:
%
\begin{align*}
\expect{X}  & =  \expcond{X}{C}\pr{C} + \expcond{X}{\bar{C}} \pr{\bar{C}}\\
        & =      70 \cdot \frac{4}{7} +
                 \left(\frac{49}{4} + 49\right) \cdot \frac{2}{7}  +
                 84  \cdot \frac{1}{7}\\
        & =     40 + \paren{\frac{7}{2} + 14} + 12  =   69 \frac{1}{2}
\end{align*}
}

\eparts

\end{problem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\newpage


%\newpage

\begin{problem}
The number of squares that a piece advances in one turn of the game
Monopoly is determined as follows:

\begin{itemize}

\item Roll two dice, take the sum of the numbers that come up, and
advance that number of squares.

\item If you roll {\em doubles} (that is, the same number comes up on
both dice), then you roll a second time, take the sum, and advance
that number of additional squares.

\item If you roll doubles a second time, then you roll a third time,
take the sum, and advance that number of additional squares.

\item However, as a special case, if you roll doubles a third time,
then you go to jail.  Regard this as advancing zero squares overall
for the turn.

\end{itemize}

\end{problem}

\bparts

\ppart What is the expected sum of two dice, given that the same
number comes up on both?

\solution{There are six equally-probable sums: 2, 4, 6, 8, 10, and 12.
Therefore, the expected sum is:
%
\[
\frac{1}{6} \cdot 2 + \frac{1}{6} \cdot 4 + \ldots + \frac{1}{6} \cdot 12 = 7
\]
}

\ppart What is the expected sum of two dice, given that different
numbers come up?  (Use your previous answer and the Total Expectation
Theorem.)

\solution{Let the random variables $D_1$ and $D_2$ be the
numbers that come up on the two dice.  Let $E$ be the event that they are
equal.  The Total Expectation Theorem says:
%
\begin{align*}
\expect{D_1 + D_2}
        & =     \expcond{D_1 + D_2}{E} \cdot \pr{E} + 
                \expcond{D_2 + D_2}{\overline{E}} \cdot \pr{\overline{E}} \\
\end{align*}
%
Two dice are equal with probability $\pr{E} = 1 / 6$, the expected sum
of two independent dice is 7, and we just showed that $\expcond{D_1 +
D_2}{E} = 7$.  Substituting in these quantities and solving the
equation, we find:
%
\begin{align*}
7       & =     7 \cdot \frac{1}{6} + 
                \expcond{D_2 + D_2}{\overline{E}} \cdot \frac{5}{6} \\
\expcond{D_2 + D_2}{\overline{E}}
        & =     7
\end{align*}
}

%\instatements{}

\ppart To simplify the analysis, suppose that we always roll the dice
three times, but may ignore the second or third rolls if we didn't
previously get doubles.  Let the random variable $X_i$ be the sum of
the dice on the $i$-th roll, and let $E_i$ be the event that the
$i$-th roll is doubles.  Write the expected number of squares a piece
advances in these terms.

\solution{
From the total expectation formula, we get:
%
\begin{align*}
\expect{\text{advance}}
        & =     \expcond{X_1}{\overline{E_1}}
                        \cdot \pr{\overline{E_1}} \\
        & \quad + \expcond{X_1 + X_2}{E_1 \cap \overline{E_2}}
                        \cdot \pr{E_1 \cap \overline{E_2}} \\
        & \quad + \expcond{X_1 + X_2 + X_3}{E_1 \cap E_2 \cap
                          \overline{E_3}}
                        \cdot \pr{E_1 \cap E_2 \cap \overline{E_3}} \\
        & \quad + \expcond{0}{E_1 \cap E_2 \cap E_3}
                        \cdot \pr{E_1 \cap E_2 \cap E_3} \\
\end{align*}
Then using linearity of (conditional) expectation, we refine this to
\begin{align*}
\lefteqn{\expect{\text{advance}}}\\
        & =     \expcond{X_1}{\overline{E_1}}
                        \cdot \pr{\overline{E_1}} \\
        & \quad + \paren{\expcond{X_1}{E_1 \cap \overline{E_2}}
                          + \expcond{X_2}{E_1 \cap \overline{E_2}}}
                        \cdot \pr{E_1 \cap \overline{E_2}} \\
        & \quad + \paren{\expcond{X_1}{E_1 \cap E_2 \cap
                          \overline{E_3}} + \expcond{X_2}{E_1 \cap E_2 \cap
                          \overline{E_3}} +
             \expcond{X_3}{E_1 \cap E_2 \cap \overline{E_3}}}\\
        &          \qquad \cdot \pr{E_1 \cap E_2 \cap \overline{E_3}}\\
        & \quad + 0.
\end{align*}
Using mutual independence of the rolls, we simplify this to
\begin{align}
\lefteqn{\expect{\text{advance}}}\notag\\
        & =     \expcond{X_1}{\overline{E_1}}
                        \cdot \pr{\overline{E_1}}\label{exa} \\
        & \quad + \paren{\expcond{X_1}{E_1}
                          + \expcond{X_2}{\overline{E_2}}}
                        \cdot \pr{E_1} \cdot \pr{\overline{E_2}}\notag \\
        & \quad + \paren{\expcond{X_1}{E_1} + \expcond{X_2}{E_2} +
             \expcond{X_3}{\overline{E_3}}}
                        \cdot \pr{E_1} \cdot \pr{E_2} \cdot \pr{\overline{E_3}}\notag
\end{align}
}

\iffalse

ERIC: There's a bunch of defs and facts being used here that we haven't
mentioned explicitly.  We should remark that an RV, $R$, is independent of an
event, $E$, iff $R$ and $I_E$ are independent RV's.  Next we need that if
$R$ is independent of $E$, then $\expcond{R}{E} = \expect{R}$:
\begin{proof}
\begin{align*}
 ex{R}{E} &  = \frac{\expect{R \cdot I_E}}{\pr{E}} & \text{(by~\eqref{RE})}\\
              & =  \frac{\expect{R} \cdot \expect{I_E}}{\pr{E}}
                        & \text{(independence of $R$ from $E$)}\\
              & =  \frac{\expect{R} \cdot \pr{E}}{\pr{E}}
                        & \text{(rule for Ex(indicator))}\\
              & = \expect{R}.
\end{align*}
\end{proof}
More generally, we need that $\expcond{R}{(E \cap F)} = \expcond{R}{F}$ when
$R$ and $F$ are both indep of $E$ -- or something like that I haven't had
time to check.
\fi

\ppart What is the expected number of squares that a piece advances in
Monopoly?

\solution{We plug the values
from parts (a) and (b) into equation~\eqref{exa}:
%
\begin{align*}
\expect{\text{advance}}
        & =     7 \cdot \frac{5}{6}
                + (7 + 7) \cdot \frac{1}{6} \cdot \frac{5}{6}
                + (7 + 7 + 7) \cdot \frac{1}{6} \cdot \frac{1}{6} \cdot \frac{5}{6}\\
        & = 8\frac{19}{72}
\end{align*}
}

\eparts

\end{document}


