Wednesday, May 26, 2010

I was born on Wednesday

Probability is a tricky thing. There are a lot of nonsensical answers to be had. I just read an article about the recent Gathering for Gardner meeting that took place. Gathering for Gardner is a unique meeting for mathematicians, magicians and puzzle makers where they get together and talk about interesting things. The meetings were inspired by Martin Gardner, one of the awesomest dudes of our time, who unfortunately just passed away.

The question put to the floor was the following:
"I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?"

Think about that for a moment. Not too hard though. The answer turns out to be surprising. Upon reading the question, I thought about it for a long time and managed to confused myself entirely. Thinking I had gone crazy, I wrote a little python script to test the riddle, which only left me more convinced I had gone insane. I've spent most of the night thinking about it, and after making it half way to crazy, I've come around and am momentarily convinced the puzzle makes perfect sense.

I'm going to attempt to convince you it makes perfect sense, but I plan on doing it in steps so as to reduce the bewilderment.



Playing Cards


Forget the question. Lets play a game of cards. You shuffle a deck and deal me two cards:

I accidentally flip one of them over.

Whats the probability that my other card is red?

Well, that ones easy, its about half.

Sure, its not exactly a half, knowing that the deck is finite and that the draws are done without replacement, knowing that the card showing is a red one means that there are only 52/2 - 1= 26 -1 = 25 red cards out of a deck of 52-1 = 51 cards giving a probability of 49%. But its basically a half.

Lets do over, deal me two cards:

Darn, I flipped one of them over again:


Whats the probability that my other card is red? About a half still.* (*Sure, this time its really 26/51 = 51%).

Nothing mysterious going on.

Do over again. Deal me two cards:

This time I'll ask a little trickier question. Whats the probability that both my cards are red? Ah, well its about 1/2 * 1/2 or about 1/4 = 25%. (The real answer is 24.5%)

Alright smarty pants. Whats the probability that I had a red card and a black one? Well, that ought to be about 1/2 (Real answer 51%).

All in all, I could have a red card, then a black one (RB), or a black one, then a red one (BR), or a red one then a red one (RR) or a black one then a black one (BB). 4 distinct possibilities, each of which are equally likely, so the above two answers make complete sense. There is only one way in four to get both red cards, but two ways out of four to have both a red and a black.

So far so good.


Lets ask a different question. Now I'm going to get a bit obtuse. You deal me two cards. Now you ask me.
Hey Alemi, do you have a red card?

Meaning, do I have at least one red card. I respond, "Yes."

Now, go with your gut. You know I have at least one red card. What do you reckon the color of the other one is?

Probably black you say? You'd be correct. Looking at our breakdown above, I could have gotten RR, RB, BR, or BB as my cards dealt. Each was equally likely, but now you know something else. You know that I have at least one red card, so we only have three possibilities left, I either have RR, RB, or BR. Each of which was equally likely. So whats the probability that my other card is black? About 2/3 or 67%. (Real answer: 67.5%)

Alright, same situation. You deal me two cards, I reveal that I have at least one red one. Whats the probability that my other card is red? Well, obviously 1/3 or 33% (Actually 32.5%) since this is the opposite question to the one directly above, and follows from the same reasoning.

Fine. No problems. All of this makes sense.

Offspring


Instead of playing cards, lets return to offspring. Lets first look at a classic probability riddle.

I have exactly two children. At least one of them is a boy. What is the probability that the other one is a boy?

If I were to give you this question straightaway, most people would have said the probability would be a 1/2. Their reasoning being that boys and girls are equally likely. But having just led you through the playing cards, hopefully now it makes some sense how the true answer to this question is 1/3 or 33%. Originally my family could have been BB,BG,GB,or GG. Each of which was equally likely. Telling you I have at least one boy means now we are dealing with only the situations BB, BG or GB, still all equally likely, making the probability 1/3.

Fine.

Now, lets reexamine the true question at hand:
"I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?"

