Slippery Lube

xkcdIt has been said of Lubos Motl that he’s hard to ignore, but it’s always worth the effort. I will, soon enough, take this advice to heart. But not quite yet. Lubos’s penchant for twisting other people’s words, just so he can have something to argue about, is well known and widely remarked. As his most recent victim (though “victim” is of course too strong a word, no actual harm having been done), I thought it would be both fun and instructive to challenge him to a bet. True to form, he continued to bluster but of course refused to back up his misrepresentations with actual cash.

Now of course Lubos will say that it is I who am twisting words, and in particular that I either “changed the question” or “changed the answer” (or both) between the original post and the offer to bet. That, however, won’t wash, since I’ve agreed, as part of the terms of the bet, to let an impartial panel of statistics professors determine the answer to the question as it was originally posed. So even if I had changed the question (which I haven’t), this would prevent me from getting away with it. (And no, I haven’t changed the answer either. If Lubos claims I have, we can put that to the stats profs also.)

I’m feeling annoyed enough to say a little more along these lines, but first I’d like to make it crystal clear that my annoyance does not extend to readers who are still puzzling this out. The problem with Lubos isn’t that he’s got it wrong; it’s that he’s not the least bit interested in getting it right. A few particulars:

  • I asked the question “In a certain country…what is the fraction of the population that is female?”, with a specification that the question was to be answered in expectation. Many — I daresay most — intelligent people get this wrong at first, because they observe (correctly) that the expected difference between boys and girls is zero and then jump to the unwarranted (and false) conclusion that the expected ratio is one. I made this mistake myself when I first saw this problem, as did Lubos. Once I understood it, my twin reactions were “Cool! I just learned something!” and “I’d like to share this cool thing with other people”. Lubos’s reaction was to claim he’d been cheated.
  • The correct expected ratio depends on the number of families in the country. For the simple case of a one-family country, it’s 31%. Here’s what Lubos wrote:

    You may explain the lower result of 31% obtained previously as an artifact of the selection bias — that we have only considered the `completed families’ that have already received their son.

    But in fact Lubos’s preferred answer of 50% is wrong whether or not you restrict your attention to completed families, and my offer to bet explicitly allows Lubos to decide whether he wants to restrict attention to completed families or not — I will win either way. Why would he have made this completely false and indefensible claim? Apparently, he just throws things like this out without making any prior effort to check them. Lubos has now switched to defending himself on entirely different grounds, which suggests that he’s figured out he was dead wrong about this one. But he’s never acknowledged that.

  • Lubos’s latest defense is to convert the problem from “What, in expectation, is the fraction of female births?” to “What is the probability that a given individual is female?”, and to pretend that I both asked and then got the wrong answer to the latter question. In fact my “Big Answer” post points out quite clearly both that the answer to this latter question is 50% and that it is not the question I am asking.
  • Lubos now compounds his dishonesty by accusing me of changing questions (and/or answers) midstream. This ignores the fact that I never changed the question (and/or answer). This is largely because, unlike Lubos, I try to think carefully about things before I post them, so, though I sometimes make public mistakes, I don’t make them nearly as often as he does. It also ignores the fact that if I did change the question, he will win the bet, since the original question is what we’ll be adjudicating. My offer (still outstanding) is to bet on the original question in its original wording, as interpreted by a panel of statistics professors from top universities. So when Lubos says that I’ve changed the question, he is, in a word, lying.

If it seems I am being particularly hard on Lubos, it is because a) he deserves it (not just for this incident but for a lifetime pattern) and b) because I’m feeling a little frustrated after seeing some of the same mistakes repeated in comments by people who obviously never digested the original post, or never noticed that their objections had already been answered. Of course I realize that some of this is inevitable because commenters can’t be expected to have digested several hundred previous comments over three separate threads. So let me make this easier by listing some of the most frequently asked (and answered) questions. If you have questions or objections to raise, please check this list before adding a repetitive comment that others will have to slog through.

  • You’ve raised a question about the fraction of girls in the average country, but answered it only for the average family. This is sleight of hand. No, read more carefully. The answer is (approximately) 30% for a single family. It is therefore also 30% for a country with one family. It is some other percentage for a country with two families, and some other percentage for a country with three families, et cetera, but it is never 50%.
  • Your calculation only works if all families have reached completion. Otherwise the answer is 50%. I’ve given the calculations in the case where all families have reached completion. These calculations certainly need to be slighlty modified otherwise, but the answer will still never be 50%. The assertion that you can get the 50% answer this way is, as far as I can tell, something that Lubos and his ilk have pulled out of their asses. Not only is it false, but they’ve never given the slightest reason to believe it — which suggest that they’ve known perfectly well that they were blustering.
  • You asked about the fraction of girls in the population, which we can write as G/G+B. Then you said you wanted to take an expectation. A perfectly reasonable interpretation of that is to replace each variable with its expectation, giving E(G)/E(G)+E(B). That’s 50%. That’s 50%, but it’s not a perfectly reasonable interpretation. By analogy, suppose I ask you to add 3 plus 4 and then square the result. You answer that the result is 25, because 32+42 is 25. I say, “No, I told you to first add, then square — not to first square and then add. You respond that you squared and you added so your interpretation was perfectly reasonable. Then if you are Lubos, you accuse me of changing the question. But “first square and then add” is not at all the same as “first add and then square”. Neither is “first take expectations and then take ratios” the same as “first take a ratio and then take the expectation”.
  • By insisting that we take the original question literally, you are playing a silly word game. It’s nitpicky to insist that we do things in the order you specified. But the entire point of the puzzle — the key interesting fact that we learn from this puzzle — is that the order matters. The expected ratio (which is less than 50%) is not the same as the ratio of the expectations (which is 50%). To blur this distinction is to render the puzzle completely pointless.
  • The correct answer, according to you, is approximately 1/2 – 1/4k, where k is the number of families. When k is large, that’s approximately 1/2. So 1/2 is almost exactly the right answer, and you’re just quibbling over tiny differences. First of all, our commenter Thomas Bayes has pointed out quite eloquently in these threads that the 1/4k difference can be of great practical importance. But more importantly, Lubos’s argument gets the (approximately) correct answer for entirely the wrong reason. It is a fluke. It is as if Lubos were to say “Well, everyone has exactly two eyes; therefore the answer is 1/2”. You get no credit for a completely bogus argument that happens to accidentally get the answer right (though in this case it gets it only approximately right!). And many of the arguments that have come up in comments are exactly in that category.
  • But according to my simulation….. If you simulated a country with a large number of families, then the correct answer is close enough to 50% that your simulation probably can’t tell the difference. If you simulated a country with a small number of families and got 50%, then your simulation is wrong. This is a simple math problem, and simple math gives the right answer. I have offered to settle bets via competent simulations only because I know there are people out there who don’t trust simple math. But they should.

I’m probably forgetting two or three other oft-repeated errors, but those are some of the main ones. I hope this list will be useful to people who are still sorting these issues out.

Meanwhile, many thanks for the hundreds of useful and insightful comments. I’ve singled out Thomas Bayes, whose insights have been amazing (including his wonderful Taylor series approximation to the correct answer). I should also mention our commenter Tom, who stunned and delighted me by discovering, contrary to all my expectations, that E(G/G+B-1) is exactly 1/2. As Thomas Bayes points out, this is a real problem for the commenters who insist that E(G/G+B) is 1/2. These experessions can’t be equal.

Finally, a word about the status of the bets. There is, at this point, real money on the table. Additional bets might still be coming in. Next week, I’ll post an update on these.

Print Friendly, PDF & Email
Share

170 Responses to “Slippery Lube”


  1. 1 1 Super-Fly

    I’d be curious to know what Google thinks of this debate. Is there any way to talk to a hiring rep? Also, I’d like to see if they’d change the ‘official answer’ (or maybe just alter the question).

  2. 2 2 Luboš Motl

    Dear Steve,

    honestly, I really don’t enjoy neverending debates and arguments about trivial issues which is why I de facto closed the thread and I surely don’t plan another blog entry about this trivial puzzle. The issue is totally clear. It’s clear that every long enough sequence of births will produce exactly 50% of girls and 50% of boys, regardless of the parents’ superstitions and their algorithms to stop reproduction at various points.

    The average non-weighted proportion of girls in a family is a subtle exercise, and it’s nice that you also calculated it’s 30.6% (Taylor expansion for a 1-ln(2)), which is strictly below 50% because the small one-boy-only families are overrepresented in computing the average, but it’s not the same thing as the fraction in the society that is exactly 50% for any sustainable society or country or nation. To get the latter, one has to weight the families by their numbers in computing the average proportion, and one always gets 50% exactly in this way as long as the nation is sustainable.

    The only way to get a number different from 50% is to replace the nation by a limited history that goes extinct after their families hit the wall – by having the first son. This limited suicidal sect simply can’t be called a nation or a country.

    Even if you take these limited histories, the properly weighted average of the proportion of girls over such histories will still be 50%. All qualitative arguments that the number is different from 50% have errors in it. For example, if one also counts incomplete families, he could say that large families have a higher fraction of girls while the 1-child families are balanced, so the boys will never catch up. This is a wrong statement because if the couples would normally have many children, the stopping rule creates some highly-female families, but the same stopping rule also increases the proportion of families who have 1 boy and no girls – the pairs angry about the government because they wanted to have many kids but the government stopped them after the 1st kid. This demographics doesn’t exist for 1-girl-only families which means that 1-boy-only families prevail over 1-girl-only families. The full calculation, of course, implies that the two effects are balanced and the fraction is exactly 50%-50%.

    All such questions may be answered within minutes. I really don’t understand the point of spending days on this trivial issue. Please, if you think that 50% is a wrong answer, contact Google that had 50%-50% as the official right answer to this puzzle during their hiring process. Complain over there. I didn’t use this simple math problem to dismiss candidates for jobs in my company even though I fully understand why Google did. It’s a very good task to find and throw away the people who will get distracted from common sense and from simple, fundamental math arguments by noise and who will immediately start to think about complicated yet irrelevant technicalities – which is exactly what you did which is why you couldn’t work at Google but you instead work in the Academia that often supports this contrived way of thinking that is detached from the reality and everything important in it. In Google, these people would only contribute inpenetrable and hard-to-find bugs to the software. They lack the clarity of their thinking which is surely important in the commercial sector but I think it should be required in the scholarly work, too.

    The “worth the effort to ignore LM” probably came from John Baez. He began to ignore me – as well as all people whose remarks actually make any sense – which is why he ended up as a mentally ill person who believes that he is the new Messiah who will save the Earth somewhere in Singapur. Feel free to follow him. Everyone who deliberately starts to ignore rational arguments will inevitably end up in the hell of irrationality.

    Best wishes
    Lubos

  3. 3 3 Dave Losna

    Steve,

    this has been an extremely interesting and counterintuive problem (read “fun”). But after all those posts etc, when everybody seems to agree that we have the right answers to the different interpretations of the original question, I think it is about time to put this thing to rest. Going on in this manner seems to be more about ego and prestige etc which in my humble opinion is not worthy of this excellent place. Please bring us some new amusing and challenging problem instead.

    Dave

  4. 4 4 Steve Landsburg

    Lubos: I appreciate your long response. It is 6AM here and I’ve been up most of the night (not for this reason!), so I must get some sleep before I digest it all.

  5. 5 5 Pat

    Why don’t you give us your answers for different numbers of families? I think most of us think this is a trivial debate about rounding many decimal places for a country with a reasonable number of families.

    Then we can all compare our numbers and then decide whether we care if we agree for the wrong reasons?

    Family Size Proportion Girls Proportion Boys
    4 0.4230769231 0.5769230769
    5 0.4561403509 0.5438596491
    6 0.4750000000 0.5250000000
    7 0.4858299595 0.5141700405
    8 0.4920318725 0.5079681275
    9 0.4955577493 0.5044422507
    10 0.4975442043 0.5024557957
    11 0.4986529513 0.5013470487
    12 0.4992663243 0.5007336757
    13 0.4996029079 0.5003970921
    14 0.4997862726 0.5002137274
    15 0.4998855294 0.5001144706
    16 0.4999389565 0.5000610435
    17 0.4999675727 0.5000324273
    18 0.4999828332 0.5000171668
    19 0.4999909399 0.5000090601
    20 0.4999952316 0.5000047684

  6. 6 6 Pat

    Sorry about the formatting.

  7. 7 7 Henry

    Luboš and many of Steve’s opponents seems to be attacking a strawman. This is understandable, since this strawman looks very life-like. It looks very plausible from a cursory reading that Steve is just making some trival mathematical mistake like assuming a stopping rule can change the proportion of girls born, or that he fails to realise that families with more members should be weighted more. If you’ve convinced yourself of that, you’re going to shut yourself off from changing your mind because it all seems so elementary so as to not be worth thinking much about. Witness how a lot of opponents devote a considerable proportion of their comments to ridicule.

    However, consider: if Steve really failed to weight families according to their size, he would get a proportion of ~30.6% regardless of the number of couples. The couples in a country, after all, could be thought of as different states of the world for a single couple. If they were unweighted, it would be just like running a lot of a trials for the single couple version. The fact that the proportion converges to 50% indicates that the couples with more children do get weighted more.

    What I am most intrigued about is how Luboš appears to agree that the expected proportion in a single family is in fact ~30.6%. However, at some unclear point, apparently when the nation is “sustainable”, the expected proportion becomes exactly 50%. I am very much interested in learning where this point is.

  8. 8 8 improbable

    I’ve been reading everyone’s debated for days and the tone has thoroughly pissed me off.

    If you speak of a country, you presumably mean at least 50 millon odd souls, perhaps 10 million countries. To my mind, for a puzzle posed in 32 words, it is then entirely reasonable to ignore corrections from this number being finite. The answer is then 50%.

    If you wish to keep such corrections, then of course the problem is more complicated. However I think it would be reasonable to specify this in the problem, for instance one could say “town” not “country”. Perhaps it is necessary to also say that this unrealistic place has a perfectly 50% birth ratio, and that nobody dies in childhood or childbirth, and that you will ignore the finiteness of fecundity, and whether to just consider one generation, and so on. All of these are fine detail without which you can’t pretend to offer a full perfect answer. Perhaps in the circle of stats-puzzle-lovers there are conventions for which of the unrealistic assumptions you make and which you don’t, but…

    But I think smart people should find better things to argue about than precisely what puzzle is implied by 32 words of english. That’s why we’re not lawyers, you know. The real world does not pose us such language puzzles, and Lubos is, of course, a physicist.

  9. 9 9 Luboš Motl

    Dear Henry, I agree that if you didn’t take the weighted average at all, you would get 30.6% even for many families.

    However, the picture of “k” families that Steve promotes has another lethal bug that leads to a different number smaller than the right result which is 50%.

    The bug is that at the end of his experiments, his “nation” is composed of families that have already have their sons – and that haven’t had any children for a long time. And the reproduction in each family is controlled by the stopping rule so that girls never come after boys. Consequently, sons’ average age is always lower than daughters’ average age at the end of the experiment.

    But this is only possible because his “experiment” is not a sustainable society. It is a one-attempt episode of a group of people who go extinct. In a sustainable society with any rules, the average age of boys is equal to the average age of girls, whether or not their numbers coincide. This statement is directly contradicted by the finite-time experiments.

    If one has a sustainable society, there will also be boys who are older than girls – because new families may come into being that produce younger girls than the boys who already lived when the girls were born. A sustainable society always has the same average age of girls and boys, and when you use this fact in a correct calculation, you will find out that the percentage of the boys and girls are exactly equal as well, namely 50% each.

    The problem is not that the number of families in Steve’s model is finite: every nation has a finite number of families, after all. The problem is that he doesn’t allow new families to be created so he introduces a bias to the age of the couples who can have children – a bias that can’t arise in a real country. This bias is a source of the incorrect asymmetry between boys and girls. The whole asymmetry only arises because the society stops reproducing after a very short time.

    In the real societies that follow the stopping rule, it will still be true that sons are always the youngest siblings – they never have older sisters. However, this family rule doesn’t apply to the whole society at all because the average age of boys and girls is equal. The whole bias is man-made because Steve made wrong assumptions about the birthday of the parents, so to say.

    Any answer to the original question different from 50%:50% is just plain wrong.

    Best wishes
    Lubos

  10. 10 10 Luboš Motl

    And one more point I wanted to say to make the discussion almost complete:

    When Steve considers “k” families, he obtains the proportion of girls being a function of “k” that can be calculated but behaves as “1/2-1/4k” for large “k”.

    However, the average total number of kids that these “k” families have is approximately “2k” – about “k” boys and “k” girls. That’s it. No reproduction after that.

    However, when you only have “2k” kids, the standard deviation of the number of girls from the predicted value, about “k”, goes like the square root of “k” by the basic rules of statistics (the width of the binomial distribution). So in the individual real history, the observed fraction of girls will be 1/2-1/4k plus minus sqrt(k)/k.

    But note that the term “1/4k” is negligible relatively to noise, “sqrt(k)/k = 1/sqrt(k)”: the latter is much (parametrically) larger! It follows that in a single copy of the “Steve’s nation going extinct after the k families are depleted”, you have no chance to measure the deviation from 1/2.

    To measure (or operationally define) the 1/4k deviation, you would have to sacrifice many nations – make them extinct many times, and calculate the average. I mean the average over many histories (like when you’re checking predicted probabilities in quantum mechanics), each of which stops when the “k” fixed families become prohibited from having children after their first son and the nation goes extinct.

    Now, indeed, if you had 4 families, the arithmetic average of the fractions of girls in these many histories would be 43% or so – 1/2-1/4k for k=4. However, if you naturally calculated the weighted average over the histories as well – with weights given by the total number of children that were born during the whole history (which is finite because Steve’s are finite-time experiments), then you would get 50% exactly once again.

    It’s obvious but in the comment section of my blog, you also find the programs that verified all these statements.

    It’s not hard to see why you get back to 50% if you compute the weighted average over histories. This proportion of girls averaged over many histories, with the weights added, is nothing else than the proportion of all the girls among all the kids born in all these histories, and it is exactly 1/2 once again because if you have any large ensemble of births, the fraction of girl-births converges to 50%: it is *not* 43% but 50% exactly.

    So *any* answer that differs from 1/2 always depends on using non-weighted averages, and if one uses the properly weighted averages over all children, one always gets 50%. Only when several wrong features are combined – finite number of families; ban on new families; non-weighted average of the fractions over histories – one has a chance to obtain an awkward answer that differs from 50%. Such a combination of awkward assumptions has absolutely nothing to do with the real countries. Dropping any of these assumptions and you will return back to the exact 50% answer.

  11. 11 11 Jonatan

    Lubos >

    Let’s imagine that we have a number of people. They all flip coins (and record all flips) until they flip a “heads”, and then stop.

    Do you agree here, that the expected ratio of tails including all flips is less than 50% ?

  12. 12 12 Tom

    Steve,

    I’m disappointed to see you post this.

  13. 13 13 Alan Wexelblat

    Unlike a certain segment of your commentators I’m interested in this debate because it highlights issues around language and framing and expectations. I think a great deal of what’s gone on is related to that, as Lubos’ first comment on this post invokes terms such as “sustainable”, “extinct”, and “superstition” which have never appeared in any statement of the question, but would naturally appear if one were to consider this a real-world problem. To me this shows one side of the problem, which is that framing it in terms such as “families” and “countries” leads people to have expectations from the real world that influence their behavior in natural, but un-mathematical, ways.

    For example, it seems wholly natural to assume that a “country” will include millions of families. Steve has made the point that a “country” of size four is a good one for illustrating his side of the argument and the mathematics for k=4 are quite clear and we then see how the answer only approaches 50% and is thus not ever exactly 50%. Likewise, Steve has freely agreed that for large k the answer gets quite close to 50% but as noted in the comparison of E(G/G+B-1) vs E(G/G+B) it’s just simply never going to be exactly 50%. If you are a mathematician answering the question from the standpoint of mathematics, this is quite important and clear; if you are a population planner for a real-world country you use 50% and consider that to be quite accurate.

    In this blog post, for the first time, we see a new statement of the question: “What, in expectation, is the fraction of female births?” I think if the question had been phrased that way from the start there would have been fewer wrong or misled answers since it would have been clear that there is something different about expectation. And as a non-mathematician I would have asked much earlier: where do I go to learn some basic about expectation, as it is used in this question?

  14. 14 14 Edmond

    There are two points I would like to make: the first being what is a ‘reasonable’ expectation, and the second being a tangential point of including multiple generations with genetics. This is not, in any way, and adversarial post, simply an appeal for reasonableness.

    A reasonable expectation, in my humble opinion, is that a ‘country’ consists of more than just one or four families. I am very confident most people would say that a country is likely composed of millions, not 8 people (I find it a highly unreasonable expectation to consider that a country would have such a minuscule population). Regardless, a large enough sample size brings the ratio sufficiently close to half that it is exceedingly pedantic to argue that it is just asymptoting to half (unless you think rational expectations include small fractions of children – at which point we can get into arguments about multi-sexed individuals and the queer population). I could say your model is flawed for only considering binary gender identities, but that might be considered unreasonable of me.

    This brings me to a second point – when I think of a country, I do not presume only one generation, after which they all die off. I would think of a living population of many generations with genetic diversity all flowing one into the next. In this case, the ratio would actually skew the other way.

    Those who are predisposed towards female offspring will quickly out-breed those predisposed towards male offspring (presuming no abortions of infanticide). Eventually, this will cause a genetic drift significantly favoring the birth of girls. How great an effect this would be over time, I have no idea, though my expectation is that it would be significant.

  15. 15 15 Tom

    I see that I am mentioned in the acknowledgements, along with a carefully-selected version of my point, narrowed mathematically from what I repeatedly explained (link below) and shorn of its meaning in the context of the problem.

    My point came up most recently near the end of the comments to this post
    http://www.thebigquestions.com/2010/12/27/win-landsburgs-money/
    Steve gives an algebraic expression of his own, which happens to coincide with what I’m saying in the strange case of a country that has stopped reproducing permanently.

    What I actually showed is that when you terminate the whole country with a boy, you add an extra half boy to what is otherwise a string of fair coin flips.

    That point is the whole extent of the controversy here: Can a real country somehow take advantage of that effect?

    I suspect the answer is “only if they choose to become extinct.” But possibly I’m missing something, and I lack interest in that debate.

  16. 16 16 Tom

    I used boldface type above simply to make my central point easy to find. Please interpret it as boldface on a viewgraph, not as me raising my voice.

    Thanks.

  17. 17 17 PhilT

    In the previous comments it appears to me that Steve now understands that his reasoning is faulty. I sincerely hope that he writes a new article explaining this to all the readers who were taken in.

  18. 18 18 Roger Schlafly

    Steve, you have asked a trick question. You only get an answer different from 50% because of hidden assumptions that are (arguably) contrary to the spirit of the problem.

    Somehow you let Lubos get under your skin. You have attacked him without even linking to his blog post on the subject. You have sunk to his level.

  19. 19 19 Tom

    Alan,

    This statement may excite a kind of ‘immune response’ here, so please consider it carefully before responding.

    The core problem really is not whether we use the expectation of the ratio or the ratio of the expectations. It really is not. Yes those are distinct logically as every technical undergrad knows, and yes I believe the original problem statement asks for the expectation of the ratio.

    But, incredibly given the amount of ink spilled here, that distinction isn’t a key point for this problem.

    When we manage to somehow get the underlying ensemble to deviate from a string of fair coin flips, then the distinction between E(G/(G+B)) and E(G)/E(G+B) can affect our numerical result. When we don’t, it doesn’t.

    (Everyone: I should not have to say this, and I ask for the understanding of the many readers who will find it unnecessary and annoying. I feel your pain. But: before you respond, please read that last statement carefully and decide for sure whether you agree or disagree with it. Thanks.)

    The core question here is only this: can a country make its bitstream of births deviate from what the bitstream represented by a billion preflipped pennies stacked up in a tube?

  20. 20 20 Jonatan

    Tom >

    I don’t think that is the question. In my view, the country is a model, and I don’t care whether it will survive in the long run, what the demographics of the new population will be etc, etc. I suspect that this is the core disagreement between Lubos and Landsburg. Lubos views the aspects of it being a country as relevant to the problem, while Landsburg views it as an abstract, exactly like my coinflip example above.

    A personally thought that your insight that the imbalance is driven solely by the last half-boy was surprising. Above, Landsburg understands it, but just interpretates it into his framework. So I don’t think you have reason to be upset about that.

    I can see that you are right, by looking at the numbers. I was wondering whether you have a proof for it?

  21. 21 21 Steve Landsburg

    Lubos:

    There is another old brain teaser, about an ant trying to reach a food source 6 miles to the east. This ant travels 2 miles east every day, and 1 mile west every night. How long does it take to reach the food source?

    Here, it seems to me, is essentially what’s happened here: I posed a puzzle. You gave the wrong answer. Then you defended your answer by saying that no real-world ant would ever behave in this way, so of course we need to change the assumptions of the puzzle in a way that leads to your preferred answer. Then you insisted that any reasonable person would have made exactly the same ad hoc assumptions that you did, so, by not making those assumptions, I had essentially “changed the question” after the fact.

    All of your talk about sustainable populations is exactly in that category. This was a puzzle about a fictional country where each family stops reproducing after it’s had a boy — just like a puzzle about a fictional ant that travels 2 miles by day and 1 mile by night. The fact (if true) that any such country would be unsustainable is as relevant as the fact that any such ant would starve to death. It’s got nothing at all to do with what the puzzle is getting at.

    Now it is, perhaps, barely permissible to insist that the puzzle ant be subject to real-world constraints about ants’ dietary needs and therefore to reach an unorthodox puzzle solution. But I do not think it is reasonable then to insist that your answer is the only right one, and to accuse anyone who disagrees of confusion, incompetence and/or dishonesty. This is particularly true when the puzzler makes the assumptions crystal clear and follows them to a correct conclusion.

    Yet you still say:

    The problem is that he doesn’t allow new families to be created so he introduces a bias to the age of the couples who can have children – a bias that can’t arise in a real country.

    In other words: “I know you told me how the ant behaves, but that ant would starve, so I am going to completely change the problem so as to make the ant more like a real-world ant”.

    And:

    Any answer to the original question different from 50%:50% is just plain wrong.

    In other words: “And moreover, any answer that does not modify the original problem in exactly the way that Lubos did is just plain wrong.”

  22. 22 22 Steve Landsburg

    Alan Wexelblat: I agree that it would have been better to say “female births” instead of “fraction of population”.

  23. 23 23 Steve Landsburg

    Tom: I certainly understand the math behind your discovery, and I think I understand your preferred interpretation, which Neil (I think) summed up beautifully in the other thread. I lean toward accepting that interpretation, but I’d like to give it a little more thought first.

    Edit When I said “I think”, I dont mean that I think it was Neil; I know it was Neil. I mean that I think it was beautiful.

  24. 24 24 Neil

    Tom: Yes, I agree with your statement, and the “reproduce until boy” strategy introduces one-half of a non-random boy into a sample that the word “country” implies is large in size.

    Steve: I loved that cartoon.

  25. 25 25 PhilT

    Ahhhhh!

    I honestly thought that you finally understood you were wrong!
    Tom has now explained this over and over again. Lubos has given multiple detailed explanations but still you cling to your pride. Come on Steve admit the game is up, please!

  26. 26 26 Tom

    Steve,

    Thanks for the kind words, but I’m afraid my point is no discovery. It should have been the starting point.

    Neil,

    Yes. But whoever’s statistics you use, Steve/Thomas’ or mine, where are the grandchildren?

  27. 27 27 Jonathan Campbell

    Steve: Doesn’t your 2nd bullet point contradict Tom’s explanation?

  28. 28 28 Steve Landsburg

    PhilT: Does this mean you’ll take my bet?

  29. 29 29 Jonathan Campbell

    I am referring to your 2nd bullet point within the 2nd list of bullet points.

  30. 30 30 Steve Landsburg

    Tom:

    Of course whenever one finally understands something, one comes to realize that it should have been the starting point.

  31. 31 31 Steve Landsburg

    Jonathan Campbell:

    Steve: Doesn’t your 2nd bullet point contradict Tom’s explanation?

    It doesn’t, actually, though I can see why you might think this.
    But if you try working through an example where everyone stops after a fixed number of generations (regardless of whether they’ve completed their families) you’ll see that both my bullet point and Tom’s point are still correct.

  32. 32 32 Jonatan

    Did anybody come with a proof of Toms view though?

    For me it’s not obvious that the previous string of children are like a random string, once you remove the terminal child.

    (Note, I can see that he is right, I was just wondering about the logical proof.)

  33. 33 33 Neil

    Tom,

    The population dynamics bamboozled me when I first tried to answer this question. It probably still will, but your insight simplifies matters. My initial thought is that the surplus half boy shouldn’t make a difference in the “reproduce until boy” country because women are the constraining factor in reproduction, but the surplus half girl in the “reproduce until girl” country could seemingly make a difference over the long run.

  34. 34 34 Luboš Motl

    Dear Steve,

    your aggressivity is totally unsubstantiated. It is you who has been defending a wrong answer to a totally trivial math problem.

    The problem was given to people who wanted to work at Google. See

    http://mathoverflow.net/questions/17960/google-question-in-a-country-in-which-people-only-want-boys

    The official Google solution is 50-50, see the page above. They use what I call the “Iranian model” of the reproduction but surely obtain the correct result.

    Dear Jonatan, your flipping of the coin is totally isomorphic to the case of 1 family. The average proportion of girls in 1 family is 1-ln(2) = 30.6 percent. But that was clearly not the original problem.

    The original problem talked about a nation, not a family. And a nation is not one family. It is not even a fixed number of families. A nation is a set of families whose number and identity can change at every moment. This restores the complete balance between girls and boys and the only correct answer to any variation of such a problem that involves a nation is 50% simply because the proportion of boys among babies born in any period of time is exactly 50% whether or not the parents suffer from some preferences or attempt to deny the laws of biology.

    You’re a loser, Steve, and the longer you will refuse to admit that you have made an elementary error, the more self-evident loser you will become.

    Cheers
    Lubos

  35. 35 35 Jonatan

    Lubos >

    No. It would be isomorphic if there was only one person flipping a coin, and you tried to calculate the expected value.

    What if we had, say, 4 people each flipping a (different) coin, until they flip a heads?

  36. 36 36 Tom

    Jonathan C,

    As far as I know, it doesn’t contradict what I’m saying. If you proceed toward termination, but don’t reach it, then some countries in the ensemble have the extra half boy and some don’t. (That’s my understanding of what I’m saying. If you have a specific hole in that, I’d be interested to see.)

    As far as I can see Steve is analyzing things right for the special case of a country initially consisting of N childless couples, each of whom are willing to stop reproducing permanently as soon as they have a boy. (And we ignore infertility, cancer, divorce, women getting good and sick of listening to pedantic nonsense from their husbands and becoming separatists, etc.)

  37. 37 37 PhilT

    I will certainly not be taking your bet with 4 families where you craftily reworked the question.

    As to sending the original question to various stats departments, that bet seems far more fair. However, the fact that you are a stats professor and yet can clearly not see that you are wrong does worry me slightly. There is not the insignificant chance that the majority of the other ‘experts’ could get this wrong as well. After all, why would you have chosen a career in stats if you were smart enough for physics or maths ;)

    Added to this is the dilemma that I assume you know a good proportion of said stats profs. Therefore the potential for underhand dealings (especially when $15,000 is up for grabs) is not unsubstantial.

    How about another challenge then, could you ask some ‘esteemed’ colleagues of yours to come on to this blog and back you up publicly. As you’re well known it surely shouldn’t be hard for you to get 10 profs to say that your answer is correct (well it shouldn’t be hard IF your answer is correct).

  38. 38 38 Jonathan Campbell

    Steve & Tom: I agree there is no contradiction.

    Tom: You say “If you proceed toward termination, but don’t reach it, then some countries in the ensemble have the extra half boy and some don’t.”

    If you don’t reach termination (more specifically, if you don’t force the coin-flipping to stop on a boy), then it seems to me no countries have an extra half boy (although some will randomly end on a boy), and you will have 50% expected proportion.

    If you had written “If you proceed toward termination, and stop as soon as either a) termination has occurred, or b) N flips have occurred, then some countries in the ensemble have the extra half boy and some don’t,” then I would agree with that as an explanation for why there is no contradiction.

  39. 39 39 Tom

    Jonatan,

    The proof is almost embarrassingly simple once you see it. But I had to burn a lot of paper playing with the ensemble (the set of all possible birth sequences, for people just tuning in) before it stopped being embarrassingly difficult and suddenly became embarrassingly easy.

    I’ll let someone else post the proof. My axe to grind here is to get people to stop arguing and start looking at birth sequences.

  40. 40 40 Steve Landsburg

    Tom:

    I believe these things:

    1) I’ve been quoting your result as E(G/G+B-1) = 1/2 for completed families. You’ve been insisting (if I understand you) that your result is more general than this, because it applies (with an appropriate rewording) whether the families are completed or not). I agree with you. My apologies for not capturing the full generality of what you’ve done.

    2) After giving it some thought, I now buy your intuition for the result, which I think was captured most succinctly and eloquently by Neil when he said

    Removing the last flip means that if the non-random coin was added, it is removed, and if the non-random coin was not added, removing the last flip doesn’t make a difference.

    3) You have said

    The core question here is only this: can a country make its bitstream of births deviate from what the bitstream represented by a billion preflipped pennies stacked up in a tube?

    I see why you say this, but I disagree. Here’s why: We all knew from the start that a country can’t make its bitstream of births deviate from the bitstream of a billion flipped (or pre-flipped) coins. But none of us (including you) realized until quite recently what this implied. So surely there’s more to it than this simple question.

    Once again, thanks very much for teaching me something very cool.

  41. 41 41 Tom

    Johnathan C.,

    Yes. When I (and Steve I believe) said “stop short of termination,” we just meant run a computer simulation for a certain number of years, at one birth per family per year. (Here I’m thinking of the Dec-27-2010 problem statement.) I went on to impose a requirement that we order births arbitrarily within each year. So it’s equivalent to your last paragraph. (If you don’t agree with this, I’m open.)

  42. 42 42 Will A

    Lubos,

    It seems like everyone who scripted this simulation pretty much came up with Steve’s answer.

    What algorithm would you propose for simulating this. On of the first steps seems to be:
    – Create an array of k families representing a country.

    What should the algorithm to next? (And yes I know that in my current simulation I will hit 0/0). However

    Improbable,
    50 million seems closer to 1 than infinity to me.
    To 50 million seems closer to 1 than infinity.

  43. 43 43 Will A

    Lubos,

    Continuing from the typo above:

    However, what is the algorithm so that I can see the proportion of boys and girls as this population dwindles?

  44. 44 44 Jonatan

    Tom >
    “Embarrassingly simple” for me translates to “neat”. So I would like to see it if you or someone else decides to post it.

  45. 45 45 Luboš Motl

    Dear Will, the program that Steve wanted to earn some money from:

    Steve: I’ll tell you what.  Rather than keep arguing this, let’s settle it with a bet.  Let’s choose a  competent programmer to write a simulation in which 4 families each have one child per year, with each family stopping when it has  boy.  Let’s let this run for, say, 100 years and then calculate the fraction of girls in that country.  Let’s repeat this 1000 times and take the average fraction of girls.  I claim the answer will be about 43%; you claim it will be about 50%.  Let’s say I win if the actual average is under 46.5% and you win if it’s over 46.5%.  I will bet you $15,000 American that I will win this bet.  
     
    Of course, it’s possible we’ll have to mutually agree on a programmer and perhaps that will be a little tricky.  But we can agree in advance to have any dispute about the programmer in public so that people can see who’s being unreasonable.   
     
    Subject to working out the details, do you accept this bet?

    [This was written by Steve on my blog.]

    ==========================
    Fine: Mathematica code:
    ==========================

    Input:  
     
    sumOfFractions = 0; runs = 1000; years = 100;  
    For[run = 1, run <= runs, run++,  
     
      stillproducing = {1, 1, 1, 1};  
      girlsboys = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};   
      (* 0 is boy and 1 is girl *)  
     
      For[year = 1, year <= years, year++,  
       For[family = 1, family <= 4, family++,  
     
         randomsex = RandomInteger[];  
     
         girlsboys[[family, randomsex + 1]] =   
          girlsboys[[family, randomsex + 1]] + stillproducing[[family]]  
         ;  
         stillproducing[[family]] = stillproducing[[family]]*randomsex;  
         ];  
       ]; (* Print[MatrixForm[girlsboys]]; *)  
      fraction = Total[girlsboys[[All, 2]]]/Total[Flatten[girlsboys]];  
      sumOfFractions = sumOfFractions + fraction;  
      ];  
    overallGirlPercentage = sumOfFractions/runs  
    N[overallGirlPercentage]  

     
    Output:  
     
    12803786239/29099070000  
    0.44000672  

    =============================
    Modified input that computes weighted percentages, with weights given by the number of kids in each history:

    sumOfFractions = 0; runs = 1000; years = 100;  
    totalweights = 0;  
     
    For[run = 1, run <= runs, run++,  
     
      stillproducing = {1, 1, 1, 1};  
      girlsboys = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};   
      (* 0 is boy and 1 is girl *)  
     
      For[year = 1, year <= years, year++,  
       For[family = 1, family <= 4, family++,  
     
         randomsex = RandomInteger[];  
     
         girlsboys[[family, randomsex + 1]] =   
          girlsboys[[family, randomsex + 1]] + stillproducing[[family]]  
         ;  
         stillproducing[[family]] = stillproducing[[family]]*randomsex;  
         ];  
       ]; (* Print[MatrixForm[girlsboys]]; *)  
      weight = Total[Flatten[girlsboys]];  
      fraction = Total[girlsboys[[All, 2]]]/weight*weight;  
      sumOfFractions = sumOfFractions + fraction;  
      totalweights = totalweights + Total[Flatten[girlsboys]];  
      ];  
    overallGirlPercentage = sumOfFractions/totalweights  
    N[overallGirlPercentage]  
     
    Output:  
     
    519/1019 = 0.5093  
    With a higher number of runs, you get closer to 50%, arbitrarily close.

    The non-weighted average – over a finite number of families *and* children subject to the rule – converges to 1/2-1/4k percentage of girls for k families when k is large.

  46. 46 46 Ricardo Cruz

    Hi Prof Landsburg,

    If I understood the answer correctly, I think a graph showing the probability distribution, and how the average is tilted to the boys side (from the 1-0 50% probability), would go a long way to make the answer more intuitive.

    Sounds something trivial to plot, but I personally am not very familiar with statistics software: any takers?

  47. 47 47 Thomas Bayes

    Hey Lubos,

    Based on the reasoning you’ve used, I’d like to learn your answers to some questions.

    Suppose we have two countries that use some birth rule. It could be the one Steve outlined in his original question, or it could be some other. (But it can’t be one that eliminates any of the children after they are born.) For Country 1, the number of girls is G1 and the number of boys is B1. For Country 2, the number of girls is G2 and the number of boys is B2.

    Here are the questions:

    1. What are the expected values for the differences D1=B1-G1 and D2=B2-g2?

    2. What is the probability that the difference D1=B1-G1 is equal to zero for a large population size? Same question for D2=B2-G2.

    3. What is the expected value for the ratio D1/D2?

    4. What is the expected value for the ratio D2/D1?

    I’m asking these questions because you explain much of your reasoning in a way that obfuscates the mathematics for me. If, for example, I used my understanding of your reasoning on these questions, I would answer question 2. by saying that, for a large enough country, the probability that the number of boys is equal to the number of girls is exactly 0. (Sure there is a population size dependence, but we’re not concerned with small populations, so I’ll argue that this number is exactly 0.) Then I would argue that D1 and D2 have the same symmetric distribution, and, because they are independent, they are just as likely to have the same signs (positive or negative) as they are to have different signs, so the expected value of their ratio must be zero. I’m not sure how I’d go about finding a consistent answer for both questions 3 and 4, though. But that is my interpretation of the reasoning you’ve been using for the other problem, so I’d like to learn what you say about this one. I suspect you’ll correct my reasoning; that is why I’ve asked. But, of course, I’ll test any corrections you provide to this reasoning by applying them to Steve’s original question.

  48. 48 48 Ricardo Cruz

    By the way, can you guys clarify something for me: the expected value means that if I were to implement such a policy in my country (eheh), then I should expect (ever so slightly) to get more boys than girls (and less kids in total). (or is that the median case? boy, am I confused ;))

  49. 49 49 Ken

    Steven,

    This reactions of people to your solution reminds me a lot of the reactions I get when I explain the Monty Hall problem. They think they’ve been tricked, when in fact, like Lubos, they simply add more assumptions that change the problem to the one they want to solve.

    People don’t understand probability, but think they do. When it is pointed out that they solved a problem incorrectly they say it’s your fault and that you tricked them.

    Don’t let Lubos get you down, just recognize that in his arrogance and in the face of the knowledge that he IS wrong, he says extraneous things like the problem is stupid because no population could sustain those ratios. Of course, he knows that doesn’t have anything to do with the problem, he is simply misdirecting.

    Lubos and people like Lubos are deserving of nothing but scorn and ridicule. He willfully ignores that fact that the original question clearly asked for the computation of E(G/(B+G)), but instead insists that in the “real world” that’s a stupid computation, so he calculates EG/E(B+G) and says that’s the right answer.

    Ignorance has a cure, but there’s no cure for stupid.

    Best regards,
    Ken

  50. 50 50 Tom

    Ken,

    Careful.

  51. 51 51 Steve Landsburg

    Ken: Since you bring up the Monty Hall problem, you might be interested to know that I’m pretty sure I was the person who introduced this problem to the mathematical community. It was circulating among economists, and then I started asking it of mathematicians. For many years, many mathematicians thought I had invented this problem, and in fact an article was slated to appear in Scientific American identifying me as the inventor. (I got a last minute call from a Sci Am fact checker, and I set the record straight on this.)

    The range of reactions and answers from well known mathematicians — many of them much smarter than me — was a wondrous thing to behold. I hesitate to recount all of that with names attached, because, after all, people were not intentionally speaking for publication. Suffice it to say that the time it took to understand the answer ranged from minutes to weeks, with no strong correlation between mathematical brilliance and the time it took to understand the solution. So surely these little puzzles engage some not-purely-mathematical part of the brain.

  52. 52 52 Ken

    Here is a small C program for people to see what E(G/(B+G)) is:

    #include
    #include

    int main ( void )
    {
    double pg, b, g;
    int n,i;

    printf(“How many families? “);
    scanf(“%d”,&n);

    for ( i=0; i<n; ++i )
    {
    b = 0.0;
    g = 0.0;
    while ( b==0.0 )
    {
    if ( rand() < (RAND_MAX/2))
    b = 1.0;
    else
    g = g+1.0;
    }
    pg += (g/(b+g));
    }
    pg /= (double) n;
    printf("With %n families the expected proportion of girls to the population is %1.2f.\n",n,pg);

    return 0;
    }

    The largest number I got for pg was 0.41.

    Regards,
    Ken

  53. 53 53 Nick

    Landsburg points out his opponents’ “errors” by asserting that the “average proportion of females” has but one interpretation. What’s funny is that a lot of this silliness could have been avoided if he had framed the problem using precise statistical terms that exist for the very reason of preventing ambiguity. Had he done this, I doubt Lubos would have ever taken issue with the original post.

    Landsburg is resistant to the idea that English is a mathematically imprecise language. His latest blogs invoke painful memories of sitting for one-page macroeconomics exams where prepared students were paralyzed by the lack of specificity and punished for not fortuitously closing information gaps.

  54. 54 54 Ken

    Nick,

    What’s funny is you apparently missed that he did use precise statistical terms:

    “… in expectation, what fraction of the population is female?”

    This sentence, as I have pointed out a couple of times now literally means, “what is the expectation of the fraction of the population is female?” In other words he did use precise statistical wording (expectation of the fraction), but other people chose to interpret those words in a flexible manner. Steven is usually very precise in his language.

    By the way that sentence is from the original post, yet Lubos STILL takes “issue with the original post.”

    Regards,
    Ken

  55. 55 55 Will A

    Nick,

    My only issue with what you are saying is that people with similar backgrounds will interpret questions/puzzles differently.

    I believe that Steve is betting that a majority of statisticians will say that his interpretation of the puzzle is correct.

    My guess is that he wouldn’t be willing to bet as much money on whether a major Women Studies professors would have a different analysis.

    From what I’ve seen, the majority of coders on this post seem to buy the interpretation with small variances as mentioned above. I.e. I ran the code and yes it’s never exactly 50%, but it gets close as k increases so it’s basically 50%.

    It seems to me you would probably want to argue that the majority of statisticians would interpret this puzzle differently.

  56. 56 56 Will A

    Meant:

    My only issue with what you are saying is that people with similar backgrounds will interpret questions/puzzles similarly.

  57. 57 57 Jonathan Campbell

    Tom: I agree with this. Thanks for your helpful explanations.

  58. 58 58 Nick

    Landsburg’s arguments absolutely follow from his interpretation of the question but to me, some or all of “what fraction of the population is female,” “what fraction of the population should we expect to be female,” and “average proportion of females” could plausibly be rendered as the ratio of expectations, for the same reason a scientific calculator won’t necessarily understand “A plus B times C” without appropriate syntax.

    For what it’s worth, I do agree with Ken that

    …in expectation, what fraction of the population is female

    is about as precise as you’re going to get with the English language. But there’s a certain informational loss – why else would he have to state the same thing three times? – that occurs when you abandon statistical notation for layman’s terms.

    Whether you’d care to admit it, linguistic hooliganism is what separates this from the venerated Monty Hall problem.

  59. 59 59 Dave Losna

    English not being my mother tongue, but in the same time being the language I had to use while getting my MBA degree and then for the next 3 years of my professional life (so I guess I have some elementary grasp of it), I would like to share this opinion:
    It seems to me, that Steve has interpreted the problem using additional assumption(s) that the original problem description was not calling for. Namely that this “country” is allowing for only one generation and after that is going to die off. This is contrary to any common sense definition of “country”. I am sure that the Google people had in mind an ongoing process where the children make pairs and keep procreating under the same rules. It may be OK that Steve had used these extra assumptions, but then he is guilty of not stating them clearly and explicitely at the beginning of his original analysis. Therefore I believe that this lack of clarity in the definition of the question is the core of the whole “controversy”.

  60. 60 60 Michael

    Steven has adequately responded to all of my objections but one. Is a single generation model an adequate proxy for a living population?

    In a living population, you end up with net bachelors or net maidens. In one-boy-land, net bachelors results in shrinking number of children, but net maidens results in a stable number of children. (My simulation below assumes instant reproductive maturity and no mortality).

    Net bachelors can be terminal with no new female offspring after time t. In my simulations, whether the expected ratio is ultimately less than 0.5 or greater than 0.5 depends on whether terminal all-bachelor countries are included or excluded from the average after they terminate.

    For populations large enough to preclude net bachelor death spirals, the expected ratio still declines with each succeeding reproductive cycle. This is somewhat counter to the current line of reasoning that the expected ratio converges asymptotically to 0.5 from below for large populations.

    I’m curious what people think about my model, or if there are coding errors that I’m missing. My platform of choice is SAS. Hopefully it’s readable for those who use R (or Mathematica).

    %macro simulate(mates,years,sims);
    Data bunnysim;
    do sim = 1 to &sims;
    mates = &mates;
    bachelors = 0; maids = 0; complete = 0; Cat = ‘N’;
    do year = 1 to &years;
    if mates = 0 then boys = 0;
    else boys = rand(‘BINOMIAL’,0.5,mates);
    girls = mates – boys;
    newmates = min(boys+bachelors,girls+maids);
    ratio = (complete + mates + maids + girls)/(complete*2 + mates*2 + maids + girls + bachelors + boys);
    output;
    complete = complete + boys;
    mates = mates + newmates – boys;
    bachelors = bachelors + boys – newmates;
    maids = maids + girls – newmates;
    if mates = 0 then Cat = ‘T’;
    else if bachelors > 0 then Cat = ‘B’;
    else if maids > 0 then Cat = ‘M’;
    else Cat = ‘N’;
    end;
    end;
    run;
    proc summary missing nway data=bunnysim;
    class year;
    var complete mates bachelors maids boys girls newmates ratio;
    output out=bunnysum (drop=_type_) mean=;
    run;
    proc summary missing nway data=bunnysim;
    where cat ne ‘T’;
    class year;
    var complete mates bachelors maids boys girls newmates ratio;
    output out=bunnysum2 (drop=_type_) mean=;
    run;
    %mend;
    /* Syntax
    %simulate(# of starting couples,
    # years in each simulation,
    # simulations) */
    %simulate(5000,10000,3000);

  61. 61 61 Luboš Motl

    Dear “Thomas Bayes”,

    1) in any large sustained population, the expected value of B1-G1 is zero because girls and boys are born equally likely, regardless of any stopping rule or its absence. The width of the distribution – the typical error margin – scales like sqrt(B1+G2)

    2) What is the probability that the difference D1=B1-G1 is equal to zero for a large population size? Same question for D2=B2-G2.

    LM: If you want zero “exactly”, then the probability goes like 1/sqrt(B1+G1) because roughly sqrt(B1+G2) values of the difference around zero have a significant probability to occur. I could tell you the numerical coefficient in front of the square root if you needed it. The answer for D2=B2-G2 is obviously 1/sqrt(B2+G2) for the same reason.

    3. What is the expected value for the ratio D1/D2?
    4. What is the expected value for the ratio D2/D1?

    LM: Obviously, these expectation values are ill-defined because there is a nonzero probability for both D1 and D2 to be zero, as I have just calculated. So the expected value has a term in the numerator that goes like Prob(D1=7,D2=0).7/0 which is an infinite term. One can’t divide by zero.

    In other words, the distribution for D1/D2 or D2/D1 has a nonzero support (also) at infinity which makes the averages etc. diverge.

    At any rate, your questions are not terribly useful, well-defined, and they don’t have much to do with the original problem which is damn well defined and the right answer is 1/2.

    Best wishes
    LM

  62. 62 62 Thomas Bayes

    Lubos,

    I believe the questions are well-defined because you understood them perfectly. I believe they are useful because they’ve helped us established that there are situations for which you don’t believe that 1/K or 1/sqrt(K) terms are trivial and should be ignored. And, finally, they have much to do with the original problem because, for that problem, the difference between Pr(B>G) and Pr(G>B) is precisely equal to Pr(G=B), and you’ve established that this is a probability that should not be ignored for any size country. Thank you.

  63. 63 63 Tom

    I think we’ve dealt pretty well with the special case of a single-generation country with zero grandchildren. Anyone disagree?

    So. How do we handle the more general case with grandchildren, great-grandchildren, etc? It seems clear that instead of terminating the national birth sequence, we continue to add new families.

    Question: Do we still get a national “terminal half boy” if the national birth sequence no longer terminates?

  64. 64 64 Michael

    Tom:

    “Question: Do we still get a national “terminal half boy” if the national birth sequence no longer terminates?”

    In the general case, as long as B-G<k, where k is the initial number of families, then there are incomplete families. This is a feature to be embraced not corrected, as the problem statement in no way implies that the solution requires all families to be complete.

    My question is, does a country with zero remaining unmarried girls, and thus no future children, still count in the expectation? That is, when there is nothing left but bachelors with rotting teeth, is it still a country?

  65. 65 65 ErikR

    Three internet pages I checked phrase the original google question as:

    What is the proportion of boys to girls in the country?

    If we interpret that as E(B/G), then the answer to the google question is exactly 1.

    So, if Steve wanted to change the google question to inform people that E[G/(G+B)] is not 1/2, he should have used a different problem, and not referenced the google question.

    If Steve had led with TB’s coin-flipping gamble, that would have been more informative and less controversial.

  66. 66 66 Steve Landsburg

    ErikR:

    If we interpret that as E(B/G), then the answer to the google question is exactly 1.

    No it isn’t. Presumably you think you have a proof of this. If you’d care to post that proof, I’ll be glad to find your mistake for you.

  67. 67 67 Tom

    Michael,

    I’m talking about grandchildren. Teeth or no teeth, our current model only handles the tragic special case in which children can never form new couples and reproduce.

  68. 68 68 ErikR

    Steve,

    My mistake, I meant to type E(B)/E(G) is exactly 1. Actually, given the context and my previous comments, I am surprised you were not able to reason that out!

  69. 69 69 ErikR

    Steve,

    By the way, I am curious what you think E(B/G) is. (this time, I double-checked my post and typed what I meant)

    Anyway, in the original google question, even if you first interpret it to ask for E(B/G) instead of E(B)/E(G), then I think you should quickly be able to reason out that the question was NOT asking for E(B/G). Since E(G/B) = E(G) = 1 exactly, it would seem rather silly for the question to ask for E(B/G). Equally silly to interpret it as E(B) / E(B+G), when you could easily interpret it as E(B)/E(G). The
    most reasonable interpretation of the original google question is clearly E(B)/E(G) = 1.

  70. 70 70 Ravi

    Steve,

    Can you please do a post on the Monty Hall problem? I know there wouldn’t be any ‘twist’ in it, since a lot of people are familiar with it- but your crystal clear explanation will make it worthwhile.

  71. 71 71 Steve Landsburg

    ErikR: For any finite population, there is some (perhaps very small but still non-zero) chance that there will be zero girls. So there is some (perhaps very small but still non-zero) chance that B/G is infinite. When we average that in with all the other possible values of B/G, we still get infinity. So E(B/G) is infinite.

  72. 72 72 Steve Landsburg

    Ravi: I’ll consider this. Thanks for the suggestion.

  73. 73 73 Neil

    Tom: “Question: Do we still get a national “terminal half boy” if the national birth sequence no longer terminates?”

    Probably not. To get an answer, one has to make assumptions. If the current breeding pool of women finishes reproducing before any new women enter the breeding pool, yes there will be a terminal half boy. But since women reproduce over many years and new women enter reproductive ages all the time, it seems the process is forever refreshed and at any time there is no terminal half boy. The coin never stops flipping. Your triumph over Steve will be complete.

    But lets face it–there are innumerable other factors that affect the sex ratio. This was a problem in mathematics, not demography.

  74. 74 74 ErikR

    Steve,

    Looking at the original google question, would you disagree that the simplest way to translate “proportion of boys to girls in the country” into mathematical notation is either E(B)/E(G) or E(B/G)? The term “proportion” is ambiguous in this context, but wouldn’t you agree that most people, when talking about a proportion of two quantities that are close to equal, would say the proportion is 1 to 1, or just 1?

    So, if the choice is between E(B)/E(G) and E(B/G), and since you know the second quantity is infinite, and the first is 1 exactly, wouldn’t the most reasonable interpretation be E(B)/E(G)?

    Similarly, why would you want to interpret it as E(B) / E(B+G), which is 1/2, when you could have gone with E(B) / E(G) which is 1? Even sillier to interpret it as E( B/(B+G) ) which >=1/2 depending on the size of the country and at what point in time you count all the children?

    What do you think would be the majority interpretation if the original google interview question, quoted below, were given to a random sample of people who work in areas requiring good quantitative skills (engineers, scientists, statisticians, accountants, etc.)?

    In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?

  75. 75 75 Vladimir

    Prof. Landsburg,

    Consider this above statement by Luboš Motl: “[I]f you have any large ensemble of births, the fraction of girl-births converges to 50%: it is *not* 43% but 50% exactly.” I think you are not giving proper consideration to the power of this simple argument, which is just a corollary of the law of large numbers.

    Namely, the original question asks about the population of a country. It is surely not unreasonable to assume that this number is large. Thus, a large ensemble of births plus the above observation imply that the fraction of the population that is female is 50%. So what’s the problem with this simple argument? The problem is that it doesn’t work if “the population” is in fact small enough that the law of large numbers is not applicable.

    Take your case with four families. When we simulate that case a bunch of times, a very large ensemble of simulated births (i.e. all simulations taken together), itself divided half-half between the sexes, is partitioned into a bunch of very small ensembles of different sizes (i.e. each simulation of a single-generation four-family case taken separately), and we observe the ratios pertaining to each small ensemble. Now the law of large numbers cannot be applied to each single small ensemble, and the fractions indeed end up behaving counter-intuitively, not averaging to 1/2 because the sizes of the small ensembles are unequal.

    However, if we’re talking about a large number of births, as would be reasonably assumed if the question is about the population of a country, then the straightforward law-of-large-numbers-argument seems correct to me. Simply from the fact that we’re dealing with a large number of births without the possibility of sex-selection, it follows that it’s vanishingly unlikely that the sex ratio of the resulting population significantly deviates from 1:1.

    If you think this argument is incorrect, I’d be very curious to see your critique.

    Best regards,

    Vladimir

  76. 76 76 Ravi

    ErikR ( & others who have issues with the interpretation…)

    The whole point of this puzzle (or puzzles of this kind) is that they incorporate a red herring –which most people (irrespective of IQ/area) fall for and it’s only after repeated readings and discussions, one gets the ‘aha’ moment. It’s therefore pointless to argue that most people would interpret it the ‘standard’ way and hence the ‘standard’ way is correct. Which is why Steve brings in the Monty Hall problem as an example that produced a similar debate!

  77. 77 77 Steve Landsburg

    Vladimir: Your argument correctly computes E(G)/E(B)+E(G). It does not correctly compute E(G/B+G), which *by definition* says to first compute G/B+G in each country individually, and then to take the average of those results.

  78. 78 78 Steve Landsburg

    Ravi: Extremely well put. Thanks.

  79. 79 79 ErikR

    Ravi,

    No, you are thinking of riddles or word games, for example, the GRY puzzle (see below), where the intent is to mislead most people about what is being asked. The riddler deliberately tries to confuse you as to what is being asked.

    In the case of the google interview question, we are talking about the interpretation of an honest question where the intent was not to mislead people about what was being asked but rather to present a question that may have a non-intuitive solution, even after you understand what was asked. In this case, the reasonable way to proceed is to try to understand what the questioner intended to ask you.

    Think of words ending in -GRY. Angry and hungry are two of them. There are only three words in the English language. What is the third word? The word is something that everyone uses every day. If you have listened carefully, I have already told you what it is.

  80. 80 80 Pietro Poggi-Corradini

    One model for “several generations” would be to consider the standard branching process with off-spring distribution given by the geometric distribution. Since there are an average of 2 kids per family this population has a chance of not going extinct. If Z_n is the population at generation n, we know that there is exactly one boy per family and there are Z_{n-1} families. So we’re interested in the expectation of Z_{n-1}/Z_n. Maybe we could also condition on the event of non-extinction. I haven’t tried to do any calculations, but I thought I’d throw it out there.

  81. 81 81 Joseph

    Steve Landsburg
    December 30, 2010 at 10:23 pm

    Vladimir: Your argument correctly computes E(G)/E(B)+E(G). It does not correctly compute E(G/B+G), which *by definition* says to first compute G/B+G in each country individually, and then to take the average of those results.

    The question, as you stated it on http://www.thebigquestions.com/2010/12/22/a-big-answer-2/, was:

    “There’s a certain country where everybody wants to have a son. Therefore each couple keeps having children until they have a boy; then they stop. What fraction of the population is female?”

    Nothing there about “expectation,” nor was there in the original Google question. That is something that you have added. The accusations that you have changed the original question are sound.

    Vladmir’s comment at 10.13pm is exactly right.

  82. 82 82 Ken

    ErikR,

    Why are you looking at a question posted elsewhere and not Steven’s question? There is no link in Steven’s post to direct you to another page from which to answer any other question that you want to answer (really your desperation is showing). Why aren’t you referring to Steven’s post, which contains the question he asked? Why are you trying to introduce words he didn’t use?

    No need to answer these questions. I know why. You desperately want to be correct, even though you are clearly wrong. You want to change the words “in expectation, what fraction” to something else because you can’t believe that you could possibly be wrong.

    It’s fun to watch people run in circles and think they are getting somewhere. Listen to yourself: “What do you think would be the majority interpretation”. As if mathematics is proven my majority rule. I’m laughing at you. Ha!

    Regards,
    Ken

  83. 83 83 Anonymous Cosmologist

    Dear Steven,

    I’m a Professor, and a regular reader of both your and Lubos’ blogs. Actually these are my favorite blogs on the Net (This doesn’t mean I like everything about them). In fact, the two of you have similar opinions on a number of subjects, so this little feud was pretty surprising to me.

    It seems that for a while you thought that there is an interesting disagreement here, about mathematical questions, having to do with one lemma or other. Finally I think you are realizing that the disagreement is only about the meaning of the words of the original question, i.e., it’s not so interesting (and not worth betting on. Who wants to bet whether some group of people would misinterpret a question?)

    As I say, arguing about words is not so interesting (unless you’re a Philosophy Professor, which I am not). But for what it’s worth, I think the (at least main) issue here is rather simple. When most people read “country” they understand that as invoking the large-N limit of the number of families (i.e., at least millions). We all agree that the answer to that is 50% (to high accuracy). End of story. The notion that the natural reading of a “country” is one family, or four families, seems to me to be extremely weird. So, in my view, everything you have been writing about is an interesting extension of the original question. But I don’t see why you stubbornly insist that it IS the original question (and that Lubos, google, etc., are all wrong, and deserve unflattering names…).

  84. 84 84 Ravi

    ErikR

    Honestly I’d Monty Hall in mind when I wrote my comment. IMO, you are being unfair when you compare this puzzle to the word games that you referred to. Another similar puzzle I can think of is the one posted a couple of months (?) earlier on this blog

    A woman has two children, one of whom is a boy born on a Tuesday. What is the probability they are both boys?

    The above puzzle, obviously, did not generate as much heat- but at the heart of it- there was this nagging question- ‘what has Tuesday got to do with the sex of the child’- similar to ‘what has the stopping rule got to do with the female fraction of the population.’

    While I am not claiming these two puzzles are conceptually alike, I noticed that the initial reactions (barring a few exceptions of course) are similar. In the face of something counterintuitive, people tend to cling to their intuitions harder, in effect, betting against Math. While you might dismiss that reaction as human and harmless in this context of this puzzle, I can think of another situation- where the consequences have been drastic. I know I am treading into dangerous ground here… People (including smart scientists) took a ridiculously long time to accept the theory of Natural Selection, because it seemed impossible that an incredibly complex organ like eye could evolve on its own with no help from a master designer. The theory itself isn’t complicated, just that its implications ran contrary to the human intuition. I don’t think it’s a good idea to bet against Science or Math, when something seems counterintuitive

  85. 85 85 Fenn

    Steve, I don’t know if there’s a need to explain Monty Hall– it’s already out there.

    But I do think you have a knack for explaining difficult concepts and repeat a request from a year or so ago: I’d love to hear you explain a problem from David Friedman’s “Hidden Order.”

    How is it that someone who buys a house is better off not only if the value of the house rises, but also if it falls? Never got my mind around that one.

  86. 86 86 Vladimir

    Steve Landsburg:
    Your argument correctly computes E(G)/E(B)+E(G). It does not correctly compute E(G/B+G), which *by definition* says to first compute G/B+G in each country individually, and then to take the average of those results.

    Indeed – but my point was that the simple law-of-large-numbers argument fails only when the total number of births in each country individually is small (so that the “large numbers” part is inapplicable). If each individual country is large, then it is vanishingly unlikely that G/(B+G) for it significantly deviates from 1/2, which follows purely from the fact that the country by itself features a large ensemble of births.

    In contrast, in a very small country such as your four-family scenario, G/(B+G) may well be far from 1/2 – just like when you flip a fair coin only a few times, no logically possible ratio of heads to tails would look too surprising. For the counter-intuitive reasons you have already explained at length, E(G/(B+G)) will significantly deviate from E(G)/(E(G)+E(B)) if you flip a coin as long as you’re getting tails, or if you beget children as long as you’re getting daughters.

    But if a country is large and produces a large ensemble of births by itself, I see no reason why it’s fallacious to apply the law of large numbers to it directly and conclude that G/(B+G)~1/2 for it with probability very close to one. Therefore, I don’t think you can dismiss the original (supposed) reasoning of the people from Google as invalid, if you grant (as I think you should) that it’s reasonable to assume that “country” implies a very large group of people.

    Best regards,

    Vladimir

  87. 87 87 Anonymous Cosmologist

    A few more comments:

    I think the idea of the original question is related to, but different from what Steve has written. The point is that people may intuitively expect that if families try to have more boys, by stopping after a boy, this would produce an asymmetry in the population. Indeed, part of this intuition comes from the fact that individual families do become male-dominated on average (which is what Steve has focused on). But the point is that in fact the overall population remains evenly split. One way to see this is to take two infinite sums, one for the total number of boys, and one for the total number of girls, and see that each gives N, the number of families (the sums are infinite, of course, in the limit N goes to infinity, which is implied by the word “country”). There is, however, a much simpler argument: Every family has a first child. Half of those are boys and half are girls. Some families have a second child. Half of those are boys and half are girls. Some have a third child, etc.

  88. 88 88 Tom

    Neil,

    I think you’re probably right.

    While I’ve also become very attracted to the mathematical problem we’ve all spent so much time on, I don’t see that the multi-generation case is any less mathematical. Less interesting, ultimately, I suspect. Because a lot of depressingly unsubtle arguments will probably come back from the dead and start working again. But not less mathematical.

  89. 89 89 Tom

    Michael,

    I couldn’t quite understand what you wrote. If it turns out to be true that we get squads of excess boys from whatever source, they may turn out to be very lonely. How that will impact their dental hygiene I hesitate to predict.

  90. 90 90 Tom

    Pietro,

    That’s an excellent point. I had to read your comment several times before it hit me.

    We don’t know whether the population defined in the original problem statement becomes extinct, even with fertile children. The answer in steady state might be no boys, no girls, just bleached bones. Now that could be mathematics in the service of zapping Google’s question, without limiting ourselves to a special case.

    Because, personally, right now? We all publish and we tell Google, you’re wrong because children can never reproduce? I don’t need to be an author on that paper.

  91. 91 91 Steve Landsburg

    Joseph: You might want to try reading one paragraph further in the post you quote.

  92. 92 92 Steve Landsburg

    Anonymous Cosmologist:

    When most people read “country” they understand that as invoking the large-N limit of the number of families (i.e., at least millions).

    That’s fine, but then of course the answer is still not 50%. See Thomas Bayes’s various comments for reasons why the tiny difference can be of practical importance. Surely there’s no doubt that it’s of theoretical importance.

    And most importantly, as I’ve stressed repeatedly —- the argument Lubos is invoking *still* leaps from E(G) = E(B) to E(G/G+B) =1 so that even if he’s reaching the right conclusion, he’s still getting there by an invalid argument. And of course, it’s the argument, not the conclusion, that’s interesting here.

  93. 93 93 Steve Landsburg

    Anonymous Cosmologist:

    I think the idea of the original question is related to, but different from what Steve has written. The point is that people may intuitively expect that if families try to have more boys, by stopping after a boy, this would produce an asymmetry in the population.

    This, of course, is the simplest way to go wrong. It amounts to a failure to recognize that E(G) = E(B). Fortunately, the denizens of The Big Questions are almost all too sophisticated to fall for that one!

    This raises an interesting analogy. I claim that the answer to the original problem is not 1/2. Suppose someone comes along and says “Of course it’s not 1/2! The stopping rule produces an asymmetry in the likelihood that any given birth will be a boy!”.

    That person is getting the right answer (namely “not 1/2”) for the wrong reason (namely “stopping rule produces asymmetry”). Should we say that person is basically right or basically wrong? It seems clear to me that that person is 100% wrong.

    Likewise, what if we ask “What is the limit of E(G/G+B) as the population gets large?” Many people are saying “It’s 1/2 because E(G)=E(B) and that always implies E(G/G+B)=1/2”. Again, right answer, wrong reason. And again, no credit.

  94. 94 94 achilles

    Lubos:

    There is another old brain teaser, about an ant trying to reach a food source 6 miles to the east. This ant travels 2 miles east every day, and 1 mile west every night. How long does it take to reach the food source?

    Here, it seems to me, is essentially what’s happened here: I posed a puzzle. You gave the wrong answer. Then you defended your answer by saying that no real-world ant would ever behave in this way, so of course we need to change the assumptions of the puzzle in a way that leads to your preferred answer. Then you insisted that any reasonable person would have made exactly the same ad hoc assumptions that you did, so, by not making those assumptions, I had essentially “changed the question” after the fact.

    All of your talk about sustainable populations is exactly in that category. This was a puzzle about a fictional country where each family stops reproducing after it’s had a boy — just like a puzzle about a fictional ant that travels 2 miles by day and 1 mile by night. The fact (if true) that any such country would be unsustainable is as relevant as the fact that any such ant would starve to death.
    ***************

    Why would this ant starve to death? Isn’t this another example of how you don’t really understand the problems you pose?

    *****************

  95. 95 95 Daniel R. Grayson

    I’m one of the mathematicians who was at a dinner table at a math conference in 1987 when Steven introduced us to the Monty Hall problem. The eight of us puzzled about it throughout dinner, for at least 45 minutes, and (I think) we eventually came around to the right answer. Why did no one get the right answer immediately? That’s peculiar! In any case, I found the puzzle so charming that I used it in my honors problem-solving course every time I taught it.

    My reaction to this puzzle is essentially the same.

  96. 96 96 Pietro Poggi-Corradini

    Tom,

    I’m not sure I understand your entire comment. Actually, after submitting the comment I realized that the probability of no children is zero, so the problem of extinction doesn’t arise (Z_n is always greater than Z_{n-1}). Still this would be a strange way of reproducing where you can have a family whether you are boy or girl (and don’t need partner for it!). In any case computing the expectation of Z_{n-1}/Z_n doesn’t seem like an easy thing to do.

  97. 97 97 Steve Landsburg

    You know, it just occurs to me that Lubos is essentially arguing that no real-world country has any chance of becoming extinct.

    But of course there is a non-zero chance that every family in the current generation of Americans will produce all boys, and that the next generation will therefore be the last. And likewise for any example with a finite current population.

    So according to Lubos, any allowable interpretation of the word “country” must assume an infinite population. Curiouser and curiouser.

  98. 98 98 ErikR

    Ravi,

    I’m afraid you have misunderstood what I wrote.

    You wrote:

    you are being unfair when you compare this puzzle to the word games that you referred to.

    No, I was CONTRASTING the riddle with this question. You were the one who was suggesting that the google question (not the solution) was likely to be misinterpreted by many people. You may want to read my earlier comment again to understand my point.

  99. 99 99 Neil

    Steve: “But of course there is a non-zero chance that every family in the current generation of Americans will produce all boys.”

    It just occurs to me, that this is also the answer to Tom’s question of whether there is a terminal half boy when you consider the reproduction of subsequent generations. Yes, in the highly unlikely but not impossible event that some generation will produce no girls, there must be a non-random terminal half-boy, so even accounting for reproduction of descendents, the expected proportion of girls is less than .5, although unimaginably close.

  100. 100 100 Tim C.

    Anonymous Cosmologist:
    The “end of story” is not that we all agree that a large country (i.e., millions of families) of the above described properties will be composed of roughly 50% boys and 50% girls. We do all agree on that, and Dr. Landsburg never disputed that point.

    The end of the story — and the interesting thing about this problem — is that in such a country as Dr. Landsburg has posed (no matter how many families), the number of girls will NEVER quite reach 50%. It comes damn close the higher the number of families, but it never gets there. And that result is, at least in my mind, interesting.

    It’s interesting because it isn’t immediately intuitive; yet, when you adopt the assumptions Dr. Landsburg adopts, and open your mind to the fact that you’re not so clever as you thought, it becomes sensible and true. I typically find such questions/answers interesting, because I consider myself intelligent and am almost always pleased to learn something new.

  101. 101 101 Pietro Poggi-Corradini

    Sorry for being slow. The branching process should only keep track of the females (they’re the ones that can have kids!). So now there’s a 1/2 probability of no descendants and the population can definitely go extinct. Again assuming that each family has exactly one boy, one would have to compute the expectation of the ratio Z_n/(Z_n+Z_{n-1}), since the number of girls is Z_n and the number of boys is Z_{n-1}.

  102. 102 102 Roger Schlafly

    This problem has two things in common with Monty Hall — it is very sensitive to the wording of the problem, and being asked in a sloppy way induces people to fall into a trap. The argument here is entirely about the sloppiness of the wording.

  103. 103 103 TF

    The careful mathematical analysis is a bit beyond me, BUT I’ve managed to convince myself of two things…

    (1) For any finite number of completed families, the expected ratio is slightly less than 0.5. (This is the simplest form of the question that Steven Landsburg posed.)

    (2) Even if you cap the number of children per family (meaning that some families will stop with only girls), the expected ratio is STILL slightly less than 0.5. Proved this one on a probability tree with four families. The families need not be complete.

    To me, the underlying logic for this paradox is explained by partitioning the probability space into those outcomes that in the initial births (randomly) have more boys and those outcomes that have more girls. Those outcomes that begin with more boys INITIALLY will tend to end up with smaller populations. Those outcomes that begin with more girls initially will tend to have slightly larger populations. Of course the overall boy/girl ratio in the probability space as a whole is a perfect 1:1. Thus there are a greater number (of smaller populations) that favor boys and a lesser number (of larger populations) that favor girls.

    It becomes harder to imagine how this would play out for a multi-generational population, with families beginning (and completing) at different times. Yet there would still be a tendency for a (random) run of boys to be followed by a period of slower population growth. I suspect the answer depends on how you phrase the question.

    Assuming no family has more than a single child in a given year, then the expected boy/girl ratio of births in a single year is precisely 50%. This is easily proven.

    If you look at the ratio of boy/girl births going back to the beginning of the experiment, then you are essentially adding families as you go. The ratio will trend towards 50%, but it shouldn’t be substantially different from simply beginning with more families in the first place.

    If you take a five-year trailing average of the boy/girl births, then I believe the underlying logic should hold. When there are more boys in the first year, there will be fewer births during the five-year period. The denominator effect remains.

    Apologies if this isn’t convincingly formal.

  104. 104 104 Koz

    Actually, I disagree with Roger Schafly, and in fact I thought of the Monty Hall problem as a counterpoint when I first saw this (I associate the Monty Hall thing with Marilyn vos Savant, I wasn’t aware Mr. Landsburg was involved with that as well.).

    In contrast to the current thing, the goat vs. car problem has imo a clear definitive correct answer, and the “indifference” supporters are inferring things from the situation that are clearly not justified. Here, I think there’s a little more room for differing interpretations of the original problem.

  105. 105 105 Roger Schlafly

    Of course the overall boy/girl ratio in the probability space as a whole is a perfect 1:1.

    No, that is incorrect. The human sex ratio is commonly assumed to be 105 boys to 100 girls. This fact invalidates all of Steve’s analyses.

  106. 106 106 RandomWords

    Dear Mr Landsburg,

    I very much enjoy reading your blog (and your books for that matter) and I also enjoyed the insight the birth-ratio problem provided.

    I have at this point,however, I have the feeling that the tone of the discussion of this specific problem has become inappropriately aggressive and personal. I would very much like to see your blog revert to insightful comments and puzzles again. If you could find the courage to ignore the trolls and find a way back to your greatly insightful writing again, I would very much appreciate it.

    Thanks a lot and greetings,
    Steve

  107. 107 107 Bob Murphy

    Hey everyone,

    It seems you guys made some major breakthrough on another post in the comments, referring to “Tom, who stunned and delighted me by discovering, contrary to all my expectations, that E(G/G+B-1) is exactly 1/2. As Thomas Bayes points out, this is a real problem for the commenters who insist that E(G/G+B) is 1/2. These experessions can’t be equal.”

    Can someone please point me to where this was hashed out? I thought I had kept up to speed on all the comments in the previous posts, but I missed this discussion. Thanks.

  108. 108 108 Steve Landsburg

    Bob Murphy:

    Gah. It’s spread out all over the comments.

    Tom: Would you care to write this up in one short self-contained piece that we can point people like Bob to? We could run it as a guest post if you like. Barring that, would you mind if someone else took on this project?

  109. 109 109 Pietro Poggi-Corradini

    I might add that I don’t understand when people talk about an “extra half boy”. A write up would be useful.

  110. 110 110 Neil

    The way I think about it, the problem is equivalent to a game you play with two coins. Call the first coin the random coin and the second coin the decision coin.

    You flip the decision coin to decide whether to flip the random coin. If the decision coin comes up tails (girl), you flip the random coin.

    One possibility is you flip the decision coin and it comes up heads. Game over. You have one head on the table (the decision coin) which came up heads with probability 1/2. (That is source the expected one half boy). You’ve got nothing for the random coin.

    Suppose the decision coin comes up tails (girl), now you flip the random coin. The process continues until the decision coin comes up heads. (The outcome on the random coin does not determine whether you keep flipping.)

    Now it is tails counting time. For any sequence, complete or not, the expected proportion of tails (girls) is exactly 50% for the random coin. If you also count the decision coin, it is an extra head if the sequence is complete. But this extra head is not random–it must be a head if the sequence is complete. Any sequence taken at random is complete with probability 50% (the probability the decision coin was heads on its last flip), so you have an expected one-half non-random heads on the table for any sequence.

  111. 111 111 Harold

    I thought what if the randomness was taken out of it? Say in a country all the births alternated? It goes ….GBGBGBGB…. and so on.

    Clearly, the number of B equals the number of G overall.

    A one family country would be either B or GB, or a 2/3 expectation of a boy.

    The 4 family country would be either B, GB, GB, GB; or GB, GB, GB, GB.

    For any number of families, the first birth could be a B, leading to an extra boy, or a G, leading to an equal number of boys and girls. Each is equally likely. In other words, there is an extra 1/2 boy in every country.

  112. 112 112 Phil Birnbaum

    Neil (5:35): I don’t see how the two-coin procedure you describe is equivalent to the one in the problem.

    For instance, the one-family case: flip the decision coin. It comes up girls. You flip the random coin: it comes up boys. You flip the decision coin: it comes up heads, so you stop.

    You stopped after TWO boys, not one.

    Put another way: what is the bijection between the two-coin procedure, and the one-coin description? Suppose I have four families, and my sequence is GBBGGGBB. What is the sequence of two-coin flips that represents that sequence?

  113. 113 113 Obs

    “I’d be curious to know what Google thinks of this debate.”

    Protip: Google would never ask this question during an interview. As for why they wouldn’t do that, see Steve’s comment section.

  114. 114 114 Neil

    The two boys case is equivalent to two families who terminate after each having a boy. Any sequence BBGBBBBGGGBGG… on the random coin can be divided up to look exactly like a group of families who terminate on the last boy. As some commentator said earlier, it is just a matter of where you draw the lines. On the above sequence you draw the lines B|B|GB|B|B|B|GGGB|GG…. The point is the probabilities of the different subsequences are determined exactly as you would get by flipping a fair coin. If that was all there was to it, Lubos would be right, the expected girl proportion is exactly equal to 50%–but there is also the boy on the decision coin, which is why Steve is right, it is less than 50%.

  115. 115 115 Phil

    Neil,

    You just described how to biject a “X families, one coin per family” into “one long string of flips, terminating after the Xth boy.” *That*, I understand, and makes perfect sense.

    But how do you biject your “decision coin, random coin” result set onto the “coin flips until X boys” result set? That’s the one I don’t see.

  116. 116 116 Neil

    PS With your sequence, the decision coin came up heads on the seventh flip and is represented by the last boy. The random coin came up GBBGGGB. As the problem was stated, your sequence is equivalent to four families GB|B|GGGB|B|.

  117. 117 117 Neil

    That should be, the random coin came up heads on the eighth flip.

  118. 118 118 Phil Birnbaum

    OK, I get it now. Your procedure produces *every possible outcome for every possible number of families.* That is, it produces every possible sequence consisting of Gs and Bs. And, in that case, I agree that the ratio is indeed 50% (excluding the final B on the decision coin).

    However: if you constrain the sequences to only certain family sizes, why does it follow that the ratio must be 50% for those too? They don’t all have equal probability. BBBB, for instance, is much more likely to come up in the two-coin process than BGGGGGGGBBB. Only strings of equal length will have equal probability.

    Your argument shows that the ratio of 50% is true for STRING LENGTH, not for NUMBER OF Bs IN THE STRING.

    Does that make sense?

    PHil

  119. 119 119 Neil

    Phil,

    Fixing the family size, one can certainly write down sequences that are inconsistent with the stopping rule. For example, BBB is inconsistent with one family and the stopping rule, but it is a possible outcome of my two coin process (it would require two families to be consistent). I don’t think it matters, but I will think about it.

  120. 120 120 Tom

    Steve,

    Sure, I can do a brief writeup of my stuff from the 12/27 comments if you like. A short guest post would be fine. For anybody who’s curious right now, here are links to some comments that I think have most of the material.

    E(G/(G+B))=1/2 for the first N-1 births in each country

    Sketch of how we get the formula above

    More complete statistics on the first N-1 births, from Thomas Bayes”

    Discussion between Neil and Phil Birnbaum on whether the first N-1 births in a country really are fair and independent coin flips
    <a href="http://www.thebigquestions.com/2010/12/30/slippery-lube/#comment-20419&quot; Same discussion, continued.

    (Thomas, Neil, Phil, please correct anything you like here.)

    The last birth in every country is always a boy but for the remainder of the country E(G/(G+B)) = 1/2. In effect we get an extra half boy at the very end.

  121. 121 121 Tom

    Sorry, Screwed up the tag in the last link. I don’t know whether anyone cares enough to follow so many links, but an edit would look prettier … !

  122. 122 122 Tom

    Neil,

    I think the short guest post might have its best chance of being useful if we collaborated on it. If you’re interested, let me know.

    Thanks
    Tom

  123. 123 123 GC

    I don’t know if people would find this useful at this late date, but I feel as though the discussion we were having late into the night on MetaFilter might be useful in establishing why I think Tom is right and Steve is wrong. As Tom has patiently argued here, Steve’s modeling of the problem assumes a “last” baby whose gender identity is known at the start of the simulation because it is always determined by the stopping rule: it’s a boy. But this is a new constraint he has introduced in his effort to simulate the problem, not found within the text of the problem itself. When we eliminate that new rule, we find that Tom is right: it’s just an infinite sequence of coin flips after all.

  124. 124 124 Steve Landsburg

    GC:

    I think Tom is right and Steve is wrong.

    To my knowledge, Tom and I do not currently disagree about anything.

  125. 125 125 Harold

    If the question is “how many first generation children are female?” then Steve is right. If the simulation tests this he will win almost every time. There are other questions that you could ask, even with the question as posed. The answer will never quite be 50%, but Steve could lose the bet using the starting conditions if you introduce second and third generations. This in effect increases the number of families in the country. After some number of births, the first born can start their own families, so the number of families in the 4 family country becomes greater than 4. This makes the answer trend towards 1/2. This seems to be lubos point. The key is do you stop at first generation? This has been mention before, of course. If you wish to do the simulation of Lubos country, many more variables must be defined – mortality, age of reproduction etc.

  126. 126 126 Tom

    Harold,

    The effect of a country that doesn’t ever terminate seems more serious to me than just an increased number of families. In the single-generation case only the very last family has the extra half boy. I think if no countries in the ensemble trigger the terminating condition then E(G/(G+B)) really will be 1/2.

    Lubos has mentioned sustainability as a condition. Some people seem to have dismissed that comment, but it looks like the same point to me.

    On the other hand Pietro and Neil have looked into the possibility that a country that strictly followed the “each family stop on a boy” condition does become extinct even in the multi-generation case. In fact, sometimes clearly it does. Neil says we pick up a tiny bit of extra boy from countries that become extinct. This gets to be “only math” to me as the effects are much smaller than sqrt(N); nevertheless …

  127. 127 127 Thomas Bayes

    Tom,

    I believe that, because we are concerned with expectations, then our expected proportion of girls will be 1/2 only if we believe there is no chance for the last boy to be included in the census. If we believe there is a nonzero chance that every family will have at least one child before we take the census, then there will be a nonzero chance that the last boy is in the count, and this will drop the expected proportion of girls below 1/2.

    Because there is a nonzero chance that any generation will have exactly zero girls, there is the possibility of this country going extinct. However, I agree with you and suspect that this probability is much, much smaller than 1/sqrt(K), which is the K dependence on the probability that the number of girls is exactly equal to the number of mothers for a particular generation.

  128. 128 128 Pekka P.

    Dear professor Landsburg, if you feel giving your money away, please consider United Way next time. They give you tax benefit.

    I’d happily take your money, but I doubt we find computers fast enough to settle the wager in the way you described. What if we just let a couple to retire, say, after 10 girls? Start with four couples, and, say, the cut-off at fair and reasonable 48 %? If the population ends with 48 % girls or less girls, you get 5000 dollars, if more, I get your check drawn to $5000 to frame on the wall of my cubicle?

  129. 129 129 Steve Landsburg

    Pekka P.:

    I am not sure I understand your proposal. Are you saying that a couple retires after the first boy, or after the first ten girls, whichever comes first?

  130. 130 130 Tom

    Thomas,

    I tend to agree. It would be nicer if we could derive extinction from the stopping rule and just nuke them all. But maybe I’m just getting tired of these people and their families.

  131. 131 131 Tom

    Thomas,

    Then again, maybe the census-timing effect is an artifact of starting all the families at the same time. My eyes are starting to glaze over at my own argument, though. Time for a new problem, for me.

  132. 132 132 ken B

    @Ravi:
    Imagine Monty Hall gave you this choice: pick a door, and you win if the prize is NOT behind it. Call this pick-a-loser. What are your odds? 2/3. But Monty hall DOES give you that very choice. Pick-then-switch IS pick-a-loser. You pick a door. You KNOW there are two duds. So you KNOW one of the other doors hides a dud and you KNOW Monty Hall will expose a dud. He does so. Has anything changed? How are you better or worse off than at the start? In no way. So pick-then-switch is the same as pick-a-loser. So it is right 2/3 times.

    If you are not convinced deal out 2 red and one black card in the order black,black,red six times. Then for each case pick a card and apply the Monty Rule “expose a black card” exposing different cards in the four all black cases. Then count successes.

  133. 133 133 Mike H

    @Steve I don’t think the “original problem” is sufficiently well defined for either you or Lubos to be dogmatic. I read his post, clearly he doesn’t understand yours. It is less clear whether he doesn’t understand the maths or is ignoring it. It *is* clear that he sees that E(G/Pop) is not E(G)/E(Pop). It is *not* clear what the original problem wants. Most likely, if Google actually ever posed this question to a candidate, they weren’t interested in the “correct” answer, but in evidence of clear thinking. Either answer would do, I suspect. My own answer (which I won’t give here) is quite different.

    NB – the original question doesn’t ask for expected values of demographics. It says “There’s a certain country…” We are not informed whether this country is typical or not, nor if it is typical in a mean or median sense.

    We are told a bit about the culture of this country, then asked “what fraction of the population is female?”

    This is impossible to answer without making some assumptions. As far as I can see, it is necessary to assume the country is “typical” in some sense – or large enough so that “about 50%” is correct without high probability. You and Lubos both assume that the chance of an individual birth being a boy is 50% reasonable, but not necessary. Since there are many assumptions, some of which materially affect the answer, I’m not sure that dogmatism about interpretation of the problem is warranted.

    Perhaps Lubos refused your bet because he disagrees with your interpretation?

    Having said that, I found your analysis interesting and insightful. I learned something from it, and will have a better answer for Google in the unlikely event that I’m ever being interviewed by them for a job :-)

  134. 134 134 Steve Landsburg

    Mike H: In fact, Lubos has not specified (except in a very vague sense) any specific conditions under which he believes the answer to be 50%.

    The answer certainly depends on assumptions about mortality rates, etc. I’ve given simple examples in which the mortality rate is zero, there are no grandchildren, and so forth, and calculated the solutions in those examples. Is there any example in which the answer is 50%? Possibly. Has Lubos offered one? Surely not.

  135. 135 135 Eli Rabett

    It’s the St. Petersberg Paradox with variations. Basically a distribution with a finite median and an infinite average (if you don’t cut off the number of children)

  136. 136 136 Steve Landsburg

    Eli Rabett: Are you claiming that E(G/G+B) is infinite?

  137. 137 137 Tom

    All —

    Somewhere in a comment I may have claimed that E(G) is not equal to E(B) for the completed first generation. If so, sorry. As far as I can see that’s wrong.

    Luckily I’ve covered my bets by also making the opposite point, in <a href="http://www.thebigquestions.com/2010/12/30/slippery-lube/#comment-20204"this comment. Which still looks fine in itself. If we somehow screw with the string of fair independent coin flips then E(G/(G+B)) can deviate from E(G)/E(B); if not, not. Because for N fair independent coin flips the ensemble is just an N-dimensional hypercube (really! I’m not just saying that!) and you can always cut it in half very simply, but for the single-generation case we’ve solved here the shape is more complicated.

  138. 138 138 Tom
  139. 139 139 Tom
  140. 140 140 Jonathan Campbell

    Tom: I may not have been following this conversation carefully enough, but can you clarify something that is related to your latest comments: For the country in question, does E(G) = E(B)?

    If so, then this country does not seem isomorphic to a random string of Gs and Bs, plus a half B at the end — in this country, clearly E(G) < E(B).

  141. 141 141 Tom

    Jonathan,

    Yes, as far as I can see, E(G) and E(B) for each family, with nobody excluded, each come out to 1. E(G+B) per family comes out to 2.

    We nailed down that E(G/(G+B))=1/2 without the last boy in a completed country, but we never quite nailed down the idea that the rest of the population is a random string of Gs and Bs.

    We can prove very easily that the N coin flips before the terminal boy are fair & independent, but it’s not quite the same thing.

    (For people who haven’t been sweating this lately. The ensemble for the N flips before any B is just a full truth table, e.g. GGG GGB GBG GBB BGG BGB BBG BBB. For every 3-bit sequence the ensemble contains the complement of that sequence. So the expectation of the ratio equals the ratio of the expectation and everything is familiar. But of course some of those strings don’t belong to the ensemble for a country and some other strings of different lengths do. The ensemble for a country of even two families has not assembled itself into a clearly-visualizable shape for me yet.)

    Jonatan brought this up earlier, and Neil and Phil have been talking about it, but I don’t think it got resolved.

    (I haven’t thought about this carefully for a few days, all I did was turn the crank on E(G) and E(B). so I’m just hoping I haven’t said anything really dumb here.)

  142. 142 142 Tom

    Jonathan,

    So I meant to end up saying: Yes, as far as I know you’re making an important point.

  143. 143 143 Jonathan Campbell

    Thanks Tom. Yes it seems very clear that for any # of families, E(G) = E(B) assuming either a) all families are complete, or b) simulation stops after k years (1 birth/family/year).

    Thus, it must be true that we cannot regard all births but the last one as a random string of Gs and Bs, with the last one having nonzero probability of being a “fixed” B instead of being fair.

    And I didn’t get your distinction between a “fair and independent” string and a “random” string. If we know that for all births, E(G) = E(B), and we know that the last birth is biased to B, then it must be true that, for the string representing all but the last birth, E(G) < E(B). If you have a string where E(G) < E(B), how can you say the flips in the string are fair & independent?

    I am still bugged by the lack of formalism of our model – I feel like we (or maybe its just me) are being thrown off by referring to a "random string of Gs and Bs" which may or may not have a B tacked onto the end — what is the exact isomorphism being described? I.e., after each flip, how do you decide whether to tack on a B and call the string "terminated"? It seemed that Neil was trying to describe an exact isomorphism based on 2 coins, but I didn't understand it.

  144. 144 144 Tom

    Jonathan,

    By “fair and independent” I just mean an idealized set of coin flips that aren’t correlated. Same thing as “random.” The distinction I was making was this:

    (a) If we just got the final B for a country, then for any N we can just grab the previous N-1 flips (which are random) without looking at them first. Those are still N-1 random flips.

    (b) Or we can take the whole country terminating in that B, use the actual history of flips to pick N, and then look at the previous N-1 flips. We never showed that this second case is N-1 random flips. And as you say, it looks like you’ve shown that it isn’t.

  145. 145 145 Jonathan Campbell

    Tom:

    Sorry, unfortunately I still don’t see the distinction between a and b. Here are my attempts to describe your a and b with an example:

    a) Suppose we have a country with 4 families. Suppose the 4th boy born is the 11th child. Then, for any N <= 11, the string of boys and girls from the first birth to the (N-1)th birth will be random. (My earlier suggestion was that, if we regard the 11th child as having been biased towards a boy somehow, which is how I interpret your finding, then this "a" statement must be untrue for N = 11)

    b) I don't know how "b" is different. I think I may be stuck on the phrase "use the actual history of flips to pick N."

    Thanks.

  146. 146 146 Jonathan Campbell

    Tom:

    Sorry, unfortunately I am still not getting the distinction. Below I have tried to reproduce your a and b in an example:

    a) Suppose there are 4 families, and the 4th boy born is the 11th child. Then, for any N <= 11, the first N-1 flips form a random string of Bs and Gs. (I suggested earlier that this statement, in conjunction with the statement that E(G)=E(B) for all flips, is in conflict with your statement that the 11th flip was somehow biased towards heads)

    b) I actually don't know how b would differ. It may be that I am thrown off by the "use the actual history of flips to pick N" clause.

    Thanks.

  147. 147 147 Tom

    Jonathan,

    If we know that both cases are completed countries, then they’re the same. In my case (a), I don’t check whether I have a completed country. I just pick some N, say 11, and then I do statistics on N coins. For example I might get 11 girls. In my case (b), I do make sure that I have a completed country for some k. In that case a string of 11 girls isn’t allowed.

    I’ve looked at the flips and rejected certain strings.

    For completed countries the 11th flip isn’t just biased toward heads, the 11th flip is always heads.

  148. 148 148 Tom

    In my last paragraph I should have said “for completed countries that have N=11,” not just “for completed countries.”

  149. 149 149 Tom

    Jonathan,

    Here’s why I think your point is important. You say that E(B)=E(G) for the whole country is inconsistent with this statement: (last symbol always a B) AND (first N-1 symbols are random coin flips). It’s proven that the last symbol is always a B, so you’re proving that the first N-1 symbols are not quite random coin flips. We’ve selected them somehow.

    I mean, now that you’ve crystallized things so clearly, we can prove the same thing more directly. The first 10 symbols in an 11-child country can’t all be Gs. That’s not allowed. Depending on k, other cases are disallowed too. So the population of a country does not consist of random independent coin flips.

    We had this in front of us, sort of, because Steve pointed out early on that the expectation of the ratio differed from the ratio of the expectations. (I’m just talking about the single-generation model we’re solving right now.) For independent random coin flips that’s not the case. But that point was all tangled up with everything else, at least in my mind, until you made your point.

  150. 150 150 Tom

    “The first 10 symbols in an 11-child country can’t all be Gs” should read “for k>1, the first 10 symbols…”

  151. 151 151 Tom

    If we define a country differently, the situation seems to change. (I’m thinking as I type, so please be extra alert for mistakes here!)

    We’ve been fixing k and letting N depend on the coin flip history. But what if we reverse that? If we fix N and let k float, then as long as we select strings of N coins that end on a ‘B’, we do always have a valid completed country … for some k. We don’t have to otherwise select the strings. So for fixed k we have funny statistics for the first N-1 kids. For fixed N, apparently the first N-1 kids are plain old random coin flips.

  152. 152 152 Tom

    And so, IF I haven’t gone completely around the bend, then for fixed N, leaving k unknown and randomly determined by the bitstream, E(G) over all N kids is not equal to E(B) over all N kids. The extra half boy becomes a simple real extra half boy sitting there at the end of an otherwise random string.

  153. 153 153 Tom

    For fixed N, E(B) = E(G) + 1.

    For example, say I pick population N=4. Here are all 8 sequences I can get (all those ending in B):

    BBBB k=4 B-G=4 G/C=0
    BBGB k=3 B-G=2 G/C=1/4
    BGBB k=3 B-G=2 G/C=1/4
    BGGB k=2 B-G=0 G/C=2/4
    GBBB k=3 B-G=2 G/C=1/4
    GBGB k=2 B-G=0 G/C=2/4
    GGBB k=2 B-G=0 G/C=2/4
    GGGB k=1 B-G=-2 G/C=3/4

    Here N is number of births, k is number of families, B is number of boys, G is number of girls, C is number of children. Every sequence of four coin flips uniquely determines a number of families k. This is in contrast to the way we’ve usually generated births, by fixing k and letting N vary over the ensemble. (I have no idea which, if any, is more ‘right.’ I don’t even wanna go there.)

    From the table above,

    E(B-G) = 8/8 = 1.

    E(G) = 3.5
    E(B) = 4.5

    For fixed N, the extra half boy comes out in the difference of expectation values.

    E(G/(G+B)) = 3/8. Which in this case (i.e., fixed N rather than fixed k) agrees with E(G)/(E(G)+E(B)).

  154. 154 154 Tom

    URGH!

    Please disregard my E(G) and E(B) values in the comment above. They should read

    E(G) = 1.5
    E(B) = 2.5.

    These sum to 4, a nice property when you have 4 kids.

  155. 155 155 Jonathan Campbell

    Tom:

    I think that you’re right, it is very important that we get away from the notion of fixing k if we want to have any hope of claiming that the first N flips can be thought of as a random bitstream. (Even for incomplete countries this is true, since, if N > 2k for example, then this bitstream will always have more G than B).

    But I don’t like the idea of k being determined randomly either – how would you define the priori probability distribution of k? E.g. if I say: “I’ve got a complete [or, for that matter, incomplete] country with 11 children, and I am going to pick one randomly, and force you to bet on its gender. Would you prefer to bet that I pick a boy or that I pick a girl?” I’d expect your answer to depend on the prior probability you’ve assigned to there having been 1 family, 2 families, etc. And similarly I don’t know how you’d define E(G) and E(B) without having this prior probability distribution.

  156. 156 156 Tom

    Jonathan,

    Certainly k has a distribution for fixed N, and I imagine there’s a Wikipedia page out there that tells us all about it.

    But if it were me looking at your bet, I wouldn’t bring k into it. For fixed N=11 and a complete country, the set of 1024 possible outcomes is so easy to look at, why bother with anything else? (If we don’t know whether the country is complete, we get 2048 possibilities.) Similarly we determine E(G) and E(B) directly from the set of possible N-child countries, without needing to calculate k for its own sake. Everything is very easy for fixed N and floating k.

    If you don’t like k being random, we could fix N and k. I haven’t looked at that. And I’m deciding that’s out-of-scope for this summary I’m writing for Steve, so I’m not going to look at it today!

  157. 157 157 Jonathan Campbell

    Tom:

    You say “For fixed N=11 and a complete country, the set of 1024 possible outcomes is so easy to look at, why bother with anything else?”

    Let’s pick a simple case: the country is complete after exactly 3 births.

    The choices are:

    1 family: GGB
    2 families: BGB, GBB
    3 families: BBB

    So you are saying that each of these 4 bitstreams is equally likely, and therefore, the posterior probabilities for k are: p(k=1)=.25, p(k=2)=.5, and p(k=3)=.25?

    When you say the 4 bitstreams are equally likely, you are implicitly assuming that the prior probabilities for k are all equal: p(k=1)=p(k=2)=p(k=3). That seems to be an arbitrary assumption to me. Without making an assumption as to the prior probabilities for k, it is impossible to assign probabilities to the 4 bitstreams.

    It gets even hairier if I say that the country may not be complete: in this case, the bitstream BBB is less likely than the bitstream GGG if our (arbitrary) assumption is that the prior probabilities for all k are equal, since in that case, p(BBB) = p(at least 3 families) * 1/8, whereas p(GGG) = 1/8.

    I think that we’ll have to fix k (if we want to describe the characteristics of the a bitstream with N elements), so as to avoid making an arbitrary assumption as to the *prior* probability distribution for k.

  158. 158 158 Tom

    Jonathan,

    Yes, I say that the probabilities of those four families are equal. I’ve fixed N and let the history of coin flips determine how many families I get. Those are my assumptions for this line of reasoning: I said fix N and let k float. The probabilities for k are determined by the probabilities of the various sequences of births.

    I don’t follow the argument that we have to fix k. If I know the history of kids’ sexes and how many kids to consider, I have no difficulty assembling them into families, or assigning probabilities. It’s very straightforward. I suppose somebody could just as easily say that we have to fix N, in order to avoid making an arbitrary assumption as to the prior distribution for N. I don’t say that, but someone could.

    But of course you can fix k and let N float instead. In almost everything that’s been done here, people have done just that.

  159. 159 159 Tom

    For fixed N, what would be the reasoning behind saying a priori that some BGB sequences are more probable than others? We said in the problem statement that births are random. In order to change the distribution of k to anything other than just “how many elements of the ensemble have k boys,” I think we’d have to interfere with the coin flips.

  160. 160 160 Tom

    “When you say the 4 bitstreams are equally likely, you are implicitly assuming that the prior probabilities for k are all equal: p(k=1)=p(k=2)=p(k=3).”

    I don’t say that at all. In fact if I say that all four bitstreams are equally likely then I get p(k=2)=1/2 and the other p=1/4. Which you also gave. I don’t understand this point. I said let the final birth be a B, flip coins for the previous N-1 births, and let k be determined by those results.

  161. 161 161 Tom

    “Without making an assumption as to the prior probabilities for k, it is impossible to assign probabilities to the 4 bitstreams.”

    This sounds backwards to me? We start with a way of assigning probabilities to bitstreams. It’s in the problem statement. We use coin flips. The probability of a particular bitstream of length N is 2^-N.

  162. 162 162 Jonathan Campbell

    You say “I don’t say that at all. In fact if I say that all four bitstreams are equally likely then I get p(k=2)=1/2 and the other p=1/4.”

    These are the *posterior* probabilities which I agree with, and which are calculated as a function of A) the *prior* probabilities and B) the string length.

    Let me ask you this: suppose I did say that, a priori, the a priori probabilities are: p(k=1)=90%, p(k=2)=9%, and p(k=3)=1%. In that case, would you not agree that for a 3-bit completed country, GGB is more likely than BBB? In this case, BBB is quite unlikely simply because there are unlikely to be 3 families.

    If you concede that I can construct a prior probability distribution for k that makes p(BBB) < b(GGG), how can you also say that, without knowing the prior for k, you know that p(BBB) = p(GGG)? You are essentially saying "the relationship between p(BBB) and p(GGG) is a function of the prior, but in fact I can determine the relationship between p(BBB) and p(GGG) without knowing the prior."

    I can't imagine a scenario where it is legitimate to say "the answer to your question is a function of parameter X, but I can give you an answer to your question even if I have no idea what parameter X is."

  163. 163 163 Tom

    Jonathan,

    Sure, if you assume probabilities for k other than those that come from the underlying random process we’ve been working on, then your results will differ from those I get when I do rely on the underlying random process to calculate probabilities.

    I could do exactly the same thing when we fix k and let N vary. Instead of getting my statistics for N from the coin flips, I could postulate something else. What if I say it’s 99% likely that N=5? Well, you could conclude that I’m not using a random process that consists of a string of independent coin flips.

    I don’t see where either procedure gets us, except away from the problem we’re solving.

    You say

    I can’t imagine a scenario where it is legitimate to say “the answer to your question is a function of parameter X, but I can give you an answer to your question even if I have no idea what parameter X is.

    The case we’ve spent so much time on, fixed k and floating N, is an example.

  164. 164 164 Tom

    I’m not sure what you mean when you say we have no idea what k is. We can calculate probabilities for k just fine. The last child is a B and the previous N-1 are coin flips. For example E(k) = N/2 + 1/2 = E(B). One boy per family.

    I have a perfectly well defined random process here. I flip a coin and count heads. My results depend on the count, and yet I don’t know what the count is until I perform it. This happens all the time.

  165. 165 165 Jonathan Campbell

    So what is your answer to the following question:

    What is the prior probability distribution for k, where by prior i mean prior to knowing N?

    a) All k’s are equally likely
    b) The question doesn’t make sense
    c) Something else????

    I would disagree with a as well as b

    a because it’s arbitrary and b because in bayesian analysis, you are always allowed to ask what the prior probability distribution is.

    In formulas:

    The bayesian formula is:
    p(A|B) = p(A and B) / p(B) = p(A)*p(B|A)/p(B)

    let A be the event where k = 2, and let B be the event where N = 3. We are thus asking the probability that k = 2 given that N = 3.

    You are essentially refusing to give p(A) (which is the prior prob that k = 2). Thus, there is no way to calculate p(A|B) (which is the posterior prob that k = 2). (Perhaps more accurately, in your calculations you are assuming P(A) is equal for all values of k, but it seems you are not willing to admit that you have made that assumption.)

  166. 166 166 Tom

    Fair enough. What is your prior probability distribution for N? By that I mean, prior to knowing k, what would you expect the population of a country to be?

  167. 167 167 Tom

    It’s silly to say that I have no way to calculate something when I have described a procedure for calculating it.

    Retreating to the other side of a conditional probability is probably interesting, and earlier in the day I guess I’d like to look at it. But my weariness about actually doing so right now doesn’t make my well-defined random process stop producing well-defined results.

  168. 168 168 Jonathan Campbell

    Haha. The probability distribution of N depends on the probability distribution of k, so I would say, “that question doesn’t make sense” (perhaps I should have been more careful in dismissing that answer out of hand, however, I am unshaken in my belief that you must define a prior for k)

    I guess the word “prior” can be misleading — whether a probability is “prior” is not an absolute notion, but rather a relative notion — an absolute “prior” must account for absolutely 0 “facts on the ground” whatsoever, and is thus hard to come by.

    Where is the asymmetry between k and N? The same place as the asymmetry between variables A and B in the following example: Suppose I have a coin which may be fair, and may be 99% likely to land on heads in each flip (these are the only possibilities, and I don’t know which kind of coin i have). Call the latter case “A” so p(A) is the probability that the coin is 99% likely to land on heads. “B” refers to the event where 10 consecutive flips are all heads. Thus, p(A|B) could be calculated using the formula I provided above, provided you had a prior for A. However, without a prior prob for A, it simply would not make sense to ask for a prior prob for B. This is exactly parallel to the case where we are allowed to ask for a prior for k (not knowing N) but we are not allowed to ask for a prior for N (not knowing k).

  169. 169 169 Jonathan Campbell

    My last comment might best be read if the 2nd paragraph is omitted.

    In any case I look forward to reading your guest post on this blog, wherein all of these issues will neatly resolved.

  170. 170 170 Tom

    I certainly don’t intend to resolve the issue you’re describing. I can’t imagine how I might have given that impression.

  1. 1 Tweets that mention Slippery Lube at Steven Landsburg | The Big Questions: Tackling the Problems of Philosophy with Ideas from Mathematics, Economics, and Physics -- Topsy.com
  2. 2 The “Extra Half Boy” « Physical Engineering
  3. 3 The Extra Half Boy at Steven Landsburg | The Big Questions: Tackling the Problems of Philosophy with Ideas from Mathematics, Economics, and Physics

Leave a Reply