\documentclass[twoside,12pt]{article}

\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.5 in}
\setlength{\topmargin}{0 in}
\setlength{\headheight}{0.25 in}
\setlength{\headsep}{0.25 in}
\setlength{\evensidemargin}{0 in}
\setlength{\oddsidemargin}{0 in}
\setlength{\parskip}{1ex}

\usepackage{graphics}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{latexsym}

\newenvironment{comment}[1]{}{}
\newenvironment{proof}{\noindent {\em Proof.}}{$\Box$}

\newtheorem{theorem}{Theorem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}

\newcommand{\beqn}{\begin{eqnarray*}}
\newcommand{\eeqn}{\end{eqnarray*}}

\begin{document}

\begin{center}
{\Large Lecture 3 - Monty Hall and Ill-Posed Problems} \\
6.042 - February 11, 2003
\bigskip
\end{center}

\footnotetext{Copyright \copyright 2003, Charles Leiserson, Srinivas Devadas, Eric Lehman.  All rights reserved.}

\section{The Monty Hall Problem}\label{monty}

In the 1970's, there was a game show called {\em Let's Make a Deal},
hosted by Monty Hall and his assistant Carol Merrill.  At one stage of
the game, a contestant is shown three doors.  The contestant knows
there is a prize behind one door and that there are goats behind the
other two.  The contestant picks a door.  To build suspense, Carol
always opens a \emph{different} door, revealing a goat.  The
contestant can then stick with his original door or switch to the
other unopened door.  He wins the prize only if he now picks the
correct door.  Should the contestant ``stick'' with his original door,
``switch'' to the other door, or does it not matter?

This was the subject of an ``Ask Marilyn'' column in {\em Parade}
Magazine a few years ago.  Marilyn wrote that your chances of winning
were $2/3$ if you switched--- because if you switch, then you win if
the prize was originally behind either of the two doors you didn't
pick.  Now, Marilyn has been listed in the {\em Guiness Book of World
Records} as having the world's highest IQ, but for this answer she got
a tidal wave of critical mail, some of it from people with Ph.D.'s in
mathematics, telling her she was wrong.  Most of her critics insisted
that the answer was 1/2, on the grounds that the prize was equally
likely to be behind each of the remaining, closed doors.  The pros and
cons of these arguments still stimulate debate.

It turned out that Marilyn was right\footnote{Rather, she gave the
right answer to the question posed here, which is the one she intended
to ask.  Unfortunately for her, she actually presented an {\em
ill-posed} question for which there is no meaningful answer.  See the
next section for examples of such questions.} But given the debate, it
is clearly not apparent which of the intuitive arguments for 2/3 or
1/2 is reliable.  Rather than try to come up with our own explanation
in words, let's use our standard approach to finding probabilities.
In particular, we will analyze the probability that the contestant
wins with the ``switch'' strategy; that is, the contestant chooses a
random door initially and then always switches after Carol reveals a
goat behind one door.  We break the problem down into the standard
four steps.

\subsection*{Step 1:  Find the Sample Space}

In the Monty Hall problem, an outcome is a triple of door numbers:

\begin{enumerate}
\item The number of the door concealing the prize.
\item The number of the door initially chosen by the contestant.
\item The number of the door Carol opens to reveal a goat.
\end{enumerate}

For example, the outcome $(2, 1, 3)$ represents the case where the
prize is behind door 2, the contestant initially chooses door 1, and
Carol reveals the goat behind door 3.  In this case, a contestant
using the ``switch'' strategy wins the prize.

Not every triple of numbers is an outcome; for example, $(1, 2, 1)$ is
not an outcome, because Carol never opens the door with the prize.
Similarly, $(1, 2, 2)$ is not an outcome, because Carol does not open
the door initially selected by the contestant, either.

The tree diagram for the Monty Hall problem is shown in
Figure~\ref{fig:monty}.  As usual, each vertex in the tree corresponds
to a state of the experiment.  In particular, the root represents the
initial state, before the prize is even placed.  Internal nodes
represent intermediate states of the experiment, such as after the
prize is placed, but before the contestant picks a door.  Each leaf
represents a final state, an outcome of the experiment.  One can think
of the experiment as a walk from the root (initial state) to a leaf
(outcome).  In the figure, each leaf of the tree is labeled with an
outcome (a triple of numbers) and a ``W'' or ``L'' to indicate whether
the contestant wins or loses.

