## Tuesday, July 23, 2013

### The Boy or Girl Paradox: A Martingale Perspective.

Mr Smith always tells the truth.

Interviewer: Mr Smith, how many children do you have?
Mr Smith: I have two.
Interviewer: Mr Smith, do you have a son?
Mr Smith: Yes

Q1: What is the probability that Mr Smith's other child is also a boy?

This is a clean version of the boy or girl paradox. The correct answer is 1 in 3, as a simple application of Bayes' Rule establishes. Given forty families, thirty will have at least one boy. Of those thirty, ten will have two boys.

Slightly different evidence would result in an answer of 1 in 2. For example:

Interviewer: Mr Smith, how many children do you have?
Mr Smith: I have two.
Interviewer: Mr Smith, is your oldest child a boy?
Mr Smith: Yes

Q2: What is the probability that Mr Smith's other child is also a boy?

The answer to the second question is clearly 1 in 2.

The boy or girl paradox rises to the status of a controversy because many people will answer 1 in 2 in circumstances other than this as well (as pointed out by a reader - see comments below). However both Q1 and Q2 are, I think, entirely clear. The first situation results in a lower posterior probability.

Now don't ask me why I was looking at this right now but I got to wondering, is there an even easier way to see the inequality between the two answers?  Bayes Rule is pretty simple when you write it down but humans are notoriously bad at using it semi-consciously, if you know what I mean. Scanning the wikipedia explanation left me a bit unsatisfied. So here's another angle.

The Martingale Argument (Informal)

Suppose you had wagered that Mr Smith had two boys. You paid $1 and you'll receive$4 if he has two boys. It's an investment. What evidence would make you happier about your investment? Learning that at least child of two is a boy, or learning that at least one child of one is a boy? The latter is a priori less likely, and therefore better news.

