if-then knots

space for a paper airplane race

Follow-up on “A Probability Puzzle”

Here is the analysis using Bayes’ Theorem of the probability puzzle I posted below. In this post I’m changing the puzzle so that there’s an odd number of tosses, which just rules out the need for a special case when there’s an exact 50:50 split. Here’s a shortened (and maybe clearer) statement of the puzzle.

I go into another room and do the following, all of which you fully know that I am doing. I flip a coin 101 times. I keep track of the number and outcome of each toss.  I randomly select 51 numbers corresponding to tosses that landed with the majority outcome, generating a set S. When I return I list the numbers in S and tell you the outcome of the corresponding tosses. This process returns an output of the following form <S, ____>, where S is a set of 51 numbers and ____ is either heads or tails, depending on the outcome of the tosses corresponding to numbers in S.  For example, I might return and tell you that all of the odd tosses landed tails: i.e., <{odds<102}, tails>.  The question is this: Suppose I tell you that all of the tosses corresponding to numbers in some set S landed tails: i.e., assume the outcome <S, tails>.  Should your probability that all of the tosses corresponding to numbers not in S were heads be higher, lower, or the same as your probability that all of the tosses corresponding to numbers not in S were tails?

I say it should be higher. Consider the following propositions.

p = “The outcome <S, tails> was produced by the process described above.”
q = “The distribution was such that all of the tosses corresponding to numbers in S were tails and all of the rest landed landed heads.”
r = “Every toss landed tails.”

My claim is that P(q|p) > P(r|p).  As I explained in the previous post this looks like it might be an instance of the gambler’s fallacy, but using Bayes’ Theorem we can prove that it is not.

By Bayes’ Theorem:

P(q|p) = P(p|q) * P(q) / P(p)

P(r|p) = P(p|r) * P(r) / P(p)

Since the unconditional probability for any particular sequence of outcomes is the same as for any other P(q) = P(r), so to prove P(q|p) > P(r|p) it suffices to show that P(p|q) > P(p|r).

To begin, P(p|q) = 1.  Why?  If q is true then S is the only set that could be produced by randomly selecting 51 numbers corresponding to tosses that landed tails.

Next, P(p|r) = 51!*50!/101!.  Why?  If r is true then the chance that S is the set generated by randomly picking from numbers corresponding to tosses that landed tails is calculated thusly:  On the first draw the chance of drawing a number in S is 51/101, on the second 50/100, on the third 49/99, etc. . . take the product.

Hence, P(p|q) > P(p|r); so P(p|q) * P(q) / P(p) > P(p|r) * P(r) / P(p); and P(q|p) > P(r|p).

The difficult part of this puzzle is stating p, q, and r in the correct way.  In particular, if you update only on the information that all of the tosses corresponding to numbers in S were tails you will be tempted to think that the correct answer commits the gambler’s fallacy by supposing that the outcomes of tosses corresponding to numbers not in S are dependent on the outcomes of tosses corresponding to numbers in S.  However, that is not all of the information that you have.  You also know how the outcome <S, tails> was generated and the requirement of total evidence demands that you update on a proposition that expresses this information.

BTW, I came up with this puzzle on a car trip back from a conference, but it has a ring of familiarity.  This leads me to suspect that I had seen it somewhere before and have forgotten where.  It’s certainly just the kind of example one would use to illustrate the usefullness of Bayes’ Theorem and the requirement of total evidence.  So, if anyone knows where I might have read this puzzle or something like it before, I’m interested to find out.  Also, if someone can confirm that P(p|r) = 51!*50!/101! is correct, I’d be much obliged.  My confidence with combinatorial/probability expressions is a little low, not having ever taken a course in probability or statistics.  In any case, it’s clear that P(p|r) < 1.

27 Comments »

  jd2718 wrote @

The good news is that the new problem statement is easier to follow (and agrees with what I thought you meant).

The bad news comes in two parts. The first is that the analysis is too complex. The second is that the answer is not correct.

