Suppose I ask the following question: What are the chances of flipping heads 50 straight times? Most numerate people will be able to answer that it is 1/250. So, suppose I ask the following question instead: What are the chances of flipping heads on all of the even tosses in 100 tosses? Well, it’s the same. It’s still 50 tosses after all. Now how about this: What are the chances of flipping heads on all of the even tosses in 100 tosses given that all of the odd tosses were tails? Maybe this question gives a bit more pause, but the answer is again the same: 1/250. The outcome of each toss is independent of each other toss, and in particular the outcomes on the even tosses are not influenced by the outcomes of the odd tosses. There is some temptation to think that the respective outcomes are not independent, but it is in fact a familiar fallacy known as the gambler’s fallacy to think so. Let us not commit the gambler’s fallacy. The probability that all of the even tosses in 100 tosses landed heads given that all of the odds landed tails is 1/250.
Now imagine the following slightly more complicated scenario. I tell you all of this. I’m going to go in the other room and flip a coin 100 times. I’ll keep track of how each flip comes out, generating a list such as the following: 1H, 2H, 3T, etc. If more than half the tosses are heads then I’m going to randomly select 50 of the numbers that came up heads and tell you that they came up heads. If more than half of the tosses are tails, I’ll do the same for tails. If it’s exactly 50:50 I’ll pick heads/tails at random and give you those 50 numbers. If I do this I will come back with some random collection of 50 numbers from 1-100 and tell you either that the coin landed heads on all of those tosses or that the coin landed tails on all of those tosses.
Suppose I go into the room and when I come back I tell you that the coin landed tails on all of the odd tosses. What are you to say about the probability of it having landed heads on all of the even tosses? Perhaps you will say this: “Let us not commit the gambler’s fallacy. The probability that all of the even tosses in 100 tosses landed heads given that all of the odds landed tails is 1/250.” I wouldn’t blame you if you did, but in your eagerness to avoid the gambler’s fallacy you will have given the wrong answer. Why?
Well, for starters look at it this way. What I’ve done when I went into the other room and what I’m asking you when I get back is essentially equivalent to the following procedure. Suppose I flip 100 coins and they’re all laying right there on the table in front of us both. Now we figure out whether there are more heads or more tails and pick up 50 of the one of which there are more. Of what’s left, won’t it be likely that most of them are the opposite of whichever we picked up? Of course it will, because there are many, many ways you can get a 50:50 split and only one way to get all heads or all tails.
I was convinced all weekend that the preceding was the correct way to think about the problem, but I couldn’t quite pin down what was wrong with the hasty attempt not to commit the gambler’s fallacy. After all, just thinking about the situation where I come back and tell you that all of the odd tosses were tails, and just think about the remaining tosses. There’s 250 ways they could come out and only one of those ways is all heads, just like only one is all tails. Furthermore, if you’re tempted to think that the remaining tosses are more likely to be mostly heads than mostly tails there’s a ready diagnosis of your mistake in the gambler’s fallacy. I spent a good part of the weekend suspecting I might be in the grips of the gambler’s fallacy because I could not quite put my finger on where the reasoning that leads to the wrong conclusion goes wrong. Of course, I could find nothing wrong with the correct reasoning either.
Finally today I hit upon the diagnosis of where the wrong reasoning goes wrong. If you start thinking that the data is only that all of the odd tosses were tails you have left something out. The data, completely characterized, is that a random selection of numbers from the tosses that landed tails yielded all of the odds. Now consider the two following hypotheses: (H1) All of the tosses were tails, (H2) Only the odds were tails. Given (H1) how likely is the report you receive after I return? Well, it’s pretty unlikely. It’s equal to the probability of randomly drawing all and only the odds on 50 draws of numbers from 1-100 (without replacement). On the other hand, given (H2) the report is certain. This insight is the core of a Bayesian analysis to show that (H2) is much more probable on the data than (H1), though the details will have to wait for another post.
The problems statement is not easy to read.
1. Why are you asking me about the odd ones? When we run this game a bunch of times, will you be asking me about the odd ones each time? Or are you asking about the 50 that have not been selected?
2. I will assume that there are 100 tosses, and that you remove 50 of one or the other, choice being made by how many of each, or made randomly in the 50-50 case.
So, we can arrive at 0 tails in two distinct ways. Either we started with 0 out of 100
or we can start with 50-50, and half the time get 0 tails 
What’s more interesting is how the probabilities of different numbers of tails change — for all but one number of tails.
Jonathan