30
2 Introduction to Machine Learning
It is evident in this setting that only one box has the prize. On the other hand,
P (x 2 or x 3 = |x 1 = ×)
= P
(x 2 , x 3 ) = (◦, ×)
x1 = ×
P
(x 1 ,x 2 ,x 3 )=(×,◦,×)
P (x 1 =×)
+ P
(x 2 , x 3 ) = (×, ◦)
x1 = ×
P
(x 1 ,x 2 ,x 3 )=(×,×,◦)
P (x 1 =×)
=
1/3
2/3
+
1/3
2/3
=
1
2
+
1
2
= 1 .
(2.37)
And in this case, it is guaranteed that you get the prize, which is consistent with our
intuition. Then, the probability of winning the prize by changing the box selection
is
P (With the change = ◦)
= P (x 2 or x 3 = ◦|x 1 = ◦)
0
P (x 1 = ◦)
1/3
+ P (x 2 or x 3 = ◦|x 1 = ×)
1
P (x 1 = ×)
2/3
=
2
3
.
(2.38)
The probability of finding the prize is higher than P (x 1 = ◦) = 1/3 when not
changing, so the answer to this problem is “you should change.” More simply,
combining
P (Without the change = ◦) = P (x 1 = ◦) =
1
3
,
(2.39)
and
P (With the change = ◦) + P (Without the change = ◦) = 1 ,
(2.40)
you find
P (With the change = ◦) =
2
3
.
(2.41)
This is a simple problem, but at first glance, the probability of winning is 1/3 and it
does not change whatever the moderator does, so it seems that the result is the same
whether or not you change the box. Certainly, the moderator does not interfere with
the original probability 1/3, but when information is added, we should consider the
2 Introduction to Machine Learning
It is evident in this setting that only one box has the prize. On the other hand,
P (x 2 or x 3 = |x 1 = ×)
= P
(x 2 , x 3 ) = (◦, ×)
x1 = ×
P
(x 1 ,x 2 ,x 3 )=(×,◦,×)
P (x 1 =×)
+ P
(x 2 , x 3 ) = (×, ◦)
x1 = ×
P
(x 1 ,x 2 ,x 3 )=(×,×,◦)
P (x 1 =×)
=
1/3
2/3
+
1/3
2/3
=
1
2
+
1
2
= 1 .
(2.37)
And in this case, it is guaranteed that you get the prize, which is consistent with our
intuition. Then, the probability of winning the prize by changing the box selection
is
P (With the change = ◦)
= P (x 2 or x 3 = ◦|x 1 = ◦)
0
P (x 1 = ◦)
1/3
+ P (x 2 or x 3 = ◦|x 1 = ×)
1
P (x 1 = ×)
2/3
=
2
3
.
(2.38)
The probability of finding the prize is higher than P (x 1 = ◦) = 1/3 when not
changing, so the answer to this problem is “you should change.” More simply,
combining
P (Without the change = ◦) = P (x 1 = ◦) =
1
3
,
(2.39)
and
P (With the change = ◦) + P (Without the change = ◦) = 1 ,
(2.40)
you find
P (With the change = ◦) =
2
3
.
(2.41)
This is a simple problem, but at first glance, the probability of winning is 1/3 and it
does not change whatever the moderator does, so it seems that the result is the same
whether or not you change the box. Certainly, the moderator does not interfere with
the original probability 1/3, but when information is added, we should consider the