In general, the probability of any number of heads greater than 50 is 0, and the probability of any smaller number of heads, h, is C(h,101)/(2^100). Notice that the sum of the probabilities is 1.

In particular, the probability of 0 heads is 1/(2^100) and the probability of 50 heads is C(50,101)/(2^100).

Why? Because the selection of S removes half of the distribution. We choose binomially. And then we announce which side of the distribution the outcome lies in.

The denominator has just been cut in half.

IOW, we could ask, what is the probability of all 0 heads given that the majority were tails? What is the probability of 50 heads, given the majority were tails.

(the selection of S is not a random selection from all 101 coins, but only from those in the majority pool)

Jonathan

  jrshipley wrote @

If p is true, as the hypothetical dictates, then indeed there is no chance of more than 50 heads, but I’m not sure how this goes against anything that I said. Also, if r is true then all of the tosses are in the majority, so it is in fact from all 101 coins.

I’m well aware of the standard binomial distribution. Noticing that is the first clue that it is not a gambler’s fallacy to think that there will be more of the minority when 51 coins from the majority are taken away. I made just that point in an intuitive way here. I got gripped by this puzzle just because I became bewitched by the charge of gambler’s fallacy and needed to work out just why that wasn’t so.

You also wrote: “the probability of 0 heads is 1/(2^100)”. When? Based on what information? I think that the information that at least 51 tosses were tails raises that to 1/2^50; i.e., the probability that the rest are tails. The question now is whether you’ll also say that, given all that you are given in the puzzle, the probability of 50 heads is also 1/2^50. If you update only on the information that 51 tosses were tails then you’ll say yes and accuse anyone that says otherwise of fallaciously thinking that tosses are not independent, but I think I’ve shown using Bayes’ Theorem that that’s a wrong position. Furthermore, this agrees with the intuitive reasoning that I spelled out before (see “here” linked above).

Finally, I am reasonably confident that I could express the probability of each possible sequence given that <S, tails> using (a generalization of) the method I used above to calculate the key terms in expressions of the probabilities for two of the sequences that remain possible given , and I am also confident that I could show that the probabilities sum to 1. This, however, is a bit of a homework project, which I will have to put off at least for a bit. If, however, someone can show me that the method does not generalize or that generalized it does yields assignments which do not sum to zero then I will be convinced that I am in error.

  jd2718 wrote @

This experiment is equivalent to tossing 101 coins, and then identifying which side of the binomial distribution we are on.

The probability of 0 heads was 1/(2^101). But the guy in the back room just eliminated half the denominator.

  jd2718 wrote @

Let’s make this plainer: 5 coins.
My analysis says that if tails are removed, the probability of 0 heads is 1/(2^4) and the probability of all (ie, 2) heads is C(5,2)/(2^4)

There are 32 cases. In 16 we will remove 3 tails. In those cases we will be left with

TTTTT
TTTTH
TTTHT
TTTHH
TTHTT
TTHTH
TTHHT
TTHHH (not this time)
THTTT
THTTH
THTHT
THTHH (not this time)
THHTT
THHTH (not this time)
THHHT (not this time)
THHHH (not this time)
HTTTT
HTTTH
HTTHT
HTTHH (not this time)
HTHTT
HTHTH (not this time)
HTHHT (not this time)
HTHHH (not this time)
HHTTT
HHTTH (not this time)
HHTHT (not this time)
HHTHH (not this time)
HHHTT (not this time)
HHHTH (not this time)
HHHHT (not this time)
HHHHH (not this time)

The 16 cases where we remove tails:
TTTTT
TTTTH
TTTHT
TTTHH
TTHTT
TTHTH
TTHHT
THTTT
THTTH
THTHT
THHTT
HTTTT
HTTTH
HTTHT
HTHTT
HHTTT

We know that we have one of these distributions.

After removing 3 tails:
TT
TH
HT
HH
HT
HH
HH
TH
HH
HH
HH
HT
HH
HH
HH
HH

That is, 1 with 0 heads, 5 with 1 head, 10 with 2 heads, probabilities of 1/16, 5/16 and 10/16, corresponding to the calculations at the top of this comment.