\begin{figure}[htbp]
\centerline{\resizebox{!}{3.5in}{\includegraphics{monty}}}
\caption{This is a tree diagram for the Monty Hall problem.  Each
of the 12 leaves of the tree represents an outcome.  A ``W'' next to
an outcome indicates that the contestant wins, and an ``L'' indicates
that he loses.}
\label{fig:monty}
\end{figure}

\subsection*{Step 2:  Define Events of Interest}

For the Monty Hall problem, let $S$ denote the sample space, the set
of all 12 outcomes shown in Figure~\ref{fig:monty}.  The event $W
\subseteq S$ that the contestant wins with the ``switch'' strategy
consists of six outcomes:

\beqn
W & = & \{ (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1) \}
\eeqn

\noindent The event $L \subset S$ that the contestant loses is the
complementary set:

\beqn
L & = & \{ (1,1,2), (1,1,3), (2,2,1), (2,2,3), (3,3,1), (3,3,2) \}
\eeqn

\noindent Our goal is to determine the probability of the event $W$;
that is, the probability that the contestant wins with the ``switch''
strategy.

Well, the contestant wins in 6 outcomes and loses in 6 outcomes.  Does
this not imply that the contestant has a $6/12 = 1/2$ chance of
winning?  No!  Under reasonable assumptions, this sample space is not
uniform!  Some outcomes are more likely than others.  We must
compute the probability of each outcome.

\subsection*{Step 3:  Compute Outcome Probabilities}

\subsection{Assumptions}

To assign a meaningful probability to each outcome in the Monty Hall
problem, we must make some assumptions.  The following three are
sufficient:

\begin{enumerate}
\item The prize is placed behind each door with probability $1/3$.
\item No matter where the prize is placed, the contestant picks each door
with probability $1/3$.
\item No matter where the prize is placed, if Carol has a choice of
which door to open, then she opens each possible door with equal
probability.
\end{enumerate}

The first two assumptions capture the idea that the contestant initially
has no idea where the prize is placed.  The third assumption eliminates
the possibility that Carol somehow secretly communicates the location of
the prize by which door she opens.  Assumptions of this sort almost always
arise in probability problems; making them explicit is a good idea,
although in fact not all of these assumptions are absolutely necessary.
For example, it doesn't matter how Carol chooses a door to open in the
cases when she has a choice, though we won't prove this.

\subsection{Assigning Probabilities to Outcomes}

With these assumptions, we can assign probabilities to outcomes in the
Monty Hall problem by a calculation illustrated in
Figure~\ref{fig:monty2} and described below.  There are two steps.

\begin{figure}[htbp]
\centerline{\resizebox{!}{3.5in}{\includegraphics{monty2}}}
\caption{This is the tree diagram for the Monty Hall problem,
annotated with probabilities for each outcome.}
\label{fig:monty2}
\end{figure}

The first step is to record a probability on each edge in the tree
diagram.  Recall that each node represents a state of the experiment,
and the whole experiment can be regarded as a walk from the root
(initial state) to a leaf (outcome).  The probability recorded on an
edge is the probability of moving from the state corresponding to the
parent node to the state corresponding to the child node.  These edge
probabilities follow from our three assumptions about the Monty Hall
problem.

Specifically, the first assumption says that there is a $1/3$ chance that
the prize is placed behind each of the three doors.  This gives the
1/3 probabilities on the three edges from the root.  The second
assumption says that no matter how the prize is placed, the contestant
opens each door with probability $1/3$.  This gives the $1/3$
probabilities on edges leaving the second layer of nodes.  Finally, the
third assumption is that if Carol has a choice of what door to open, then
she opens each with equal probability.  In cases where Carol has no
choice, edges from the third layer of nodes are labeled with probability
$1$.  In cases where Carol has two choices, edges are labeled with
probability $1/2$.

