One of the groups I belong to on LinkedIn posted an interesting problem that was published in a New Scientist article on the Gathering for Gardner meeting. The problem goes like this:

I have two children.

One is a boy born on a Tuesday.

What is the probability I have two boys?

Can the fact that you were told that one of the boys was born on a Tuesday tell you anything about whether both children are boys?

Indeed it can!

You can go to the end of the New Scientist article to see how to solve the problem by enumerating all the possible cases. However, if you want to see how to solve it using Bayes’ Theorem, stay right here.

We want to compute the probability that both children are boys given that we know that one child is a boy born on Tuesday and the other child’s sex and weekday of birth are unknown:

P(B1 ^ B2 | (B1Tu ^ S2W2) v (B2Tu ^ S1W1))

where B1 ^ B2 represents that they are both boys.

B1Tu ^ S2W2 represents that child #1 is a boy born on Tuesday and the sex and weekday of child 2 is unknown, and similarly for the last term.

Use Bayes theorem to flip the context around…

This gives us

P((B1Tu ^ S2W2) v (B2Tu ^ S1W1) | B1 ^ B2) * p(B1 ^ B2) /

P((B1Tu ^ S2W2) v (B2Tu ^ S1W1))

This is in the form AB/C, we will handle C first using the sum rule.

P((B1Tu ^ S2W2) v (B2Tu ^ S1W1)) = P((B1Tu ^ S2W2)) + P((B2Tu ^ S1W1)) – P((B1Tu ^ B2Tu))

Its the fact that the OR is not disjoint that makes this tricky.

Now continue to decompose each of the three terms using the product rule…

P((B1Tu ^ S2W2)) = P(B1Tu) P(S2W2) = (1/2*1/7)(1) = 1/14

P(S2W2) = 1 since the child has a gender and was born on some day of the week. Technically one can just marginalize over S2 and W2.

Similarly

P((B2Tu ^ S1W1)) = P(B2Tu) P(S1W1) = (1/2*1/7)(1) = 1/14

and

P((B1Tu ^ B2Tu)) = P(B1Tu)P(B2Tu) = (1/14)(1/14) = 1/(14)^2

We now have for the denominator

C = 1/14 + 1/14 – 1/(14)^2 = 27/(14)^2

Now on to the numerator A

P((B1Tu ^ S2W2) v (B2Tu ^ S1W1) | B1 ^ B2)

It decomposes similarly

P((B1Tu ^ S2W2) | B1 ^ B2) + P((B2Tu ^ S1W1) | B1 ^ B2) – P((B1Tu ^ B2Tu) | B1 ^ B2)

For the first term:

P((B1Tu ^ S2W2) | B1 ^ B2) = P(B1Tu | B1) P(S2W2 | B2)

Lets break this down more carefully

P(B1Tu | B1) = 1/7

P(S2W2 | B2) = 1, since the boy had to be born on one of the seven days (marginalization again).

So

P((B1Tu ^ S2W2) | B1 ^ B2) = 1/7

The second term is by symmetry

P((B2Tu ^ S1W1) | B1 ^ B2) = 1/7

The last term is

P((B1Tu ^ B2Tu) | B1 ^ B2) = P(B1Tu | B1) P(B2Tu | B2) = 1/7 * 1/7 = 1/(7)^2

So we have for the term A

A = 1/7 + 1/7 – 1/(7)^2 = 13/(7)^2

Last we have B = p(B1 ^ B2) = P(B1) P(B2) = 1/2* 1/2 = 1/4

The numerator is then

AB = 13/(7)^2 * 1/4 = 13/(14)^2

All together

P(B1 ^ B2 | (B1Tu ^ S2W2) v (B2Tu ^ S1W1)) = 13/(14^2) / 27/(14^2) = 13/27

Not quite as easy as enumerating cases, but far easier that designing a Bayes net.

As I mentioned above the same result can be obtained by counting all the possible cases.

This is far from the 1/3 probability that we would have obtained had we been told that one child was a boy. If 13/27 was intuitively obvious to you, you are far better than me. We are pretty poor at working with probabilities, which is why we are so easily fooled by mis-represented statistics. The fact that we are told that one child is a Boy born on Tuesday does provide extra information, and surprisingly this information can assist you in inferring the probability the other child is a boy as well. Here we see that it is almost a 50% chance that the other child is a Boy! Being told that the Boy was born on Tuesday implies that the person may very well have had a choice of which Boy to talk about. This little piece of information changes the probability that the other child is a Boy by about 16%.

Exercise:

Show that had you been told that one child was a Boy, then the probability that the other child is a Boy is 1/3.

You might enjoy reading:

Enjoy,

Kevin

Your homework exercise is a nice one because it is the simplest possible version of this problem that captures the essence.