Corrections: I reversed notation in the first comment, above: C(101,h) and C(101,0)

  jrshipley wrote @

You wrote: “This experiment is equivalent to tossing 101 coins, and then identifying which side of the binomial distribution we are on.”

I agree, and have from the start.

I think that the only thing we don’t yet agree is that the solution using Bayes’ Theorem is correct. But the excellent news is that we are on the verge of agreement! With five coins I get:

P(q|p) = P(p|q) * P(q) / P(p)
P(p|q) = 1, so
P(q|p) = P(q) / P(p)

P(q) is 1/2^5
P(p) is a little tougher. Let S be any set of three numbers less than five–wolog, say that it is the first three, leaving the sequences:

(a) TTTTT
(b) TTTTH
(c) TTTHT
(d) TTTHH

What are the chances that we get <S, tails> given each of these sequences? (a) 3/5 * 2/4 * 1/3 = 1/10, (b) 3/4 * 2/3 * 1/2 = 1/4, (c) same as b 1/4, (d) 1 because S is the only set we can get. So, to calculate P(p) take the sum of the products of the unconditional probability of each sequence that allows <S, tails> as a possibility and the probability of <S, tails> given each. That is,

P(p) = 1/32 * (1/10 + 1/4 + 1/4 + 1)
= 1/20

P(q|p) = P(q) / P(p)
= (1/2^5)/(1/20) = 20/2^5 = 10/16.

Also, since P(r|p) = 3/5 * 2/4 * 1/3 = 1/10. We get:

P(r|p) = P(r|q) * P(r) / P(p)
= 1/10 * (10/16) = 1/16

You can confirm that the other value agrees if you please.

So, I don’t think we disagree at all on what the correct conclusion is. I take your point to be a good one that there are other ways to get to the conclusion. You might be correct that from a combinatorial probability theory point of view I drastically over-complicated things. As I’d indicated, I need to sharpen up on some of that stuff and perhaps it was dullness lead me not always to follow you right off, but I still think that Bayesian analysis of the puzzle nicely brings out the epistemological point that you have to update on the total evidence. Like I said, I was bewitched by the gambler’s fallacy objection for a while and was interested in how the line of reasoning that leads one to allege that the correct answer commits the gambler’s fallacy goes wrong. I think it goes wrong precisely by not updating on total evidence.

  jd2718 wrote @

These things bother people. Look back at this simple (?) question, from the first Carnival of Mathematics.

Simple combinatorial probability is hard.

(but I see you’re more a logic sort of guy, right?)

Jonathan

  jrshipley wrote @

“Simple combinatorial probability is hard.”

True. Usually I can cook up the right expression just by thinking it through, but I always worry that I’ve got “n!” where I needed “(n-1)!”, or some other incorrect detail of that sort.

The answer to the question you linked to is (I’m reasonably confident) 1/6 and not 2/11. You get 2/11 if you don’t want to “double count” the outcome 4-4. I think it should be double counted, however. The information you have is p=”one of the die landed 4″. The justification for double-counting is that there’s two states of affair that could be the truthmaker for that proposition, one for each die. You should double count 4-4 because the following states of affair are distinct: (a) dice1 is the truthmaker for p and dice2 landed 4, (b) dice2 is the truthmaker for p and dice1 landed 4.

Or, if you don’t like distinguishing the sof (a) and (b) on the basis of which dice is the truthmaker, you could look at it this way using standard instantiation rules for first order logic.

You’re given: There exists x s.t. x is one of the two dice that was rolled and x landed 4. Instantiate the variable x to an instantial constant a. This gives: a is one of the two dice that was rolled and a landed 4. By instantiating this way we’ve basically screened off any other possible outcome for a. There are six possibilities for the other die that was rolled and is not =a. One of those possibilities makes the sum equal 7. So the probability is 1/6. By not double-counting the outcome 4-4, one basically is instantiating the variable in the information you’re given to both die, and that’s bad.