Is it a half? Is it 1/3? What do you reckon? At first thought, it seems like the Tuesday bit shouldn't enter into it at all, but on second thought, I've just revealed a lot more information than I did in the previous question. I've told you something specific about one of my children. This is analogous to when I accidently flipped over one of my cards, revealing not only its color but its count as well. Hopefully it makes sense that the probability ought to be much closer to a half than to a third. In fact the answer is 13/27 = 48.1%.

With a little thought, you should be able to come up with that number yourself. Otherwise, see the article I mentioned at the beginning of this post. They have a nice breakdown at the bottom.

Hopefully, at this point if you've read this far, you'd should be wondering why this question was so mysterious to begin with, and if thats the case, I did my job. If you think the question is obvious, and think it would have been obvious even without the card analogy, try and ask the boy-born-on-a-tuesday question by itself to one of your friends. I guarantee they'll be bewildered. Its a fun problem, and one that illustrates just how strange and counterintuitive probability can be.

If you want some other mind twisting mathematical puzzles, try your hand at the Two envelopes problem, or Bertrands' box paradox, or the Birthday problem, or everyone's favorite the Monty Hall problem. Remember though, try your hand at the problem before reading the answer.

Super fun bonus homework question: Lets do cards again. You deal me two cards, and I reveal that I have a red heart. Whats the probability that my other card is red?

