The difficulty here seems to be that in order to do probability, you need to
know what space you're sampling from, and by construction, Sleeping Beauty
requires you to pay attention to that space. There are two "intuitive"
spaces, and if you mix both, you end up confused. Niel de Beaudrap has
already said as much, but given the amount of confusion expressed over this
"problem", I'd like to try being more explicit:
What "really" happens is this:
p=1/2 heads awaken
p=1/2 tails awaken awaken
The funny thing about this is that you get two outcomes from one of the
branches. This not infrequently happens in probability and statistics,
and it's no problem at all, but you have to decide what to do about it.
The Sleeping Beauty problem is typically formulated as Miss Beauty essentially
conducting an experiment each time she is woken up. (Maybe you'll give her
a cookie if she's right.) So half the time you get one experiment, half the
time you get two, and by construction in the problem you're supposed to lump
all of these together. (If you had an army of Sleeping Beauties and you
were tallying all the answers, this is what you'd want to do.)
So now we have three awaken
s in our sample space:
heads-awaken tails-awaken-1 tails-awaken-2
which are all identical. So if we do your calculation:
P(H|awaken) = P(awaken|H)*P(H)/P(awaken) = 1*(1/3)/1 = 1/3
Wait, what was that?
P(H) = 1/3
That's pretty weird--but look, we didn't have to go through the calcuation to
find that. We have a sample space that by construction has heads only one
time out of three (cleverly constructed from a process that has 50% heads!).
So this is exactly right: the prior probability of heads is 1/3.
And Miss Beauty and everyone else would agree on this in advance of the
experiment ever being run (at least if they were up on their statistics).
Alternatively, if the formulation is such that there actually is an implicit
difference between the different awakenings (e.g. because the last one is
part of Miss Beauty's permanent experience, or because if she's right once and
wrong once on the tails branch you'd want to only give her half a cookie, and you don't want to break cookies, so you only ask her one of the two times on the tails branch), then she
(and everyone else) should perhaps do a different calculation:
p=1/2 heads awaken
p=1/2 tails
p=1/4 awaken
p=1/4 awaken
The logic here is that if you're on the tails branch and you wake up, 50%
of the time you'll be on the first instance, and 50% of the time you'll be
on the second. In this case, you can calculate things like
p(H|awaken#1) = p(awaken#1|H)*p(H)/p(awaken#1) = 1*(1/2)/(3/4) = 2/3
meaning that if you know you're in the midst of the experiment and it's the first time you woke up, there's a 2/3 chance you're on the heads branch. (p(H|awaken#2) = 0
, and p(H) = 1/2
by the construction of this sample space.)
This is actually a more flexible framework to use--it is just as true as the
other one; it's just a different formulation suited for calculating different
things. The key is recognizing how the sample space maps onto what may have
actually happened; if your sample space doesn't match the question you're
asking, you'll get the wrong answer.
For example, if Miss Beauty wants to maximize the number of cookies she's
awarded, and she gets one per correct guess, she will reason:
// I can pick only one option: H or T
// I will gain no information later so I may as well pick now
E(cookies) = sum(p(cookies)*#cookies)
If I pick H:
p=1/2 right! 1 cookie
p=1/2 wrong, wrong! no cookie
E(cookies) = (1/2 * 1 + 1/2 * 0) = (1/2 + 0) = 1/2
If I pick T:
p=1/2 wrong! no cookie
p=1/2 right, right! 2 cookies
E(cookies) = (1/2 * 0 + 1/2 * 2) = (0 + 1) = 1
Double the payoff if I pick T
, even though I think P(T) = 0.5
.
The real problem comes when one mixes the two sample spaces. First, one thinks
that of course the three events are indistiguishable by construction, so
that p(H|awaken)
= 1/3. And of course a coin is fair, so p(H)
= 1/2.
And then p(awaken|H)
= 1 and p(awaken)=
and 1/3 != 1/2
and...what the
heck?
Know the sample space, stick to it, and probability will make sense, even if
you are Sleeping Beauty.
[Note: see also my chat transcript with Xoxarap.]