But then, I am indeed more of a logic sort of guy so I would come up with an answer that makes it look like combinatorial probability puzzles can be solved by close attention to things like truthmakers, states of affair, instantiation rules, etc. ;-) I think that the commenters that pointed out that the lecturer is inconsistent in double-counting reflections make roughly the same point but in a less logicky way.

  jd2718 wrote @

Like I said, hard stuff. Roll two dice. Look at both of them. Announce that there are 11 possible outcomes.

Finding a simple restatement is necessary.

Verifying thought experiment: I roll 2 dice 36 times. Each time I see at least a 4, I announce it, and we record the total. We get a perfect distribution. 11 times I will see a 4, and the totals will be 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10.

The act of listing stuff (I know, very arithmetic-ky, not very theoretical) tends to clarify many more difficult issues.

Jonathan

  jrshipley wrote @

When you see 4-4, do you “see at least a 4″ once or twice? It seems to me that there’s a deep epistemological and logical question about just what it is to “see” a quantified proposition, as opposed to a singular proposition. I would hasten to distinguish “seeing” from “seeing that”. What we “see” are ordinary objects (tables, chairs, etc.). What we “see that” are propositions: in this instance the proposition that there is at least on 4 rolled. Propositions are rather more abstract than tables, chairs, etc. (and hence more apt to be left off of lists, unless one is theoretically careful!).

When I see 4-4, I see two truthmakers, two concrete objects, for the proposition “at least one 4 was rolled”. Hence, I’m willing also to say that I see that there is at least one 4 not once but twice when I see 4-4. First, I look at one of the die and see 4. I announce: “I see that there is at least one 4″. Then I look at the other die and announce for a second time: “I see that there is at least one 4.” That seems right to me. Still, I admit that I’ll have to think about this some more.

  jd2718 wrote @

Roll the dice 36 times. Show how your probability follows.

Your double announcement is clearly not part of the problem statement.

Small numbers are nice. They let us test our theory.

There is ambiguity: does he mean exactly one 4, or at least one 4? But that leads to probabilities of 1/5 and 2/11, not 1/6.

Jonathan

  jrshipley wrote @

For the record, the point I was making about “double announcement” was supposed to be part of how I was thinking about the solution to the problem. I don’t think I indicated it was part of the problem itself. Still, I do see your point, and I’ll think about it more; I sort of fired off my first impression before, and it’s at least epistemically possible to me that I’m confused on this.

BTW, have you ever seen the “sleeping beauty” problem? That one’s a real doozy.

  jd2718 wrote @

I haven’t seen it. Can you put it here? Or do you have a link?

  jrshipley wrote @

“Some researchers are going to put you to sleep. During the two days that your sleep will last, they will briefly wake you up either once or twice, depending on the toss of a fair coin (Heads: once; Tails: twice). After each waking, they will put you to back to sleep with a drug that makes you forget that waking. When you are first awakened, to what degree ought you believe that the outcome of the coin toss is Heads?”

–Adam Elga, “Self-Locating Belief and the Sleeping Beauty Problem” [PDF]

Have fun. I lean toward defending halfing, but really go in circles on it. (Otherwise I might have posted my view on it by now). There’s a bunch of posts on the problem on “wo’s weblog” (see my blog roll). It’s (maybe) more of an epistemological problem than a pure probability theory problem.

I’m still puzzled by the 1/6 vs 2/11 problem, even given the resolution of the ambiguity to “at least one”. I definitely see your point, but look at it this way. Suppose we put opaque tape over all the faces of one out of two dice and roll them both. Suppose the one without tape lands 4. We know that at least one landed 4. We don’t know that exactly one landed 4 because we don’t know how the other landed until we peel off the tape. What are the chances that they sum to 7? Seems like 1/6, the chance that the other die landed 3, right? Your reasoning to 2/11 makes sense, but this way of reasoning to 1/6 makes sense too. So, color me befuddled for now.

  jd2718 wrote @

1/3 vs 2/3

Your new experiment, by choosing which die shows 4, has changed the experiment. (And in fact the probability of a sum of 7 is now 1/6)

