Last year (wow…time flies), I posted a solution to the Two Child problem using Bayes theorem. If you are unfamiliar with this problem, you may want to read that post first.

There has continued to be discussion on this topic on the LinkedIn group where I was originally introduced to it. One of the comments to my previous post summarizes many of the issues that were brought up.

Let me summarize:

One of the objections is that you have to consider why the person is providing this information. Knowing something about why you were provided the information you have and why you were not provided information you don’t have can certainly be used to improve your inferences.

However, without this additional information, you have two choices: (1) do nothing but worry about what would happen if you did have the additional information, or (2) proceed to make an inference based on the information you *do* have.

Many times when solving a problem, I wish that I had more information. But then I am reminded of the words of my grandmother, “Wish in one hand and spit in the other, and see which gets full first!”

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

As described above, there are two ways to proceed with this problem. Solve the problem at hand, which is what I illustrated previously using Bayes Theorem. 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. So let’s focus on the puzzle that was posed and resist temptation to consider variants. In my own personal experience, I find such temptations to indicate the fact that I don’t know how to solve the puzzle that was presented to me.

What I showed in the previous post was that if you know that a person has “two children at least one of whom is a boy” then the probability is 1/3 that both are boys; whereas if you know that a person has “two children one of whom is a boy born on a Tuesday” the probability that both are boys changes to 13/27.

What we learn 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.

In the solution using Bayes theorem, you can see that this information about the day the child was born *does* indeed affect your inferences by coming in via application of the sum rule where you subtract off a term that involves the possibility that both children were boys born on Tuesday. This makes sure that you do not double-count that particular case.

In fact, the more unlikely that case (both being boys born on Tuesday), the more distinguishable the children are from one another.

One can now easily see that *any* information that enables you to distinguish one child from the other will improve your inference. Let’s take a closer look at the problem from this perspective by considering several different states of knowledge and the probabilities that a rational agent would infer that both children are boys. I will denote this probability by Prob(BB) and leave proofs to the reader.

“I have two children” Prob(BB) = 1/4
“I have two children at least one of whom is a boy” Prob(BB) = 1/3
“I have two children at least one of whom is a boy born on a Tuesday” Prob(BB) = 13/27
“I have two children, and here in front of you is my son Bob” Prob(BB) = 1/2

In the least informed case, you only know that the person has two children, so the probability that you would expect both to be boys is 1/4. In the most informed case, where you meet one of the children, the probability that both are boys is equal to the probability that the other un-met child is a boy (1/2). As you start from the information that there are two children and learn more and more about the children, the probability that both are boys changes from a minimum of 1/4 to a maximum of 1/2.

Focusing on the puzzle rather than being distracted by all the other puzzles you could have been solving enables you to learn something from it. Here we find that this puzzle is about the problem of distinguishability versus indistinguishability. And we see that it is not at all trivial.

Tagged with:
 

Automatic Graph Paper Generator

On November 3, 2010, in Practical, by admin

Today I needed a sheet of graph paper with centimeter squares, and I stumbled upon this site:

Free Online Graph Paper

You can choose among an extremely wide variety of types and there is an applet that lets you specify some of the design parameters. The result is a pdf that you can save.

Very convenient!

Tagged with:
 

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

Tagged with:
 

Bad Behavior has blocked 6 access attempts in the last 7 days.

Content Protected Using Blog Protector By: PcDrome.