The second step is to use the edge weights to compute a probability for
each outcome by multiplying the probabilities along the edges leading to
the outcome.  This way of assigning probabilities reflects our idea that
probability measures the fraction of times that a given outcome should
happen over the course of many experiments.  Suppose we want the
probability of outcome $(2, 1, 3)$.  In $1/3$ of the experiments, the
prize is behind the second door.  Then, in $1/3$ of these experiments when
the prize is behind the second door, and the contestant opens the first
door.  After that, Carol has no choice but to open the third door.
Therefore, the probability of the outcome is the product of the edge
probabilities, which is
\[
\frac{1}{3} \cdot \frac{1}{3} \cdot 1 = \frac{1}{9}.
\]
For example, the probability of outcome $(2, 2, 3)$ is the product of
the edge probabilities on the path from the root to the leaf labeled
$(2, 2, 3)$.  Therefore, the probability of the outcome is
\[
\frac{1}{3} \cdot \frac{1}{3} \cdot \frac{1}{2} = \frac{1}{18}.
\]
Similarly, the probability of outcome $(3, 1, 2)$ is
\[
\frac{1}{3} \cdot \frac{1}{3} \cdot 1 = \frac{1}{9}.
\]
The other outcome probabilities are worked out in Figure~\ref{fig:monty2}.

\iffalse
Notice that we cannot \emph{prove} that these are the right probabilities
to assign, because the assignment of probabilities to atomic outcomes is
\emph{axiomatic}.  Someone could choose another assignment to model the
Monty Hall game, and develop a consistent theory of probabilities for
door-picking strategies.

\fi

\subsection*{Step 4: Compute Event Probabilities}

We now have a probability for each outcome.  All that remains is to
compute the probability of $W$, the event that the contestant wins with
the ``switch'' strategy.  The probabilility of an event is
simply the sum of the probabilities of all the outcomes in it.  So the
probability of the contestant winning with the ``switch'' strategy is the
sum of the probabilities of the six outcomes in event $W$, namely,
$2/3$:

\begin{eqnarray*}
\Pr\{W\}
	& = &	\Pr\{(1,2,3)\} + \Pr\{(1,3,2)\} + \Pr\{(2,1,3)\} + \\
	&   &	\Pr\{(2,3,1)\} + \Pr\{(3,1,2)\} + \Pr\{(3,2,1)\} \\
	& = &	\frac{1}{9} + \frac{1}{9} + \frac{1}{9} +
		\frac{1}{9} + \frac{1}{9} + \frac{1}{9} \\
	& = &	\frac{2}{3}
\end{eqnarray*}

In the same way, we can compute the probability that a contestant loses
with the ``switch'' strategy.  This is the probability of event $L$:

\begin{eqnarray*}
\Pr\{L\}
	& = &	\Pr\{(1,1,2)\} + \Pr\{(1,1,3)\} + \Pr\{(2,2,1)\} + \\
	&   &	\Pr\{(2,2,3)\} + \Pr\{(3,3,1)\} + \Pr\{(3,3,2)\} \\
	& = &	\frac{1}{18} + \frac{1}{18} + \frac{1}{18} + \frac{1}{18} +
		\frac{1}{18} + \frac{1}{18}\\
	& = &	\frac{1}{3}
\end{eqnarray*}

The probability of the contestant losing with the switch strategy is
$1/3$.  This makes sense; the probability of winning and the probability
of losing ought to sum to 1!

We can determine the probability of winning with the ``stick'' strategy
without further calculations.  In every case where the ``switch'' strategy
wins, the ``stick'' strategy loses, and vice versa.  Therefore, the
probability of winning with the stick strategy is $1 - 2/3 = 1/3$.

Solving the Monty Hall problem formally requires only simple addition
and multiplication.  But trying to solve the problem with ``common
sense'' leaves us running in circles!

\section{Ill-Posed Problems}

Suppose that I throw two balls into three bins at random.  What is the
probability that both balls end up in the same bin?  As shown below,
three configurations can result:

\[
\begin{array}{ccccc}
\begin{array}{|c|c|}
\circ & \ \\
\circ & \ \\ \hline
\end{array}
& \quad &
\begin{array}{|c|c|}
 & \\
\circ & \circ \\ \hline
\end{array}
& \quad &
\begin{array}{|c|c|}
\ & \circ \\
\ & \circ \\ \hline
\end{array} \\
\end{array}
\]

\noindent Often when people say ``at random'', they implicitly mean
``uniformly at random'', so perhaps we should assume that these
configurations are equally likely.  That suggests that the answer is
$2/3$.