Color one die black, one red. I tell you that the black shows 4 (your experiment), we are left asking for the probability that the red shows 3.

But in the original, we don’t name the dice. One shows 4 (at least one, or exactly one, we should have defined it), but in either case, we don’t know which one is being referred to. Our sample space is reduced to 10 or 11 outcomes, and we want 2 of them.

Jonathan.

You should google the Monty Hall problem if you don’t already know it (I think they used it in 21)

  jrshipley wrote @

Ok, color one die red and one black. I’ll take the die and roll them so that I can see them and you don’t. I will flip a coin to determine whether I tell you the number on the black (heads) or red (tails) die, again without showing you. This way, you don’t know anything about the identity of the die that I don’t tell you. Let n be the number on the flip-determined die. I say “At least one toss landed n. What is the chance that the sum of the two die is n+3?” You say? Surely, it is not changing anything essential about the example for the die to have colors and now you don’t know the name or identity of the die that makes true the proposition “At least one toss landed n”.

  jd2718 wrote @

But you are only looking at one die. That’s no longer the same question. 6 times out of 36 you will tell me about a 4, but an additional 5 times out of 36 you will ignore a 4.

Jonathan

  jrshipley wrote @

I look at both die. The black die has number n. The red die has number m. You see neither die. I flip a coin, which you do not see. If the coin lands heads (indicating black), I say “At least one toss landed n. What is the chance that the sum of the two die is n+3?” If the coin lands tails (indicating red), I say ““At least one toss landed m. What is the chance that the sum of the two die is m+3?”

  jd2718 wrote @

These sample spaces are sufficiently small that you can list them and solve each problem by inspection. Match the actual solutions against your theoretical ones, and try to discover why your predictions do or do not match reality.

It’s too easy to self-correct, but it takes pencil and paper.

If there’s anything you can’t make match up, let me know. I’d be happy to help.

  jrshipley wrote @

Like I said, I get your point. I was trying to get across to you that there’s considerable force behind the other answer. Making lists helps, but one needs to know what one is listing and what to include in the list. Why didn’t you make your list like this?

At least one is 4. So the remaining possible outcomes are:
4-1
4-2
4-3
4-4
4-5
4-6

You want to go on to list 5 more states. The point of the setup I gave in my last reply to you was to press you to say why. BTW, I think that there is an ambiguity in the problem but that the ambiguity isn’t between “at least one” and “exactly one”. So, what do you think about the way I posed it my last reply, with the red/black die and the coin?

Here’s a related question to which I’d like to know your answer. Two coins are flipped. At least one landed H. What is the chance the other landed tails? Using an approach exactly analogous to yours on the dice, the outcomes are:

HH
HT
TH
TT

So do you say 2/3?

  jd2718 wrote @

Yes. And it gets worse.

Roll two dice. I ask, do you see a 6? You say yes. What is the probability of doubles? But if you say no, what is the probability of doubles? And how do these two answers jive with the probability of doubles if I can’t hear your answer?

Jonathan

  Solutions: consecutive dice « JD2718 wrote @

[...] is nothing new. But a discussion at If-Then Knots put it in my mind. Then when the Carnival of Mathematics #46 at Walking Randomly linked to Tanya [...]

  Puzzle: consecutive dice « JD2718 wrote @

[...] is nothing new. But a discussion at If-Then Knots put it in my mind. Then when the Carnival of Mathematics #46 at Walking Randomly linked to Tanya [...]

  jrshipley wrote @

Following your links here and reading your replies in this thread has lead me to the following conclusion. 2/11 is correct. You get 1/6 if you assume more information than is given, specifically if you assume that the report you receive was generated in some specific way, but that is to assume more information than you are strictly given. That is, I think Khovanova nails the analysis of the puzzle for the most part except for saying that the problem is not well-defined. It is well-defined and 2/11 is correct; you get 1/6 only by adding assumptions that are not given.