What if you created a Markov chain for parameters S_1 and S_2 that could each take on either the value G or the value B. Further, P(S_1=G) = 1/2, P(S_2=G)=1/2 and P(S_1,S_2) = P(S_1)P(S_2). Now you condition on S_1 = B, so you only keep those samples for which S_1 = B. I claim that in the samples you keep, half of them will be S_2 = B and half will be S_2 = G.

Does this contradict your claim that the probability that the other child is a boy is 1/3? If not, why not? And if so, what’s the resolution?

If you have been told that one child is a boy, the question is ambiguous. The answer depends on why that particular fact, among the many that could apply to a family, was chosen.

Start with three possible family descriptions: two boys, one boy, and no boys. Call them B2, B1, and B0. The ideal probabilities for each (the real world does not match the ideal) are 1/4, 1/2, and 1/4, respectively. Then apply Bayes’ Theorem based on a full analysis of the terms that go into it.

1) If the fact was chosen as an answer to the question “Is one of the children a boy?”, then P(“yes”|B0)=0, P(“yes”|B1)=1, and P(“yes”|B2)=1. The answer is:

P(B2)*P(“yes”|B2)/[ P(B2)*P(“yes”|B2)+ P(B1)*P(“yes”|B1)+P(B0)*P(“yes”|B0)]

=(1/4)/[(1/4)*(1)+(1/2)*(1)+(1/4)*0)=1/3.

2) If the fact was chosen as an answer to the question “What is the gender of one child?”, then things are different. Half of the time, a B1 family will say “girl.” P(“boy”|B0)=0, P(“boy”|B1)=1/2, and P(“boy”|B2)=1. The answer is:

P(B2)*P(“boy”|B2)/[ P(B2)*P(“boy”|B2)+ P(B1)*P(“boy”|B1)+ P(B0)*P(“boy”|B0)]

=(1/4)/[(1/4)*(1)+(1/2)*(1/2)+(1/4)*0)=1/2.

Personally, if I had to assume either, I’d assume #2. Nothing suggests that boys are preferred in the way #1 requires, and #2 applies in other, more general cases. Like if it was a fact that was observed after the family was picked, and not required to pick the family.

When you add “born on Tuesday,” things get even stranger. Why would you assume that the fact was an answer to such an arbitrary question as “Is one of the children a boy who was born on a Tuesday?” It is far more natural to assume the fact was whatever truthfully applied to one child. And then, the answer is still 1/2. Which is why everybody finds 13/27 so unintuitive.

In Response to the comment by Lloyd Knox:

This is an excellent question. The resolution rests on a very subtle, but very important point. As the person making the inferences (by running an MCMC simulation), you do not know which child the person is referring to.

In your example, you have selected child #1 as the child the person is considering, which is a very different problem.

One way to consider this is to look at the possibilities that your MCMC simulation produces: GG, BG, GB, and BB. The GG case is always thrown out. The cases BG, GB, and BB are always accepted as they satisfy the statement that one child is a boy. The case where both children are boys occurs 1/3 of the time. Extension to the boy born on Tuesday is similar, but with many more cases.

In response to the comment by JeffJo:

Its not that the question is ambiguous. There is no question. Only a statement.

When solving an inference problem, you must use only the information at hand—not the information you want (sounds like a Donald Rumsfeld quote). You are simply informed that “one of the children is a boy”. You do not know which child.

There are two ways to proceed with this problem. Solve the problem at hand, which is what I illustrated. Or expand the problem by considering why you were provided the information that you have, rather than some other information. If the information came to you by means of a person informing you, you might consider the intention or motivation of that person. If you know something about that person already, this knowledge could be helpful. However, this changes the problem.

Keep in mind now that this is a puzzle. And one (of the many) purpose(s) of a puzzle is to educate. By changing the problem, you lose the opportunity to learn something.

In this case, what you are learning is that *any* information about the child improves your inference as to whether both children are boys. I found this to be quite shocking, especially since the information that the child was born on Tuesday is at first glance irrelevant. I will discuss this in another post, since it is worth the elaboration.

thanks for the reply. i want to tell you a somewhat funny story of how i figured it out on my own. the night i made the post (to which you just replied), in a fit of desperation to figure out what was going on, i decided i would run my own monte carlo by flipping coins. but i had no coins (was in a hotel room, not at home) so just started doing a thought monte carlo, and thinking through the monte carlo process actually led me to find my error.

Sorry that it took me a year to reply! I am glad that you figured it out. It is a maddening problem, but satisfying once you really tear it apart. I posted an update just after replying to you if you are interested.

53% of all live births are male, so I was thinking that it would be > 50% because each of two children is 53% likely to be male. Still not sure how the Tuesday fits in, since I did not see in my quick scan of the answer anything to do with that. I guess it is like the Monte Hall problem, right?

More male children die earlier than female (less hardy) so by age 10 the numbers are equal and always after that there are more females. They should not be called a “minority”, since that is false. And when we take the phrase “women and minorities”, that is the vast MAJORITY of people, so I see nothing for them to whine about. Maybe they never learnt math, so that is why they are convinced that men are more powerful?