On the other hand, perhaps we should assume that {\em each} ball is
thrown into a bin uniformly at random, without regard to where the
other ball ends up.  Under this model, we obtain the tree diagram
shown in Figure~\ref{fig:lec3-tree}.  The event that both balls fall
into the same bin consists of the outcomes $(1,1)$ and $(2,2)$, both
of which have probability $\frac{1}{4}$.  This suggests that the
probability that both balls fall into the same bin is actually
$\frac{1}{2}$.

\begin{figure}
\centerline{\resizebox{!}{2in}{\includegraphics{lec3-tree.eps}}}
\caption{The tree diagram for the experiment of throwing two balls
into two bins, where each ball is thrown uniformly at random and
without regard to the other ball.} \label{fig:lec3-tree}
\end{figure}

Which answer is right?  Both are defensible.  Given the statement of
the problem, there are at least two reasonable interpretations that
give rise to two different probabilistic models and give two
contradictory answers.  The question itself is {\em ill-posed}.

\subsection*{Where are the Chickens?}

We have four boxes arranged in an L-shape as shown below.  Each box is
large enough to hold one chicken.  Call the three boxes stacked
vertically ``the column'', and call the two boxes side-by-side ``the
row''.

\bigskip
\centerline{\resizebox{!}{1in}{\includegraphics{lec3-chicken.eps}}}
\bigskip

\noindent Suppose that we place two chickens at random, one into the
row and one into the column.  What is the probability that a chicken
ends up in the lower-left box, at the elbow of the L?

The row chicken is in the elbow with probability $\frac{1}{2}$.
However, if the row chicken is not in the elbow (also probability
$\frac{1}{2}$), then the column chicken is inthe elbow with
probability $\frac{1}{3}$.  Therefore, there is a chicken in the elbow
with probability:

\beqn
\frac{1}{2} + \frac{1}{2} \cdot \frac{1}{3} & = & \frac{2}{3}
\eeqn

On the other hand, we can place the first chicken in any of the four
boxes.  With probability $\frac{1}{4}$ it is in the elbow and we don't
care about the location of the other chicken, because we are assured
of having one in the row and one in the column.  Otherwise, with
probability $\frac{2}{4}$, the first chicken is in the upper part of
the $L$.  In this case, the second chicken must go in one of the two
row boxes, and so it ends up in the elbow with probability
$\frac{1}{2}$.  Finally, with probability $\frac{1}{4}$, the first
chicken is in the right box in the row.  In this case, the second
chicken must go in one of the three column boxes, and so it falls into
the elbow with probability $\frac{1}{3}$.  Overall, there is a chicken
in the elbow with probability:

\beqn
\frac{1}{4} + \frac{2}{4} \cdot \frac{1}{2} + \frac{1}{4} \cdot
\frac{1}{3} & = & \frac{7}{12}
\eeqn

Both interpretations of the question are reasonable, but the answers
are different!  Once again, the problem is that the question is
ill-posed.  There is not enough information about the experiment to
determine a unique model and thus a unique answer.

\section{A Mother with Two Children}

Consider the following two questions:

\begin{enumerate}

\item A mother has two children.  At least one is a boy.  What is the
probability that the other one is a boy?

\item A mother has two children.  The older one is a boy.  What is the
probability that the other one is a boy?

\end{enumerate}

Letters about such questions were second only those concerning the
Monty Hall problem in Marilyn vos Savant's mailbag.  The surprising
fact is that the answers to the two questions are significantly
different.  A rigorous explanation will have to wait until we
introduce {\em conditional probability} in the next lecture.  However,
we can give an intuitive explanation for the difference now.

If a mother has two children, then there are four equally probable
outcomes: two boys ($BB$), a boy and then a girl ($BG$), a girl and
then a boy ($GB$) or two girls ($GG$).

\begin{itemize}

\item In the first experiment, we rule out only one outcome ($GG$),
leaving three equally-likely possibilities.  In only one of these
($BB$) is the other child a boy.  Therefore, the answer is $1/3$.

\item In the second experiment, we rule out {\em two} outcomes ($GB$
and $GG$), leaving only two equally-likely possibilities.  In one of
these ($BB$), the other child is a boy.  Therefore, the answer is
$1/2$.

\end{itemize}

In this case, the problem is not that either question is ill-posed,
but rather that there are two very similar questions that---
amazingly--- have different answers!  In general, specific side
information (``the older one is a boy'') leads to different
conclusions than general side information (``at least one is a boy'').
Be aware of this distinction, because it arises in many problems!
\end{document}