10 comments:

  1. The gender of children are independent events so there are only three options: 0 boys, 1 boy, and 2 boys. The gender of one child does not affect the other. The date a child is born is independent of the gender.

    The probability of having a boy is P(B) = 0.5.

    The probability of having two boys is P(B)*P(B)=0.5*0.5 = 0.25.

    The probability of having a boy given you have one boy: P(B|B) = P(B AND B)/P(B) = P(B)*P(B)/P(B) = P(B) = 0.5.

    The flaw in using cards is that drawing a second card from the deck changes the probabilities: they are dependent. At the micro level sperm have some dependence upon each other since 1 spermatogonium yields 4 spermatids from the same DNA strand, but otherwise spermatogonium are independent. Especially if you're talking about children >~1 year apart then they are so far independent its not worth noting.

    ReplyDelete
  2. Hey guys, I've got two British coins, a 10p and a 50p and I've flipped them both. At least one came up as a head (The Queen, so let's call it a girl).

    What's the chance that the other coin came up as a head (i.e. a girl)?

    The answer is 1/3, right? - after all, you've seen the argument in the blog above, and my statement is exactly analogous to the one about having two children, at least one of which is a boy (let's ignore the Tuesday element, which just confuses matters).

    But wait a minute, you're making a huge assumption here. You know nothing about how I came to make my statement to you. I did indeed flip two coins. Stupidly, when they landed I couldn't find them, but a helpful friend informed me he'd found one of them and it was a head, though he didn't tell me which coin it was (10p or 50p, the younger or the older 'child'). We haven't found the second coin yet.

    So it is entirely true and fair for me to state that:
    (a) I have two 'children'
    (b) At least one of them is a 'girl'
    (c) GB BG and GG are still all possible as outcomes, where GB means older child G, younger B

    However, in this case, the chance that the other coin, when it eventually is found, is a girl is 50%. Test it out with coins yourself, if you don't believe me (replicating exactly the situation I described).

    The Tuesday-boy problem makes an assumption about the circumstances in which the statement is made which I believe is actually rather implausible. I claim the coin situation I described is a more plausible analogy. So I think that 1/2 is a better answer than 13/27, but that there is not actually a 'right' answer to the Tuesday-boy problem as posed.

    Comments welcome twitter.com/robeastaway

    ReplyDelete
  3. Colin: All three of the statements you made are true. But it is also true that "I have two boys. At least one of them is a boy, what is the probability that the other one is a boy" is 1/3 and it is also true that "I have two boys. One of them is a boy born on Tuesday, what is the probability that my other child is a boy" is 13/27. It is also true that card draws are not independent but births mostly are. But is also true that for the purpose of the article I treated card draws as mostly independent.

    Rob Eastway: Yeah, I've been racking my brain to try and figure how how this applies to the real world. The question statement is rather artificial. I mean its a little harsh to say there isn't a right answer, in the limit that I pose a well phrased mathematical question there is always an answer, the only possible contention is that my mathematical model actually doesn't replicate the kind of situation I claim it replicates in the real world.

    Now, I think you are right in that if you are in the real world, meet someone, and get introduced to their son, now the probability that their other child is a son is 1/2 effectively. Getting the probability to drop to 1/3 requires the very unrealistic scenario that you know they have exactly two children, and that least one of them is a boy, but have NO OTHER INFORMATION whatsoever about the families. This is not a situation that arises in circumstance, but it is one that I can recreate. If I parsed the US Census data for all families that have two children. Then I parsed that subset for all families that had at least one boy. Then I ask what fraction of the subset have two boys, then the answer is definitely 1/3. Similarly, parsing the Census for the boy-tuesday problem would create a circumstance where you got 48.1%, not 50 and not 33. But you're right in that its rather artificial.

    ReplyDelete
  4. @Rob Eastway: Yeah, it's really counter intuitive. The maths is certainly sound, but it does seem contrary to experience. Think of it in terms of a multiverse, the universe branching with each possibility:

    1: There are two children. You now have four possible universes in the future, one each for BB, BG, GB, GG. 0.25 probability of each.

    2: You are told one boy is a girl. You know know you're in one of three universes, BB, BG or GB. Now what are the odds of two boys? 1 in 3. It's weird, the extra information narrows down the odds.

    It's all very quantum ;) In fact, the existence of probability in mathematics is probably some weird philosophical proof of a multiverse of some description. Probably...I mean what are the odds? ;)

    ReplyDelete
  5. It appears that the problem most people have is understanding the difference between an ensemble average, and a sort of localized probability distribution. It's obvious to most people that every time you flip a coin, the probability of H is 1/2. So if you flip a coin 29 times and get H every time, when you flip it the 30th time you have a 1/2 chance of getting H. But if you repeat the experiment of 'flipping a coin 30 times in a row' many times, you'll get a very small probability of all-H.

    It's the same in this problem, only we have trouble defining what the 'ensemble' is here. Forgetting the Tuesday bit, you've got four choices in two flips: HH,HT,TH,TT. Now you have to specify what the ensemble is.

    If it is "the ensemble in which ONE of the coins is a H", that narrows it down to HH, HT, TH, and then the probability of HH is 1/3.

    IF, instead, you say your ensemble is "THE FIRST coin is a H", you're back to a 1/2 probability of HH.

    This Latter situation is actually the one Rob Eastway paints, because one can assign a descriptive marker to each of the coins. Coin#1 is "the coin that I see", while coin #2 is "the coin that's lost". So by not seeing the other coin, you're forcing yourself into that latter ensemble. And, in fact, if you repeat the experiment over and over, this becomes obvious, because you're not limiting yourself to coins that are "at least one girl", but actually just "a girl on the coin that I see", so if it so happened that there was no girl on the coin that you see, but a girl on the other coin, you'd discard it, despite it satisfying the condition 'at least one girl'.

    Essentially the confusion is in "what number to divide by". Of course anyone can count the number of HH that happened in N trials. The question is, do I divide by N (total number of trials), or the number of (N?+?N) (given A coin is a girl), or (N?) (given the coin that I SEE is a girl). All answers are equally valid, provided you define your ensemble rigorously.

    ReplyDelete
  6. So essentially the *actual question* is the tricky thing. It looks like "What are the odds of a child being a boy" (50%) but it's *actually* "what are the odds of two children both being boys, and here's a headstart" (33.3..%)

    ReplyDelete
  7. It’s perfect time to make a few plans for the longer term and it is time to be happy. 온라인카지노사이트 I’ve learn this post and if I could I wish to suggest you few interesting issues or advice. Perhaps you could write subsequent articles relating to this article. I want to learn more things approximately it!

    ReplyDelete
  8. 카지노사이트홈 Hi there, You have done a great job. I will definitely digg it and
    personally recommend to my friends. I am confident they will be benefited from this web site.

    ReplyDelete
  9. 스포츠토토티비 Great information, thanks for sharing with us… check out my service…

    ReplyDelete