The assumption that is added is not an assumption, however, about what is named or looked at. Rather it is an assumption that the present report is the result of a process that yields a report of similar logical form for any given roll. If you make that assumption it is natural to also assume that the process randomly selects one of the two dice to report whenever they’re non-identical. These assumptions assign a probability to the proposition that the report was “at least one was a 4″ that is otherwise not given. If a probability that one receives the report “at least one was a 4″ is not given then the correct answer goes on the basis of the contents of the report alone.

Notice how this puzzle complements the original one that I posted. In my original puzzle you get the wrong answer by not realizing that you do have information about how the report was generated. In the 2/11 v. 1/6 puzzle you get into trouble by assuming in one way or another that you have information about how the report was produced that you do not in fact have. Lesson learned: pay very close attention to whether or not you have information about how a report was generated.

Neat puzzle, had me geeked for a few days. Also, very nifty for showing how logical instantiation rules need to be made to play nice in probability contexts. It is now clear to me that my initial response shows exactly why one must not resolve a probability of the form P(p|r), where r is an existentially quantified proposition, by solving for P(p|r’) where r’ is an instantiation of r. This should not have been surprising since instantiation rules generally do come with restrictions.

  jd2718 wrote @

And in the end, the low level stuff (counting) clarified theory, which then can be used effectively much more broadly. Nice.

  jrshipley wrote @

The justification for double-counting on the basis that it there is a distinct state of affair for each truthmaker of the general proposition, each of which must be counted, amounts to a very strong assumption. What could make it determinate that one or the other dice was related uniquely to the assertion of the general proposition “at least one was 4″? Well, it could be that the report depended on the outcome for that die in particular for some reason (e.g., in the red die/black die case a coin toss chooses which is reported).

In the 2/11 vs. 1/6 problem the values are very close together and that makes it harder to get one’s intuitions straight, but the strength of the sort of assumption that is made in giving the answer 1/6 is shown in the contrast between the following two questions. A coin is tossed 100 times:

(1) 99 numbers out of 100 were randomly selected, and every one of those numbers landed T. What is the chance that the other landed H?

(2) At least 99 out of 100 coins landed T. What is the chance that the other landed H?

The answer to (1) is 1/2. The answer to (2) is 100/101. These can be figured out by counting up frequencies, as you suggest, and that shouldn’t be hard to confirm for oneself. Using Bayes’ Theorem is the hard way, but just for kicks. . .

p = “exactly one coin landed H”
q = the info expressed in scenario (1)
r = the info expressed in scenario (2)

P(p|q) = P(q|p) * P(p) / P(q)

P(q|p) = 99!/100! = 1/100
Why? Assuming p, one toss landed H. So, the chance of drawing 99 numbers corresponding to tosses that landed is just the chance that you don’t draw the number corresponding to the single H in 99 consecutive draws.

P(p) = 100/2^100
Why? This is just the chance of getting exactly one H.

P(q) = 1/2^99
Why? This is just the probability that the selected numbers all landed T.

P(q|p) * P(p) / P(q) =
[1/100 * 100/2^100] / [1/2^99] =
[1/2^100] / [1/2^99] =
2^99/2^100 = 1/2

That’s of course a fancy way to get the obvious. Now for P(p|r)

P(p|r) = P(r|p) * P(p) / P(r)

P(r|p) = 1
Why? If exactly one landed H then at least 99 landed T.

P(p) = 100/2^100
See justification above.

P(r) = 101/2^100
Why? r basically a disjunction of 101 distinct sequences (viz. the 100 single H sequences and the 1 all T sequence), each of which are independent. Take the sum of their individual probabilities.

P(r|p) * P(p) / P(r) =
[100/2^100] / [101/2^100] = 100/101

  Logic and Mathematical Method « if-then knots wrote @

[...] 11, 2009 · No Comments In the comments to my post Follow-up on “A Probability Puzzle” Jonathan of jd2718 posed another probability question that I answered incorrectly and somewhat [...]

  The Second Ace « if-then knots wrote @

[...] out this post at Choice and Inference if you liked my earlier posts on probability puzles (here, here, and here).  The puzzle is given as a possible counterexample to reflection for credences, but is [...]


Your comment

HTML-Tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>