63 points · by behnamoh · 3y ago · 82 comments
It's not actually true that the probability is 1/3, nor that the probability is 1/2. (Same with 13/27 vs 1/2). The problem is underspecified. Here's two different more specified versions for which the answer is clear:
1. Sample from all two-child families with at least one boy. What portion of these families have two boys? (answer, rot13: n guveq)
2. Choose a random two-child family, then knock on their door. A boy answers. What are the odds the other child is a boy? (rot13: bar unys)
These are both consistent with the description "at least one child is a boy"!
The day-of-week versions:
3. Sample from all two-child families with at least one boy born on a Tuesday. The odds both are boys? (nyzbfg unys)
4. Knock on the door of a random two-child family. A boy born on Tuesday answers. Odds both are boys? (n unys)
I think your example #1 makes it much clearer why the 1/3 arises, at least in a frequentist analysis.
I would like to offer a similar interpretation but from a Bayesian lens. The 1/3 as rises due to the artificiality of the knowledge condition. Given real-world constraints, we expect any information collected to cleave neatly between the two children in our imagined information gathering scenario. So we implicitly translate "at least one child is a boy" to "we've checked one child, it's a boy".
Consider the following related problem: I have two faucets next to each other, each has a 50% chance of dripping overnight. I leave one shared bucket under both of them. The next day, the bucket is wet. What's the odds that _both_ faucets dripped?
This setup makes the correlative nature of the information much clearer, and I think most people would be less likely to jump to 1/2 as an answer.
I still feel the problem arises from English, not probability. It's clear that "we've checked one child, it's a boy" implies "at least one child is a boy." But furthermore, If someone tells me "at least one the two kids is a boy," I do not know how they arrived at that information. It could either have been through the bucket method or the knock-at-door method.
From a Bayesian perspective, we should consider both as possible with priors P and 1-P (i.e. the answer is somewhere between 1/3 and 1/2). On the other hand, from the perspective of someone taking a math test, I'd rather like the professor to tell me their own prior -- which, given they felt confident enough to put this on a test, they must believe it's basically 0 or basically 1.
Ultimately, both scenarios are describable by the same English phrase, and it feels proscriptivist to just consider one of them, even if it happens to have the least entropy in this case. There should always be the followup question asked: "_how_ did you know this?" and if it's kicked back to " because someone told me," either we need to ask how that person learned it or else bust out some priors.
I do appreciate what you mean about the language issue — it's a misleading phrase that due to the context of the question encourages the listener to jump to "1/2". But it's quite a common expression in probability, and in that context the expression is unambiguous, if difficult to parse (like many things in mathematics, I suppose).
#1 is "When both genders are known, and boys are preferred in the description, at least one is a boy." The preference is what makes the answer 1/3, and assuming it adds information to the problem.
#2 can be "When only one gender is known, and how we know it is uncorrelated with either possibility, at least one is a boy." But it can also be "When both genders are known, and the description reflects the probability of that gender being chosen at random from the two, at least one is a boy." In both cases, the answer is 1/2.
But being under-specified does not mean the question can't be answered, it just requires applying a reasonable assumption instead of an unreasonable one. #1 is very unreasonable since it adds information, #2 is close, but #3 is best.
And the proof is Bertrand's Box Paradox. That name does not properly refer to a probability problem, it applies to how to make this reasonable assumption.
"Mr. Jones has exactly two children. I have written the gender, of at least one, inside this sealed envelope. What is the probability that both children have that gender?"
If you were to open the envelope, and see the word "boy," the problem becomes the same as the one under discussion. If it can be answered, that answer is correct here as well. But it is an equivalent problem if you see the word "girl," and again the answer must be the same. If 1/3 is an acceptable answer, it means that 1/3 of all two-child families have two of the same gender, and 2/3 have mixed genders.
But that is a contradiction. We know that the split is 1/2:1/2. So the assumption, that 1/3 is a reasonable answer, is disproven. Now, that does not mean that the information came to us via #2 or #3, it just means we can't assume that it was #1.
Most often, the same logic is used for the Monty Hall Problem, it is just applied backwards.
You’re right. Those who are satisfied with the 1/3 answer may want to consider the following.
> I tell you I have two children and that (at least) one of them is a boy, and ask you what you think is the probability that the pair is single-sex.
1/3
> I tell you I have two children and that (at least) one of them is a girl, and ask you what you think is the probability that the pair is single-sex.
Also 1/3
> I tell you I have two children, and ask you what you think is the probability that the pair is single-sex.
1/2
So if I tell you that I have two children you think that the probability that they are of the same sex is 1/2. And when I tell you the gender of one of them, whatever it is, you will think that the probability goes down to 1/3?
So if you tell me the gender of a specific one of them, say the youngest, then I haven't learned anything that makes my subjective probability go down that the other is the same gender.
I think in real life you will come across the second kind of statement (e. g. "my oldest is a girl") than the first kind (e. g. "I do not have two boys")
But it does not feel too weird to me that "at least one of them is a girl" will reduce the probability of the pair being single-sex to a third. In fact if you further tell me that both "an least one of them is a girl" and "at least one of them is a boy", the probability of the pair being single-sex will go to zero and this seems perfectly reasonable
> I tell you I have two children and that (at least) one of them is a boy, and ask you what you think is the probability that the pair is single-sex.
1/3
> I tell you I have two children and that (at least) one of them is a girl, and ask you what you think is the probability that the pair is single-sex.
1/3
If you don’t, why not?
If you do, what’s your answer to the following question?
> I tell you I have two children and that I’ve just sent you an email with the sex of (at least) one of them, and ask you what you think is the probability that the pair is single-sex.
Will your answer change after you have a chance to check your messages?
If I tell you that one kid is male, you think that the probability that there is one male and one female is 2/3.
If I tell you that one kid is female, you think that the probability that there is one male and one female is 2/3. (Right?)
If I don't tell you anything - beyond the fact that I have two kids - what's the probability that there is one male and one female?
Oh, you have two children? The probability that they are of the same sex is 1/2.
> and the sex of at least one of them is…
Say no more! If at least one of them is of some sex the odds that they are both of the same sex go down to 1/3.
I said 1/2 before but that was before knowing that at least one of them is either a boy or a girl. That changes everything! (Probability is tricky.)
- draw a complete probability tree
- sum the prob. of all branches that are possible given the information (having at least 1 boy born on a Tu)
- sum the prob. of all possible branches we're interested in (2 boys)
- divide interesting sum by possible sum
Then assume I made a mistake, invest the same amount of time to program a simple monte carlo simulation to verify the result.
Fix code and probability tree until they match.
Kind of like double book keeping. Very satisfying because you can switch multiple times between theoretical and empirical approach and thinking.
public class Test {
public static enum Outcome {
B_Mo, B_Tu, B_We, B_Th, B_Fr, B_Sa, B_Su, G_Mo, G_Tu, G_We, G_Th, G_Fr, G_Sa, G_Su;
boolean isBoy() {
return this == B_Mo || this == B_Tu || this == B_We || this == B_Th || this == B_Fr || this == B_Sa || this == B_Su;
}
}
public static void main(String[] args) {
Random r = new Random();
int count_experiments = 1_000_000_000;
double count_possible_given_info = 0;
double count_interesting = 0;
System.out.println("theoretical (13/27): " + (13.0 / 27.0));
for(int i = 0; i < count_experiments; i++) {
Outcome child_1 = Outcome.values()[r.nextInt(Outcome.values().length)];
Outcome child_2 = Outcome.values()[r.nextInt(Outcome.values().length)];
boolean possible_given_info = child_1 == Outcome.B_Tu || child_2 == Outcome.B_Tu;
boolean interesting = possible_given_info && child_1.isBoy() && child_2.isBoy();
count_possible_given_info += possible_given_info ? 1 : 0;
count_interesting += interesting ? 1 : 0;
}
System.out.println("count_experiments: " + count_experiments);
System.out.println("count_possible_given_info: " + count_possible_given_info);
System.out.println("count_interesting: " + count_interesting);
System.out.println("count_interesting / count_possible_given_info: " + (count_interesting / count_possible_given_info));
}
}
Example output: theoretical (13/27): 0.48148148148148145
count_experiments: 1000000000
count_possible_given_info: 1.3775374E8
count_interesting: 6.632153E7
count_interesting / count_possible_given_info: 0.481449941032454Bertrand Paradox is deeper though -- it's not always obvious when there is more than one plausible sample space; there's good mathematics in studying that.
I want to find
P(you have two boys|you tell me that you have two children including at least one boy) = P(you have two boys|you tell me that X)
where for convenience I use the notation X=“you have two children including at least one boy”
I can write
P(you have two boys|you tell me X) P(you tell me X) = P(you tell me X|you have two boys) P(you have two boys)
Assuming that you don’t lie I know that X is true and I can restrict the analysis accordingly.
P(you have two boys|X and you tell me X) P(you tell me X| X) = P(you tell me X|X and you have two boys) P(you have two boys|X)
That conditioning information is redundant in some terms but not always.
If the probability of a boy is 1/2 and there is no correlation we can find that P(you have two boys|X)=1/3
(Using the notation girl=not-boy we can also write P(you have one boy and one girl|X)=2/3)
But we’re after something that could be different: P(you have two boys|you tell me that X)
P(you have two boys|you tell me X) = P(you tell me X|you have two boys) P(you have two boys|X) / P(you tell me X| X) = P(you tell me X|you have two boys) P(you have two boys|X) / ( P(you tell me X|you have two boys) P(you have two boys|X) + P(you tell me X|you have one boy and one girl) P(you have one boy and one girl|X) )
Without additional assumptions we can’t go beyond
P(you have two boys|you tell me X)
being equal to
1/3 P(you tell me X|you have two boys)
divided by
1/3 P(you tell me X|you have two boys) + 2/3 P(you tell me X|you have one boy and one girl)
If you consider it possible they might have told you "I have two children and (at least) one of them is a girl" instead of the statement about a boy (were they to have both a boy and a girl), the reasoning given in the article is wrong.
P(two boys | atleast one) = P(atleast one boy | two boys) * P(two boys)/P(atleast one boy)
= 1*(1/4)/(3/4) = 1/3
> My initial reaction was that the information about the Tuesday was irrelevant, since at issue was gender, not day of birth. In which case, this was the same problem as the one I just described, and the answer would be 1/3. ... The correct answer to the new puzzle is 13/27, just slightly less than 1/2, and not at all close to 1/3.
This does not feel coherent on a gut level, and smart people seem to have worked it that this is true but: the answer to the new problem is the same regardless of the day of week you are told. Can't you make that inference then that the answer to the original question is actually 1/2?
you first cull the set by saying "only parents with at least 1 b, line up to be examined". i think it's clear that the selected population will be 1/3 bb parents, 2/3 bg parents, right?
on the other hand the second problem is you saying: "all parents with a b born on tuesday, report to be examined!". note that most of the parents that were in the question 1 selected population are now excluded. try to imagine which parents get selected by this one.
you can't make the inference back to the original question because it's a different question about a broader group of people. question 1 population distrubution actually is 1/3 vs 2/3. the key is to think of it as selecting different subsets of the parent mob.
But we expect about the same number of parents to show up for "all parents with a b born on Tuesday" as "all parents with a b born on Monday." This feels like some kind of Simpson's paradox I've invented where every subgroup has a the same outcome, which is different than the outcome of the group as whole.
I am going to not heed the author's suggestion of setting up the problem correctly and use intuition:
For the week problem it was 14+13 = (7 * 4 -1) in the bottom and 13 (7*2-1) on the top.
So for a normal year (365 days), it would be (365*2 - 1)/(365*4 - 1). Close to 1/2.
So, you’re correct.
One can pump the intuition further: If you only know that there are no girls, the result is 1/3. If a boy opens the door, or you know that the older one is a boy, the result is 1/2.
So identifying one of them as the boy increases the result from 1/3 to 1/2.
By saying “one is a boy born on Tuesday”, you give some information, thus nudge the result a bit toward 1/2. Saying “one is born on 12/30”, say, you identify the kid more and nudge the result nearly all the way towards 1/2.
And indeed, if (in the formula above) we set p=1 (no identification), 1/3 results, and if we set p=0 (full identification), 1/2 results.
Quite neat.
import itertools as itools
xs = [f'{i}-{j}' for i in range(30) for j in range(12)]
ys = ['b', 'g']
zs = list(itools.product(xs, ys))
boys = [z for z in zs if z[1] == 'b']
len(boys)/len(zs)
----
gives me 0.5, or 1/2.
The moral of the article is to set up your universal set correctly and do not throw out any information, now matter how irrelevant.
I believe your script may require a datacenter and a scalable architecture now.
To me, this is where the intuitive answer of 50% diverges from the calculated answer.
I think intuitively, many of us break it up into 3 equally likely, unordered groups: 'BB', 'GG' and 'BG'. We are then told to exclude 'GG', which leaves us with two equally likely options: 'BG' or 'BB'.
This reminds me of the most recent episode of numberphile deals with the sleeping beauty paradox, where Tom Crawford shows Brady that the chance of flipping heads with a coin is 1/3 to which Brady protests that Tom has changed what he is measuring.
With the gender question, we just assume the wrong probability space, which isn't the same, but my mind still wandered to numberphile.
Right, another way to phrase it:
1. We casually move from permutations to combinations, especially when nothing else in the question is there to keep us focused on ordering.
2. When throwing out ordering, we collapse BG and GB together... but forget that the result needs to have double weight.
I didn’t buy it either. They claimed both methods are valid, but these are valid for different questions. One of the weaker numberphile videos imo, unless there was something after the point I stopped watching at.
Actually, neither is correct – leaving aside whether the math is correct given the unstated assumptions – because the unstated assumptions are wrong: birth probabilities by sex are not equal and, within the same family, are not independent.
Funnily enough, I'm currently reading _Against the Gods_ (1996) and the chapter I'm on covers exactly this distinction. What are the odds?!?!
(If it helps, today is Sunday)
If they then say, I have a secret child-ordering X, such that the first in this ordering is a boy, I guess it is now 1/2
However the receiver of 1/3 case knows there exists a secret child-ordering where this is the case.
Weird!
Let's set it up like this: You have 4 dads. Each dad has 2 kids covering all the combinations of kids: MM, MF, FM, FF.
Now if you define the experiment as: you are talking to a dad who has one boy. This was set up by the 4 dads being in the playground, and you walk you to one of them randomly and they tell you this. Now in such an experiment there is a 1 in 4 chance that you lead to a contradiction. Therefore in the 4 alternative universes we disband that option, leading to 3 universes. All equally likely. And in one of them the dad has 2 boys.
If the dad tells you the older kid is a boy then you have some info. What info is that? Well it depends on the precondition under which he told you that. At least a couple of options.
(a) He was going to always reveal to you a kid that was a boy, then tell you if it was the older or younger kid. It happens to be the older one this time.
(b) He was going to tell you the gender of the oldest kid.
In version (a) there are no universes discarded, so you are still at 1/3
In version (b) the universe where the older kid is not a boy has been discarded. There are now 2 universes in which you exist so it is 1/2.
My own explanation is that if you are shown a goat door in advance, there is 50/50 of two remaining doors. But since without that you might have picked the door that was revealed, there’s a symmetry about it in which the swap is more lucky. Which is just a clumsy way of saying your chances were 2/3 lose vs 1/3 win and it doesn’t change after the reveal, so you must swap.
I still feel like I don't full grasp the actual problem/solution though. Even with this new understanding. I will read the linked article by Jeffrey S. Rosenthal though, and hopefully that will fill in the last of the blanks.
Fortunately, I have a copy of the page:
April 2010 Probability Can Bite
Estimating probabilities can be a tricky business. The long running saga of the notorious Monty Hall Problem shows how even mathematically-smart people can easily be misled. (For my forays into that particular example, see my Devlin's Angle columns for July-August 2003, November 2005, and December 2005.) Another probability question that causes many people difficulty is the children's gender puzzle: I tell you I have two children and that (at least) one of them is a boy, and ask you what you think is the probability that I have two boys. Many people, when they hear this puzzle for the first time, give the answer 1/2, reasoning that there is an equal likelihood that my other child is a boy or a girl. But this is not correct. Based on what you know, you should conclude that I am actually twice as likely to have a boy and a girl as I am to have two boys. So your right answer to my question is not 1/2 but 1/3. Before I explain the answer, I should clear up a confusion that many people have about problems such as this, which are about what is known as epistemic probability. The probability being discussed here is not some unchangable feature of the world, like the probability of throwing a double six with a pair of honest dice. After all, I have already had my two children, and their genders have long been determined. At issue is what probabilities you attach to your knowledge of my family. As is the case with most applications of probability theory outside the casinos, the probability here is a measure of an individual's knowledge of the world, and different people can, and often do, attach different probabilities to the same event. Moreover, as you acquire additional information about an event, the probability you attach to it can change. To go back to the original puzzle now, in order of birth, there are four possible gender combinations for my children: BB, GG, BG, GB. Each is equally likely. (To avoid niggling complications, I'm assuming each gender is equally likely at birth, and ignore the possibility of identical twins, etc.) So, if all I told you was that I have two children, you would (if you are acting rationally) say that the probability I have two boys is 1/4. But I tell you something else: that at least one of my children is a boy. That eliminates the GG possibility. So now you know the possible gender combinations are BB, BG, GB. Of these three possibilities, in two of them I have a boy and a girl, and in only one do I have two boys, so you should calculate the probability of my having two boys to be 1 out of 3, namely 1/3. If you haven't come across this before, it might take you some time to convince yourself this reasoning is correct. I long ago got past that stage, and hence felt my intuitions would be pretty reliable when I recently came across the following variant of the puzzle. I tell you I have two children, and (at least) one of them is a boy born on a Tuesday. What probability should you assign to the event that I have two boys? Before you read further, you should perhaps pause and try to figure this out for yourself. My initial reaction was that the information about the Tuesday was irrelevant, since at issue was gender, not day of birth. In which case, this was the same problem as the one I just described, and the answer would be 1/3. But then I began to have second thoughts. I admit my doubts were occasioned by the way I came across the problem: a Twitter feed by the well-known mathematician John Allan Paulos, forwarding a Tweet from the (British) Guardian newspaper science-writer Alex Bellos, who was reporting on the posing of this problem at the recent "Gathering for Gardner" conference in Atlanta by puzzle master Gary Foshee. Suspecting that there was more to this problem than I initially thought, I set about repeating the same form of reasoning as in the original puzzle, but taking account of days of the week when my children could have been born. As soon as you do that, you realize that Foshee's problem really is different. But how different? My intuition said that, since the original puzzle had the answer 1/3, the new variant would have an answer fairly close to 1/3. After all, knowing the birth day is a Tuesday may (and does) make a difference, but it surely cannot make much of a difference, right? Wrong. It makes a surprisingly big difference, The correct answer to the new puzzle is 13/27, just slightly less than 1/2, and not at all close to 1/3. This is what really surprised me. To the extent that I checked my solution with the one Bellos published on his blog a few days later. The crux of the matter is that Foshee's variant seems at first glance to be a minor twist on the original one, but it's actually significantly different. The property it focuses on is not gender, but the combination property gender + day of birth. That makes the mathematics very different, as I'll now show. Instead of just the two genders, B and G, of the original puzzle, there are now 14 possibilities for each child:
B-Mo, B-Tu, B-We, B-Th, B-Fr, B-Sa, B-Su G-Mo, G-Tu, G-We, G-Th, G-Fr, G-Sa, G-Su
When I tell you that one of my children is a boy born on a Tuesday, I eliminate a number of possible combinations, leaving the following:
First child B-Tu, second child: B-Mo, B-Tu, B-We, B-Th, B-Fr, B-Sa, B-Su, G-Mo, G-Tu, G-We, G-Th, G-Fr, G-Sa, G-Su. Second child B-Tu, first child: B-Mo, B-We, B-Th, B-Fr, B-Sa, B-Su, G-Mo, G-Tu, G-We, G-Th, G-Fr, G-Sa, G-Su.
Notice that the second row has one fewer members than the first, since the combination B-Tu + B-Tu already appears in the first row. Altogether, there are 14 + 13 = 27 possibilities. Of these, how many give me two boys? Well, just count them. There are 7 in the first row, 6 in the second row, for a total of 13 in all. So 13 of the 27 possibilities give me two boys, giving that answer of 13/27. (As in the original problem, you have to assume all the combinations are equally likely. In the case of birth days, this is actually not the case, since more babies are born on Fridays, and fewer on weekends, due to the desire of hospital doctors to have weekends as free as possible of duties.) What misled my intuition (and likely yours as well) was my unfamiliarity with the property gender + day of birth. Fortunately, the math does not lie. Provided you put your intuitions to one side and set up the problem correctly, the math will give you the right answer. Now that your intuition has been primed, let me leave you with this problem. I tell you I have two children, and (at least) one of them is a boy born on April 1. What probability should you assign to the event that I have two boys? If you think that is going to be too cumbersome, simply tell me whether the probability is close to 1/2 or to 1/3, or to some other simple fraction, and provide an estimate as to how close. (Once more, you should assume all birth possibilities are equally likely, ignoring in particular the well known seasonal variations in actual births.) If you are still having doubts about all of this, take consolation in the fact that you are not alone. Representing real-world problems correctly to calculate probabilities is notoriously difficult. In my recent book The Unfinished Game, cited below, I describe how no less a mathematician than Blaise Pascal had enormous difficulty understanding an analogous argument by Pierre de Fermat.
Follow Keith Devlin on Twitter at Devlin's Angle is updated at the beginning of each month. Find more columns here@nprmathguy.
Mathematician Keith Devlin (email: devlin@stanford.edu) is the Executive Director of the Human-Sciences and Technologies Advanced Research Institute (H-STAR) at Stanford University and The Math Guy on NPR's Weekend Edition. His most recent book for a general reader is The Unfinished Game: Pascal, Fermat, and the Seventeenth-Century Letter that Made the World Modern, published by Basic Books.