Now to polish it off, note that in the former case, betting directly on Mr Smith's first answer would turn $1 into$4/3 because fair odds are 3:1 on. But had the news been bad (i.e., none of the two children were boys) our parlay would be dead in the water. Since we are betting with fair odds our wealth is a martingale. To get to $4 you we still have to have to increase your wealth threefold. So it must be that the odds of betting on two children being boys given that you already know that at least one is a boy correspond to a threefold increase in wealth. Thus the probability is 1 in 3. The Martingale Argument (Formalized) A reader has asked me to tighten the argument and relate to the martingale notion in mathematics. My title references the fact that when we face a bookmaker who offers fair odds the expected value of our wealth will not change at the moment we enter any bet with him. Our wealth is a martingale no matter what betting strategy we employ. Try as we might, we cannot win or lose money on average. A martingale is defined with respect to both a stochastic process (here our wealth) and a sequence of information sets (representing information arriving, such as whether Mr Smith has at least one boy). If $$\cal{F}_{t}$$ represents the information available to us at time $$t$$ and $$\cal{F}_{\tau}$$ the information at an earlier time then the statement that our wealth is a martingale is written: \begin{equation} \label{martingale} W_{\tau} = E \left[ W_{t} | \cal{F}_{\tau} \right] \end{equation} In general both sides of the equation are random variables but to warm up with a special case, take $$\tau=T$$ where $$T$$ is the time we learn whether Mr Smith has two boys or not, and set $$t$$ equal to the time before we know anything. Our initial wealth is not random so the left hand side of \begin{equation} W_t = E \left[ W_T | \cal{F}_{t} \right] \end{equation} is just 1. If we further assume we make an all-or-nothing bet with only two outcomes this reads \begin{equation} 1 = p W^{win} \end{equation} where $$W^{win}$$ is our wealth conditional on winning (i.e. the payout). This is just the statement that for a fair bet the payout is inversely proportional to the probability of winning. Since $$p=0.25$$ we have $$W^{win}=4$$. A somewhat more interesting use of the martingale property considers a time $$\tau$$ just after we learn some information. If we again take $$T$$ to be the "terminal" time just after we learn whether Mr Smith has two boys or not we have \begin{equation} W_{\tau}(\omega) = E \left[ W_T | \cal{F}_{\tau} \right](\omega) \end{equation} where I have emphasized that both sides are random variables. If we take an expectation with respect to $$\cal{F}_{t}$$, the information we have when we make the bet, we'll get the third inequality below: \begin{equation} 1 = W_t = E \left[ W_{\tau} | \cal{F}_{t} \right] = E \left[ E \left[ W_T | \cal{F}_{\tau} \right]| \cal{F}_{t} \right] \end{equation} Here the first equality and the second we have seen. The first is our assumption that we start with one dollar. The second equality is the martingale property. These expressions become quite trivial in the case where the first revelation of information will result in one of two outcomes and one of these outcomes is fatal for our bet (if we learn that none of Mr Smith's children are boys, or if we learn that the first child is not a boy then obviously we are out of the running). Indeed we have \begin{eqnarray} E \left[ E \left[ W_T | \cal{F}_{\tau} \right]| \cal{F}_{t} \right] & = & p^A E \left[ W_T | \cal{F}_{\tau} \right] \\ & = & p^A p^B W^{win} \end{eqnarray} where $$p^A$$ is the probability of good news and $$p^B$$ is the conditional probability of winning our bet at time $$T$$ given that we received good partial information at time $$\tau$$ (this second probability is what we are asked for). And noting the chain of equalities we therefore have \begin{equation} 1 = p^A p^B W^{win} \end{equation} and thus \begin{equation} p^B = \frac{1}{p^A W^{win} } \end{equation} My informal argument merely noted that $$W^{win}$$ is a known quantity (=4) and thus $$p^B$$ is inversely proportional to $$p^A$$. To make this explicit consider two scenarios. In scenario $$1$$ we learn that at least one child is a boy. In case $$2$$ we learn that the oldest child is a boy. Denote the corresponding probabilities of this news (good in both cases) by $$p^A_1$$ and $$p^A_2$$ respectively. Trivially $$p^A_2 = 0.5$$. On the other hand $$p^A_1$$ is the probability that at least one child out of two is a boy. This is true in 3 out of 4 cases so $$p^A_1 = 0.75$$. It follows that \begin{eqnarray} p^B_1 & = & \frac{1}{p^A_1 W^{win} } = \frac{1}{ \frac{3}{4} 4 } = \frac{1}{3} \\ p^A_2 & = & \frac{1}{p^B_2 W^{win} } = \frac{1}{ \frac{1}{2} 4 } = \frac{1}{2} \\ \end{eqnarray} Thus the answer to the first question about Mr Smith is 1 in 3, whereas the answer to the second is 1 in 2. Really it is trivial as the statement $$1 = p^A p^B 4$$ is just a statement about fair odds for a parlay bet (where the winnings from a first bet are invested in another). You can always think of the expected value of your wealth for the original bet as equal to the actual cash you hold in the absolutely equivalent parlay bet. #### 14 comments: 1. How do this have anything to do with the mathematical concept of martingales? And I must say your argument is rather elusive to me. I don't think that you proved anything. 1. Absolutely. If you always take fair bets, your wealth is a martingale. Think of your bet on there being two boys as a parlay. First, you bet on whether there is at least one boy. Then, you bet on whether there are two boys conditional on the fact that you know there is at least one 2. I've been thinking. First I'm not used to your definition of a martingale. Is it http://en.wikipedia.org/wiki/Martingale_(betting_system) ? Further your argument you assume that extra information leads to better odds, it doesn't always. What if there eg are independence between the events you are betting on? Finally it seems like you are just twisiting the usual argument using conditional probability to get the$4/3.

And to me that is the key point! You shouldn't use the conditional probability in this case, although I'm still in the process of "proving" it.

1. What I haven't perhaps emphasized enough is the notion of breaking down the one bet (i.e. that both children are boys) into a parlay (first we bet on whether there is at least one of two, and then we parlay our winnings into a second bet on whether there are two boys conditional on knowing that there is at least one of two). Rest assured my use of conditional probability is not circular.

As an aside the martingale terminology is confusing because a martingale in mathematics arises from a sequence of fair bets (by the law of iterated expectations). The martingale strategy would be one such example, were the casino fair. As most are not, the irony of the martingale name lies in the following thought experiment.

Suppose you think you have a winning strategy in a non-fair (i.e. losing) casino. Then it would be even better to use in in a fair one. But using it in a fair one results in zero gain or loss on average (your wealth is a martingale). Thus your strategy applied in a real casino must be worst than zero on average. The martingale (i.e. doubling down) strategy is just one example.

3. Most of the time (notable by Martin Gardner and Marilyn vos Savant), the problem is posed a different way. A way that is Mathematically equivalent to "I have two children, and (at least) one of them is a boy." Stated this way, the answer actually is 1/2, even though many experts will present the same solution given above.

The reason it is 1/2, is because a parent of two boys can only say "one is a boy," but a parent of a boy and a girl can also say "one is a girl." Since we can't assume that either parent is more likely to make a statement in this form, or that one who can make both statements will favor one statement over the other, we must assume that the parent of both is half as likely as the parent of two boy to make the statement "one is a boy."

It is only slightly more complicated to include the probability that a parent will choose either statement in Bayes' Rule, and the result is that the asked-for probability is 1/2, not 1/3. Martin Gardner changed his answer for this reason; vos Savant has not.

4. Interesting point. In the above we directly interrogate Mr Smith as to whether he has a boy or not. If, on the other hand, we are simply approached by a parent who volunteers the information "I have at least one X" then the situation is indeed different.

5. My point was that there are various forms of the Boy or Girl Question, and that it "rises to the status of a paradox" for different reasons than you gave. There are two plausible answers, 1/2 and 1/3, and often there are valid arguments for either.

Most arguments for 1/2 are mathematically equivalent to the one you gave for Q2, in that they identify a specific child as "the boy" that is mentioned. When a child is chosen first, and that child's gender is reported, the chances "the other" is a boy are 1/2.

The argument for 1/3 assumes (and sometimes it is explicit in the question, like in yours, tho not often) that the gender "boy" was chosen first, and that the family was interrogated about that gender. But then if Mr. Smith does have two boys, neither is "the boy" he mentioned, so neither is "the other child" you asked about in Q1.

Because you asked about "the other child," your question is ambiguous; you gave an explicit reason for choosing either answer. If the question is actually about "this boy" vs. "the other child," the answer is indeed 1/2. If it is actually about an interrogated situation, it is 1/3. Giving either answer requires one to ignore the valid logic that leads to the other. That's what causes the paradox - which valid chain do you follow, and which do you ignore?

Usually, as I pointed out, the interrogation is not explicit, making the choice between these two harder to see. The first argument is still wrong because there is no "other child," and the second is wrong because there is no interrogation. But most people will still choose one, or the other, solution. And they have confidence that theirs is "right" because they identified where the other one was "wrong." Both *solutions* are wrong, but that doesn't mean the *answer* is wrong.

1. I think you identified a valid mistake in the way I presented the source of controversy. I have cleaned it up a bit. Perhaps we now agree that the "arguments" concern whether the listener frames the question as Q1 above, Q2, or something else. However I think we might also agree that the answers to Q1 and Q2 above (I deliberately choice unambiguous wording) are uncontroversial. If there is a correct answer to vaguer forms of the question it might be the bounds thus provided.

6. This comment has been removed by the author.

1. This comment was reedited. New version is just below.

7. I still don't think that you have argued well for your argument.
It would be nice if you would describe more in detail how you define a martingale and how you get to the probabilities you use.
I've tried to explain my view on the probabilities in this paradox and others at http://www.bruunisejs.dk/PythonHacks/rstFiles/400%20Mathematical%20notes.html#a-note-on-gary-foshee-tuesday-problem-and-related-probability-problems.

In a summary I think 1/3 never can be the answer which also makes more sense.
Getting 1/3 is just reproducing one of the classical errors of probability theory.

And hence if the result is wrong then the argument is too. But now the argument is hidden in superfluous words and too little math.

1. 8. 1. 