2. CAPÍTULO II : MARCO TEÓRICO
2.2. ANATOMÍA ORAL
2.7.1. MÉTODOS PARA LA DETERMINACIÓN DE LA LONGITUD DE TRABAJO
3 . 1. A Variation
Version Two: As before, Monty shows you three identical doors. One con tains a car, the other two contain goats. You choose one of the doors but do not open it. This time, however, Monty does not know the location of the car. He randomly chooses one of the two doors different from your selection and opens it. The door turns out to conceal a goat. He now gives you the options either of sticking with your original door or switching to the other one. What should you do?
My obsession with the Monty Hall problem began when I heard this ver sion, and once again I have my father to thank. It seems he had been discussing the classical version with some friends. Predictably, they offered the standard argument for why there is no advantage to be gained from switching. The more my father tried to convince them they were wrong, the more annoyed they got. Being perfectly familiar with that reaction, I chuckled to myself as I listened to the story.
That was when my father casually mentioned that if Monty does not know the location of the car, then it is correct to say there is no advantage to be gained from switching. I stopped chuckling. In fact, I did a bona fide double take. What possible relevance could Monty's knowledge make? I figured I must have heard him wrong.
58 The Monty H a l l Prob lem
Well, I hadn't. What Monty knows, or more precisely the presence of a nonzero probability that Monty will open the door concealing the car, makes a big difference to the solution. The purpose of this chapter is to convince you of that fact. Since that will require some serious mathematical machinery, let us first develop some intuition.
As in the classical version, this one begins with a choice from among three identical doors. Your choice will be correct one-third of the time. That means it will be incorrect two-thirds of the time. Those are the cases where, in the classical version, you would win by switching doors.
Let us now assume that your initial choice was incorrect. Then the car is definitely behind one of the remaining two doors. If Monty now happens to choose the door with the car, then the game ends prematurely right there. This will happen in roughly one-half of the cases where you initially make the wrong choice. This makes sense. One-half of two-thirds is one-third, and this represents the fraction of cases in which Monty randomly chooses the door with the car. Since he does not know where the car is, this is a reasonable conclusion.
It also means that among all the trials in which you would have won by switching in the classical version, half are now wasted on trials in which Monty carelessly opens the door with the car. Since in the classical version you win by switching twice as often as you win by sticking, this suggests that in the current version there is no advantage to switching doors.
A plausible agument, but it is no substitute for a mathematically rigorous proof. Our first steps toward such an argument begin with the next section.
3.2. Independent Events
Let us suppose we have two experiments going on at the same time. In one a fair coin is tossed. In the other, a fair six-sided die is rolled. What is the probability of obtaining simultaneously a heads on the coin toss and an even number on the die roll?
As in the previous chapter, we begin our analysis by enumerating the sample space. The possible outcomes of this double experiment can be viewed as ordered pairs in which the first component represents the result of the coin toss and the second component represents the result of the die roll. There will be twelve possibilities, enumerated as follows:
( H, 1 ) ( H, 2) ( H, 3) ( H, 4) ( H, 5) ( H, 6) ( T, 1 ) ( T, 2 ) ( T, 3 ) ( T, 4) ( T, 5) ( T, 6)
It seems reasonable to assume that the result of the coin toss and the result of the die roll do not affect each other. That is, we do not have a situation in which knowing the coin landed heads makes it seem more likely that we got an even number on the die roll or anything like that. The appropriate
Bayesian Monty 59
probability distribution is therefore the uniform one, which in this case means every outcome is assigned a probability of
-h.
Events of this sort, where the occurrence of one has no bearing on the occurrence of the other, are said to be independent.We can now proceed as in the first chapter. Among the twelve equally likely ordered pairs there are three with an H in the first component and an even number in the second. Consequently the probability of obtaining both a head and an even number is
-&
ori.
You have probably noticed something interesting, however. The coin toss has two possible outcomes. The die roll has six possible outcomes. The two experiments performed simultaneously therefore have twelve possible out comes. This is a special case of a general counting rule with which you are probably familiar: If a finite set A has x elements and a finite set B has y elements, then the number of ordered pairs whose first element comes from A and whose second element comes from B is given by xy. We will use the notation A x B to denote this set of ordered pairs. We will also speak of the
Cartesian product of the sets A and B .
Now, the probability o f obtaining heads o n a coin toss i s
!
and the probability of obtaining an even number on a single roll of a die is likewise!.
Multiplying these together givesi,
which is precisely the value we just computed. This logic applies more generally.When we say that event E 1 occurs with probability
�,
we imagine anexperiment with b possible outcomes, a of which correspond to an occur
rence of E I . Likewise, if E 2 occurs with probability
J,
we imagine d possible outcomes, with C of them corresponding to an occurrence of E 2 •I f these experiments take place independently o f each other, then bd will represent the total number of possible outcomes when the two experiments are performed simultaneously. And since E 1 can occur in a different ways,
while E 2 can occur in c different ways, we obtain a probability of for the
simultaneous occurrence of E l and E 2 •
Keep i n mind that events are defined t o b e subsets o f the sample space. Therefore, the intersection E 1 n E 2 of two events represents the event in
which both E I and E2 occur simultaneously. For example, in the experiment of tossing a coin and rolling a die, we might view E 1 as the event of getting
a heads and E2 as the event of rolling an even number. Then we would have
E I = { ( H, 1 ) , ( H, 2 ) , ( H, 3) , ( H, 4) , ( H, 5) , ( H, 6) }
E2 = { ( H, 2) , ( T, 2) , ( H, 4 ) , ( T, 4 ) , ( H, 6) , ( T, 6) } .
Consequently,
E I n E 2 = { ( H, 2 ) , ( H, 4), ( H, 6) }
60 The Monty H a l l Problem
Intuitively, two events are independent if they are not related to each other. Alas, it is not always so easy to determine whether two events meet this criterion. What is needed is a more mathematically precise notion of independence. And since we have just seen that the probability that two inde pendent events happen simultaneously is simply the product of the individual probabilities, we may as well use that as our definition.
Definition 1 Let A and B be two events in a probability space. We say that A and B are independent if
P ( A n B ) = P ( A) P ( B ) .
Natural though it is, there is something a bit irritating about this. The determination that two events are independent depends, according to this definition, on the probability distribution we have chosen. The events A and B can be independent with respect to one distribution but not independent with respect to some other distribution.
Does this not strike you as odd? The knowledge of which events are independent of one another ought to affect our choice of a probability dis tribution. Yet our definition makes it impossible to determine that two events are independent until after a distribution has been chosen. We seem to have done things backward.
The resolution to this dilemma lies in recognizing the difference between an abstract model and the reality it seeks to describe. We have an intuitive notion of independence, in which events are independent if they have no con nection to one another. This notion is very useful in selecting an appropriate distribution in the first place. But sometimes it is not so obvious whether two abstractly defined events are independent. In that case, so long as we have a decent grasp on the probabilities with which our simple events occur, we can use the mathematical definition to ferret out connections our intuition might have overlooked.
That is always how it goes. We use our understanding of the real-world situation to construct the mathematical model. Then we study the model to better understand the real-world situation. Theory and practice must work hand in hand.
What are some examples of non-independent events?
Suppose we choose a card from a deck. Let A denote the event that the chosen card is red, and let B denote the event that the chosen card is a diamond. These events are not independent. The probability that the chosen card is a diamond goes up when we learn that the chosen card was red.
As another example, let A denote the event that a randomly chosen American citizen is under five feet tall and let B denote the event that a randomly chosen American is under twelve years old. Since the probability
Bayesian Monty 61
that a person is under five feet tall goes up when we learn that he is under twelve years old, these events are not independent.
3.3. Examples
Given the importance of the ideas in the previous section, we should pause to consider some specifics.
Consider again the example of tossing a coin and rolling a die. Let A
be the event of tossing a tails and let B be the event of rolling a perfect square. Then p e A) =
4
and P C B ) =�
(since one and four are the only per fect squares on a six-sided die). An inspection of the sample space reveals that2 1 p e A n B ) = P ( { ( T, 1 ) , ( T, 4) } )
=
1 2 = 6 ·Since P ( A) P ( B )
=
p e A n B ), we have that A and B are independent events, precisely as we would expect.Let us return now to the classical Monty Hall problem. In the last chapter we enumerated the sample space as follows:
( 1 , 2 , 1 ) ( 1 , 3 , 1 ) ( 1 , 2 , 3 ) ( 1 , 3 , 2) (2 , 1 , 2) (2 , 3 , 2 ) ( 2 , 1 , 3 ) (2 , 3 , 1 ) . ( 3 , 1 , 3 ) (3 , 2 , 3 ) (3 , 1 , 2) (3 , 2 , 1 ) Recall that each triple has the form
( Your initial choice, The door Monty opens, The location of the car) . We then simplified our work by restricting our attention entirely to the first row of this matrix. We simply assumed that you always initially choose door number one. By doing so we avoided having to define a probability distribu tion for the entire sample space. We remedy that now.
Since we are given that the car is placed randomly behind the three doors, we can use the location of the car to partition our triples into three sets as follows:
A = { ( 1 , 2 , 1 ) , ( 1 , 3 , 1 ) , (2, 3 , 1 ) , (3 , 2 , I ) }
B = { ( 1 , 3 , 2 ) , (2 , 1 , 2) , ( 2, 3 , 2) , (3 , 1 , 2 ) } C = { ( 1 , 2 , 3 ) , (2, 1 , 3 ) , ( 3 , 1 , 3 ) , (3 , 2 , 3 ) } .
Thus A, B, and C represent the events that the car is behind door one, two, or three respectively. Our probability distribution should be chosen so that
1
62 The Monty H a l l Problem
We have two further pieces of information with which to work:
1 . Your initial choice of door is made independently of the location of the car.
2. When Monty has a choice of doors to open, he chooses randomly from among his choices.
How do we put all this together?
As in Chapter 1, let us focus on the four triples in which you initially choose door one. By item one, the location of the car is independent of this choice. That means that among all of the instances where you initially choose door one, the car is equally likely to be behind any of the three doors. Therefore:
P ( 1 , 3, 2) = P ( 1 , 2, 3) = P ( { ( 1 , 2, 1 ) , ( 1 , 3, 1 m .
Item two gives us the further piece of information that
P ( 1 , 2, 1 ) = P ( l , 3 , 1 ) .
Since P ( A ) =
�,
we quickly determine that we must have1
P ( 1 , 2, 1 ) = P ( 1 , 3, 1 ) = 18 ' P ( 1 , 3, 2) = 9 ' 1 P ( 1 , 2, 3)
=
9 . 1The symmetry of the situation now allows us to fill in the remaining proba bilities as follows:
1 P (2, 3, 1 ) = P (2, 1 , 3) = P (3, 2, 1 ) = P (3, 1 , 2)
=
91 P (2, 1 , 2) = P (2, 3, 2)
=
P (3 , 1 , 3) = P (3, 2, 3) = 18Let us investigate some consequences of this distribution. Let S be the event that you initially choose door number one and let T be the event that Monty opens door number two. Since Monty's choice of door depends both on the location of the car and on the door you chose, we would not expect these events to be independent. Our probability distribution confirms this expectation. Note that S corresponds to the event
S = { ( 1 , 3, 2) , ( 1 , 2, 3) , ( 1 , 2, 1 ) , ( 1 , 3, 1 ) } while T i s the event
T = { ( I , 2, 1 ) , (3, 2, 1 ) , ( 1 , 2, 3) , (3, 2, 3) }
Finally, we see that
Bayesian Monty 63
Since our distribution tells us the probability assigned to each triple individ ually, we can readily compute that
1 P ( S ) = 3 ' P ( T)
= �,
3 1 P ( S n T) = - . 6In this case we have P ( S ) P ( T) =I P ( S n T) . Consequently, S and T are not independent.
Now let B denote, as before, the event that the car is behind door number two. Then we have
s nB = { ( l , 2 , 3 ) } and 1 P ( B ) = 3 ' 1 P ( S n B ) = -. 9
Since we still have P ( S ) =
�
, we see that in this case P ( S ) P ( B ) = P ( S n B ) ,implying that S and B are independent events. Again, this agrees with our intuition. Your choice of initial door is independent of the location of the car.
3.4. Conditional Probability
Currently we have two notions of independence. The first is intuitive: two events are independent if they are not connected to each other in any way. The second is mathematical: two events are independent if the probability that both occur is equal to the products of the probabilities that either one occurs alone.
There is a third way of thinking about independent events: two events are independent if the knowledge that one of them has occurred has no effect on our estimate of the probability that the other has also occurred (or, perhaps, will occur). When we are simultaneously tossing a coin and rolling a die, for example, the knowledge that the coin landed heads will not affect our estimate of the probability that the die came up three.
Let us now revisit the classical Monty Hall problem. For concreteness, suppose we initially choose door number one and Monty then opens door number two. Our initial choice is correct with probability
�.
Does the knowl edge that Monty has shown that door number two is empty give us any reason to alter our probability assessment? Our analysis in the previous chapter shows that it does not.But if our intuition is correct, then in version two the same piece of information does give us reason to alter our probability assessments. In both cases we intially choose a door with a
�
probability of being correct. In both cases Monty opens a door and shows us that it is empty. Yet in the first case we do not alter our initial judgment, while in the second case we do. Why is that?64 The M onty H a l l Problem
The reason has to lie in the different probabilities attached to Monty's actions. In version one, it was certain that Monty would open an empty door. Not so in version two. Monty now chooses his door randomly, and therefore there is only a
�
probability that he will open an empty door. Unless our intuition has failed us, the difference between the two versions must lie here. But how ought we incorporate this observation into our reasoning?This is a very general sort of situation. We are interested in some event
A. We know that some other event, B, has already occurred. We seek the probability not of A occurring by itself, but rather the probability that A will occur when we know that B has occurred. This is referred to as the conditional probability that A will occur, given that B has occurred. More concisely, we refer to "the probability of A, given B :' We will use the notation P ( AI B) to denote this probability. What is needed is a formula for P ( A I B ).
Such a formula appears readily if we think in terms of relative frequencies. We are assuming that A and B are events in the sample space of an experi ment. Imagine that we have carried out some large number n of trials. Further assume that event B occurred x times. If n is sufficiently large, then the law of large numbers tells us that P ( B ) is very close to
�.
We now examine those x trials and determine the number of occurrences of A among them. Let us call this number y. In these y trials we have that A
and B both occurred. Since this is out of a total of n trials, we can assume that
p ( A n B ) = i:. n
How should we interpret P ( A I B ), given our setup so far? We have x trials in which event B has occurred. Among those trials there are y in which event A has occurred. So the relative frequency of A occurrences among those trials in which B has occurred, is given by
�.
Consequently, we ought to haveP ( A I B ) =
�.
O f course, these are actual probabilities, meaning that they were deter mined from data generated by multiple trials of a repeatable experiment. The numbers x and y are variables whose value depends on the specific experiment and the number of trials we have done. That notwithstanding, we can use this reasoning to formulate a reasonable definition for the theoretical value of P ( A I B ).
Definition 2 Let A and B be events in a probability space. Then we define the conditional probability of A given B, denoted by P ( AI B), by the formula
( ) _ p ( A n B ) P A l B -
P ( B ) .
This definition is certainly consistent with our argument, since we have
P ( A n B ) y/ n
=
P ( B ) x/ n y x
Bayesian Monty 65
What happens if P ( B ) = o? Our formula would then require dividing by zero,
which is not a good thing. It follows that P ( A I B ) is undefined when P ( B ) =
o. This is logical, for in that case we would be seeking the probability that A occurs under the assumption that something impossible happens first. On the other hand, what happens if P ( A n B ) = O? Then our formula assigns a
probability of 0 to P ( A I B ) . Again, this makes sense. If it is impossible that both A and B occur simultaneously, then the knowledge that B has occurred tells us immediately that A has not occurred.
And what happens if A and B are independent events? Intuitively, this ought to mean that P ( A I B ) = P ( A ) . Happily, our formula bears that out.
For if A and B are independent, then P ( A n B ) = P ( A) P ( B ) , and we have
P ( A I B ) = = = P ( A) ,
precisely as expected. As a bonus, we also have the reverse implication. If P ( A I B ) = P ( A ) then we must have that A and B are independent. You might
enjoy the challenge of proving that for yourself.
3.5. The Law of Total Probabil ity
The next section will bear witness to the power of conditional probability. First, however, we must add an additional computational weapon to our arsenal.
For motivation we return once more to the classical Monty Hall problem. Let us imagine that you have initially selected door one. What is the probabil ity that Monty will now open door two? The answer is not so clear. Certainly if the car is behind door two there is a probability of zero that Monty will open it. If the car is behind door three, then since you have already selected door one, it is certain that Monty will open door two. And if the car is behind door one? In this case Monty chooses randomly between doors two and three, giving a probability of
!
that Monty opens door two.The car can be behind any of the three doors, and the probability that Monty opens door two is different in each of the three cases. How is this