Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Math

The Tuesday Birthday Problem 981

An anonymous reader sends in a mathematical puzzle introduced at the recent Gathering 4 Gardner, a convention of mathematicians, magicians, and puzzle enthusiasts held biannually in Atlanta. The Tuesday Birthday Problem is simply stated, but tends to mislead both intuitive and mathematically informed guesses. "I have two children, one of whom is a boy born on a Tuesday. What's the probability that my other child is a boy?" The submitter adds, "Believe it or not, the Tuesday thing is relevant. Well, sort of. It's ambiguous."
This discussion has been archived. No new comments can be posted.

The Tuesday Birthday Problem

Comments Filter:
  • Re:Well? (Score:3, Informative)

    by Anonymous Coward on Tuesday June 29, 2010 @05:17AM (#32727810)

    13/27

  • by eldavojohn ( 898314 ) * <eldavojohn@noSpAM.gmail.com> on Tuesday June 29, 2010 @05:20AM (#32727824) Journal
    First off, I am a huge Martin Gardner fan and if this puzzle intrigues you and you haven't heard of him, get one of his books [amazon.com].

    This problem hinges very greatly on how it is phrased and I think it's more a trick of English converting to statistics than it is a true puzzle. If you were to rephrase this problem as "My first child was a boy born on Tuesday now what are the odds that my next child is a boy?" But they don't. They phrase it as after the fact of both births we are now studying a set of two objects that have been determined prior to me asking the question. This ordering causes the set to be enumerable. Which brings in an interesting piece of information theory to this game. Whenever you say something about one child that is exclusive to that child and that trait is enumerable than you have just affected the outcome of that second child. In the original two childs problem this is just gender. But in the above problem it pairs gender with day of week the child was born on. Now since ordering matters you recognize that whether or not the older or younger child is the one in question creates a different scenario and you can't have twins because only one was born on Tuesday. The article does a good job of explaining this.

    The interesting thing is that the answer to this comes down to 13/27. And the larger the enumerable set is of possibilities, the closer this converges to 1/2. If you did this with a specific day of the year, your answer would be 729/1459 which is even closer to 1/2. The general rule is that for a set with N possibilities you would have (N*2 - 1)/(N*4 - 1). Now, what's interesting is if N is unbounded or unenumerable? What if I said "I have two children, one of whom is a boy that likes the number 1835736583. What's the probability that my other child is a boy?" Wouldn't it converge to 1/2?
  • by Shin-LaC ( 1333529 ) on Tuesday June 29, 2010 @05:22AM (#32727840)
    Let's assume that, if I have two children, it is equally probable that they are born as boy+boy, boy+girl, girl+boy, girl+girl. If I have one boy, girl+girl has probability 0, and the other options are equally likely, so they have probability 1/3. If it is known that I have a boy, there is 1/3 probability that the other is also a boy.

    X=one boy is born on a tuesday
    P(X|boyboy) = 1/7 + (6/7*1/7) = 13/49
    P(X|boygirl) = 1/7
    P(X|girlboy) = 1/7
    P(boyboy) = P(boygirl) = P(girlboy) = 1/3
    P(X) = (1/7 + 1/7 + 13/49)/3 = 9/49
    Using Bayes's theorem:
    P(boyboy|X) = P(X|boyboy)*P(boyboy)/P(X) = 13/49 * 1/3 * 49/9 = 13/27

    Which is different from 1/3. So yes, the weekday of birth is significant.
  • by Trepidity ( 597 ) <[gro.hsikcah] [ta] [todhsals-muiriled]> on Tuesday June 29, 2010 @05:32AM (#32727886)

    Sounds vaguely similar to the same failure-of-intuition behind the Monty Hall problem [wikipedia.org]: you fix several quantities, then you reveal one of them, and then ask for a guess for the probabilities of the remaining, unrevealed quantities. Since the unrevealed quantities are completely independent of the revealed ones, it seems like the revealed information shouldn't matter, and your guess should still be that they're uniformly randomly distributed. But, it isn't.

  • by dakrin9 ( 891909 ) on Tuesday June 29, 2010 @05:34AM (#32727906)
    This is incorrect - the question DOES not disallow the second child being a boy and born on Tuesday.

    Here's a reply to the article: (I haven't verified for mathematical correctness)

    "The "(and only one)" qualification suggested by Ralph Dratman is _not_ required. Indeed, in the first case of the analysis, "older child is a boy born on Tuesday", the possibility that the younger child is also a boy born on Tuesday is explicitly included and counted. The hypothesis for the second case does exclude the possibility of both being boys born on Tuesdays. The two cases are mutually exclusive and exhaustive.

    Note that if the puzzle had included the "(and only one)" qualification, then the possibility count would have been 13 (6 for boy and 7 for girl) in both cases, and the probability drops to 12/26."
  • by cjnichol ( 1349831 ) on Tuesday June 29, 2010 @05:38AM (#32727920)
    He has already had the children and he is only telling you that at least one was a boy. He didn't say which.
  • Re:Rubbish (Score:5, Informative)

    by guyminuslife ( 1349809 ) on Tuesday June 29, 2010 @05:41AM (#32727936)

    "I have two children, one of whom is a son born on a Tuesday. What is the probability that I have two boys?" .. this is the same as saying "I have just tossed a 10 pence coin and it has come up heads, what is the probability that another coin toss will come up heads?

    No, it isn't. It's the same as saying, "I have just tossed a quarter twice, and given that it came up heads at least once, what's the chance it that it came up head both times?"

    We can do an analogue, but not in the way you're saying. I.e., "I have just tossed a coin and it came up heads, what's the chance it will come up heads if I toss it again" == "I have just had a kid and it's a boy, if I have another kid, what's the chance it will be a boy" == 50%

    If you don't understand the problem, that's fine. It's counterintuitive, these things usually take a second look. If you don't understand the problem and you want to claim the solution is incorrect because you don't get it, well, that's something else entirely.

  • Probability (Score:5, Informative)

    by neoshroom ( 324937 ) on Tuesday June 29, 2010 @05:41AM (#32727938)

    This is kind of like saying "I flip a coin. What is the chance it lands heads facing up?"

    And you say "50%."

    And I say, "Incorrect. There is a very small chance it will land balanced perfectly on it's side, so both the chance of heads and the chance of tails is under 50%."

  • by Maddog Batty ( 112434 ) on Tuesday June 29, 2010 @05:42AM (#32727940) Homepage

    Compare these two questions:

    "I have two children, one of whom is a boy born on a Tuesday. What's the probability that my other child is a boy?"

    "I have two children, one of whom is a boy. What's the probability that my other child is a boy?"

    Most people would think that the being born on a Tuesday bit was irrelevant and would make no difference to the answer. In fact it makes a big difference to the answer.

  • by bjourne ( 1034822 ) on Tuesday June 29, 2010 @05:43AM (#32727946) Homepage Journal
    The problem stated in the article is: "Suppose that Mr. Smith has two children, at least one of whom is a son. What is the probability both children are boys?" This is a different scenario than what is stated in the summary: "I have two children, one of whom is a boy. What's the probability that my other child is a boy?" In the first scenario, the probabilities are dependent on each other because it is not stated whether the first or the second child is the boy. In the second problem, it is given that the FIRST child is a boy. But that does not affect the odds of the second child which should therefore be 0.5.
  • Re:Rubbish (Score:3, Informative)

    by ArsenneLupin ( 766289 ) on Tuesday June 29, 2010 @05:43AM (#32727948)

    . this is the same as saying "I have just tossed a 10 pence coin and it has come up heads, what is the probability that another coin toss will come up heads?"

    Nope, it is equivalent to "I have just tossed a 10 pence coin twice, and I tell you that it has come up heads at least once, what is the probability that it has come up heads twice".

    The 2/3 vs 1/3 probability hinges on the fact that the ordering of the kids is not defined.

    If the kid's father told you "my oldest child is a boy", then you would be right.

    Unfortunately, any defined order can play that role ("the first of his kids that I met in person", "the first of his kids that he mentioned", ...), which makes this problem so hard to grasp. Depending on exactly in which context he mentioned that one of his kids was a boy may change the probability of the other being a boy too from 1/2 to 1/3 or any value in between.

  • Re:Rubbish (Score:5, Informative)

    by Joce640k ( 829181 ) on Tuesday June 29, 2010 @05:44AM (#32727958) Homepage

    Nope.

    "I have just tossed a 10 pence coin and it has come up heads, what is the probability that another coin toss will come up heads?"

    Is *not* the same as:

    "I just tossed two coins and one of them was heads, what is the probability that the other one was heads as well?"

  • by Anonymous Coward on Tuesday June 29, 2010 @05:49AM (#32728008)

    So the fact that they told us that the one kid was a boy born on a Tuesday is irrelevant.

    The REAL issue is that we too easily miss the implication here: the OTHER kid *can't* be a boy born on Tuesday (or he'd have said that he has two such kids). Given that information, which rules out one of the possibilities, it is now not quite as much of a surprise that you get a chance not equal to 50%.

  • by Looce ( 1062620 ) * on Tuesday June 29, 2010 @05:50AM (#32728018) Journal

    The problem is stated thus:

    I have two children, one of whom is a son born on a Tuesday. What is the probability that I have two boys?

    One of whom is not "exactly one of whom", so 'one' might be opposed to 'the other' or 'two'. All we know is that one of the problem poser's children is a boy born on a Tuesday. It states nothing about the relationship between the two children in time or space, so the probabilities are independent.

    Further, the problem doesn't ask about any probability related to the second boy's birthday. The problem doesn't ask, e.g., What is the probability that my other child is a boy not born on Tuesday?. That makes the birth weekday completely irrelevant.

  • Re:Rubbish (Score:3, Informative)

    by CProgrammer98 ( 240351 ) on Tuesday June 29, 2010 @06:16AM (#32728150) Homepage

    ""I have just tossed a 10 pence coin and it has come up heads, what is the probability that another coin toss will come up heads?""

    Umm no, if you look at the original problem, "one of my 2 kinds is a boy, what's the probability both are boys" is like saying "Ive've tossed a coin twice, at least one of which was heads, what;s the probability that both were heads?" - so here the possibilities are H H / H T/ T H of which only one of the 3 is both heads so it's 1/3rd.

    It's not saying, "the first guy was a boy - or in your analagy, the first coin toss was heads" - where you would be right, the chance of the second child being a boy, or the second coin toss being heads would be 50% - it's a different problem.

  • by Turnpike Lad ( 1006707 ) on Tuesday June 29, 2010 @07:00AM (#32728386)
    That sounds great, but if you look closely, you're saying that _outside of the context of the problem _ there's a twice as likely chance for a couple's second child to be the same sex as their first than for it to be different. Obviously if I already have a boy then my second child still has an equal chance of being a girl or a boy... but when you say that boy(1)/boy(2), boy(2)/boy(1), and boy/girl are equally likely, you're saying that when a couple already has a boy, they have a 2/3 chance of having another boy.
  • by AK Marc ( 707885 ) on Tuesday June 29, 2010 @07:09AM (#32728442)
    Since the unrevealed quantities are completely independent of the revealed ones,

    But they are related. When you eliminate one wrong answer, the probability of the remaining answer being right is 50%. When you eliminate one answer at random, the chance that the remaining answer is the right one is 33%. The chance of the one you chose being right is always 33%. When you reveal an answer known to be wrong, you change the probability of the ones that was chosen from. Since the door opened can't be the one the contestant chose, then the 33% will never change. Opening all the other wrong doors increases the chance that the other unopened doors are the right one.

    But, as stated here, it's an issue of English, not math. The problem of "You have two children. I pick one at random. He is a boy born on Tuesday, what's the chance the other is a boy?" The answer is 50%. "You have two children. I look at both, and pick the one I want and reveal that one is a boy, what's the chance the other is a boy?" The answer to that is 33%. In both cases, a boy is chosen and the question is asked what sex the other is. Depending on the information known at the choosing, it influences the probability. English is used to mask the obviousness of this, but the probability is always simple math.
  • Wrong (Score:3, Informative)

    by ebcdic ( 39948 ) on Tuesday June 29, 2010 @07:15AM (#32728486)

    "Select the gender of all second children where the first child was born on a Tuesday and the first child was male." Yes, it will be 50/50 male and female. "Select the gender of all first children where the second child was born on a Tuesday and the second child was male." Again it will be 50/50.
    But the gender split in the union of those two groups will *not* be 50/50. You have counted the families with two boys born on a Tuesday twice. 1 in 14 of the first group will also be in the second group. Taking the union correctly, 7 out of 14 in the first group will have two boys, and 6 out of 13 of those in the second group *not already counted* will be boys. In total, 13 out of 27 will be boys.

  • by snowgirl ( 978879 ) on Tuesday June 29, 2010 @07:23AM (#32728538) Journal

    No joke, you break out the SQL.

    I did so.

    I generated a bunch of SQL records, into a table with two relevant fields, both binary. (Male was indicated by false, female was indicated by true).

    Then I counted how many SQL records were returned WHERE gender1 = male OR gender2 = male
    Then I counted how many SQL records were returned WHERE gender1 = male AND gender2 = male.

    The results? Out of a population of 100,000 records: 24940 male-male, 74893 at least one male. Yielding 1/3 to the third decimal place.

    The mistake you made (and it is a mistake, because you claim your experiment would show a result that it empirically does not) is that you failed to count properly. There will always be approximately twice as many records with one boy as there are two boy records.

    It's not the BIRTH ORDER that turns this problem into something interesting.

    As a side note, in the future, actually run your experiments if it is actually feasible to do so.

  • Re:Well? (Score:3, Informative)

    by A Nun Must Cow Herd ( 963630 ) on Tuesday June 29, 2010 @07:32AM (#32728600)
    If you ignore the Tuesday bit, then eliminating the option that you know is not possible (FF won't work since one child is a boy) you have three options remaining, each with equal probability, giving 33% chance.

    Or to put it another way: If it was 25% chance like you say then so is FM and MF. There are no other possibilities so it should add up to 100%, but you only get 75%...
  • by Anonymous Coward on Tuesday June 29, 2010 @07:44AM (#32728676)

    No, you're wrong. It's not assumed that the 7-day week has a preferred natural significance; rather, the existence of a 7-day week has implications for the number of Tuesdays (i.e., the interval at which they appear).

    Put another way, the notion of what constitutes a "Tuesday" is inextricably tied to the 7-day week. So when the question posited that one child was born on a Tuesday, it implied a 7-day week, and therefore, it's not a problem that the answer would depend on a 7-day week, too.

  • Re:0.5 (Score:3, Informative)

    by A Nun Must Cow Herd ( 963630 ) on Tuesday June 29, 2010 @07:45AM (#32728690)
    ... and that "common sense" leads to an incorrect answer.

    The first step is to see that if one of the children is a boy, then the probability that they both are is 1/3 not 1/2.
  • by Anonymous Coward on Tuesday June 29, 2010 @07:58AM (#32728764)

    I'm afraid that you're wrong. By saying that the boy's name is Peter, you have (almost) uniquely identified the boy that the problem talks about, and so the problem becomes essentially equivalent to saying "the younger child is a boy".

    Why is this not the same? Consider that the second boy of the family could - in theory - also be called Peter (non-mathematician families obviously do not do this, but for the conceptual analysis you have to consider the possibility). In that case, the scenarios Peter, Boy and Boy, Peter actually overlap (because you cannot uniquely assign the case Peter, Peter to one of the scenarios) and your analysis fails. In fact, the amount of overlap between the two scenarios controls how much smaller than 1/2 the probability of having two boys is.

    If the overlap is large, then you cannot distinguish between the scenarios well and so Boy, Boy becomes increasingly unlikely. If the overlap is very small, then you can distinguish the scenarios most of the time and the probability of Boy, Boy goes closer to 1/2. In the extreme case when you can uniquely identify the boy that the person was talking about, let's say because you have the boy's passport number or his birthday (assuming there are no twins), the probability is exactly 1/2.

  • Re:Well? (Score:4, Informative)

    by ticklemeozmo ( 595926 ) <justin...j...novack@@@acm...org> on Tuesday June 29, 2010 @08:11AM (#32728888) Homepage Journal
    This is a gambler's fallacy [wikipedia.org] problem. The more tangents you throw at it, the closer you get to .5 (50%), while never reaching it. This is the limit, why? Because there's only two potential outcomes for the other child: boy or girl.

    What you (or the website you copied and pasted the ratio from) fail to take into account (and why it's a Gambler's fallacy problem) is that when involving chance, anything that happened in the past is completely irrelevant to future probables. I could roll a die 99 times, and get 6, the probability of getting 100 6's when I've already got 99 6's is still 1 out of 6, not 6^100.

    The reason the chi square doesn't come into play here is because it doesn't MATTER the order. Has she said "What is the probability my SECOND-BORN was a boy?" it would be perfectly logical to write the square because the boy who was born on Tuesday could be either the first born or the second born, she never stipulated.

    We can say that the boy, who was born on a tuesday, was also a Gemini. Does this change the ratio? No, the probability of having two boys is still 50-50%, because the unknown only has two possible outcomes: boy or girl.
  • by Shin-LaC ( 1333529 ) on Tuesday June 29, 2010 @08:17AM (#32728924)
    No, you're wrong. Look at this [codepad.org]. If Mr. Smith has two children, at least one of whom is a boy, it is two times as likely for him to have a boy and a girl than it is for him to have a boy.

    Your mistake is in believing that, by virtue of naming one of the boys Peter, the probabilities are magically equalized. They're not. The correct probabilties for your table are:

    Peter, Boy = 1/6
    Boy, Peter = 1/6
    Peter, Girl = 1/3
    Girl, Peter = 1/3
  • Re:Well? (Score:5, Informative)

    by ceoyoyo ( 59147 ) on Tuesday June 29, 2010 @08:27AM (#32728998)

    Failed to read the article, hey?

    You're absolutely correct IF you assume that the man is just describing one of his children. That is the logical interpretation of the problem. However, if someone went out and specifically selected a family with at least one boy, the probability of the other child being a girl is not 50% - the population in question has been artificially depleted of girls because the criteria excluded all two-girl families.

  • by Ed Avis ( 5917 ) <ed@membled.com> on Tuesday June 29, 2010 @08:30AM (#32729030) Homepage
    That guy they quote in the article hits the nail on the head:

    Everything depends, he points out, on why I decided to tell you about the Tuesday-birthday-boy. If I specifically selected him because he was a boy born on Tuesday (and if I would have kept quiet had neither of my children qualified), then the 13/27 probability is correct. But if I randomly chose one of my two children to describe and then reported the child’s sex and birthday, and he just happened to be a boy born on Tuesday, then intuition prevails: The probability that the other child will be a boy will indeed be 1/2.

    This is similar to the confusion generated by the Monty Hall question. Why does he show you an empty door? If he would always show you the door immediately to the right of the one you chose, for example, and it just happened in this case to contain a goat, then there is no reason to switch. On the other hand, if he on purpose always shows an empty door to every contestant, then the usual reasoning applies and you should switch. (And if you imagine an 'evil' Monty Hall who shows a goat to a contestant if and only if that contestant originally chose the correct door, well then you should never switch.) It all depends on why you are being told this information, and what the general rule is about whether you are told or not.

  • Re:Well? (Score:5, Informative)

    by mcvos ( 645701 ) on Tuesday June 29, 2010 @08:32AM (#32729060)

    Read the article. Whether the answer is 50% or not depends on the context, and that context is not specified in the problem.

    If you meet the person with his son, and he tells you that that son is born on a Tuesday, then the chance of the other kid being a boy is 50%. If you see him as one of the thousands of parents who have two children, at least of which is a boy who's born on a Tuesday, the chance of the other kid being a boy is 13/27.

  • Re:OK I'm stupid (Score:4, Informative)

    by ceoyoyo ( 59147 ) on Tuesday June 29, 2010 @08:40AM (#32729154)

    Close. The situation with coins is this:

    I flip a coin twice and record the answer. I repeat this many times. I discard all the pairs where both coins came up tails. I then select a pair where at least one toss came up heads. What is the probability that the other is also heads?

    The selection criteria screw up the probabilities. If instead I flip a coin, see that it comes up heads, and ask what the probability of it coming up heads again is, the answer is 50%.

  • Re:Well? (Score:5, Informative)

    by prionic6 ( 858109 ) on Tuesday June 29, 2010 @08:50AM (#32729242)
    Assuming 50/50 chance of boy or girl and a 1/7 chance of each weekday, let's look at the general population of families with two childs:

    B1B1 B1B2 B1B3 B1B4 B1B5 B1B6 B1B7
    B2B1 B2B2 B2B3 B2B4 B2B5 B2B6 B2B7
    B3B1 B3B2 B3B3 B3B4 B3B5 B3B6 B3B7
    B4B1 B4B2 B4B3 B4B4 B4B5 B4B6 B4B7
    B5B1 B5B2 B5B3 B5B4 B5B5 B5B6 B5B7
    B6B1 B6B2 B6B3 B6B4 B6B5 B6B6 B6B7
    B7B1 B7B2 B7B3 B7B4 B7B5 B7B6 B7B7

    B1G1 B1G2 B1G3 B1G4 B1G5 B1G6 B1G7
    B2G1 B2G2 B2G3 B2G4 B2G5 B2G6 B2G7
    B3G1 B3G2 B3G3 B3G4 B3G5 B3G6 B3G7
    B4G1 B4G2 B4G3 B4G4 B4G5 B4G6 B4G7
    B5G1 B5G2 B5G3 B5G4 B5G5 B5G6 B5G7
    B6G1 B6G2 B6G3 B6G4 B6G5 B6G6 B6G7
    B7G1 B7G2 B7G3 B7G4 B7G5 B7G6 B7G7

    G1B1 G1B2 G1B3 G1B4 G1B5 G1B6 G1B7
    G2B1 G2B2 G2B3 G2B4 G2B5 G2B6 G2B7
    G3B1 G3B2 G3B3 G3B4 G3B5 G3B6 G3B7
    G4B1 G4B2 G4B3 G4B4 G4B5 G4B6 G4B7
    G5B1 G5B2 G5B3 G5B4 G5B5 G5B6 G5B7
    G6B1 G6B2 G6B3 G6B4 G6B5 G6B6 G6B7
    G7B1 G7B2 G7B3 G7B4 G7B5 G7B6 G7B7

    G1G1 G1G2 G1G3 G1G4 G1G5 G1G6 G1G7
    G2G1 G2G2 G2G3 G2G4 G2G5 G2G6 G2G7
    G3G1 G3G2 G3G3 G3G4 G3G5 G3G6 G3G7
    G4G1 G4G2 G4G3 G4G4 G4G5 G4G6 G4G7
    G5G1 G5G2 G5G3 G5G4 G5G5 G5G6 G5G7
    G6G1 G6G2 G6G3 G6G4 G6G5 G6G6 G6G7
    G7G1 G7G2 G7G3 G7G4 G7G5 G7G6 G7G7

    Each outcome has P = 1/(7*7*4) = 1/196

    Let's only look at the families with (at least one) tuesday boy:

         B1B2
    B2B1 B2B2 B2B3 B2B4 B2B5 B2B6 B2B7
         B3B2
         B4B2
         B5B2
         B6B2
         B7B2

    B2G1 B2G2 B2G3 B2G4 B2G5 B2G6 B2G7

         G1B2
         G2B2
         G3B2
         G4B2
         G5B2
         G6B2
         G7B2

    Of these 27 families, 13 have another boy. So P = 13/27.

  • Re:Well? (Score:5, Informative)

    by mcvos ( 645701 ) on Tuesday June 29, 2010 @08:52AM (#32729268)

    You're right! Pretty amazing, considering the article gives the correct answer and explains it pretty thoroughly. Even when you think: "But wait! Can't you look at it some other way?", the article does just that.

    Really, this time it pays to RTFA.

  • by Radtoo ( 1646729 ) on Tuesday June 29, 2010 @08:52AM (#32729270)
    "I have two children, one of whom" says two, and exactly two need to be considered. No use considering all sorts of possibilities that were not mentioned in maths. That's something "riddles" more based in language love to do, but not maths.

    And indeed, it does not say the other child can't be a son born on a Tuesday until the second problem in the article comes up, which reads "Now suppose that the older child isn’t a boy born on Tuesday.".
  • Re:Well? (Score:3, Informative)

    by Anonymous Coward on Tuesday June 29, 2010 @09:47AM (#32730016)

    Assuming 50/50 chance of boy or girl and a 1/7 chance of each weekday, let's look at the general population of families with two childs:

    B1B1 B1B2 B1B3 B1B4 B1B5 B1B6 B1B7
    B2B1 B2B2 B2B3 B2B4 B2B5 B2B6 B2B7
    B3B1 B3B2 B3B3 B3B4 B3B5 B3B6 B3B7
    B4B1 B4B2 B4B3 B4B4 B4B5 B4B6 B4B7
    B5B1 B5B2 B5B3 B5B4 B5B5 B5B6 B5B7
    B6B1 B6B2 B6B3 B6B4 B6B5 B6B6 B6B7
    B7B1 B7B2 B7B3 B7B4 B7B5 B7B6 B7B7

    B1G1 B1G2 B1G3 B1G4 B1G5 B1G6 B1G7
    B2G1 B2G2 B2G3 B2G4 B2G5 B2G6 B2G7
    B3G1 B3G2 B3G3 B3G4 B3G5 B3G6 B3G7
    B4G1 B4G2 B4G3 B4G4 B4G5 B4G6 B4G7
    B5G1 B5G2 B5G3 B5G4 B5G5 B5G6 B5G7
    B6G1 B6G2 B6G3 B6G4 B6G5 B6G6 B6G7
    B7G1 B7G2 B7G3 B7G4 B7G5 B7G6 B7G7

    G1B1 G1B2 G1B3 G1B4 G1B5 G1B6 G1B7
    G2B1 G2B2 G2B3 G2B4 G2B5 G2B6 G2B7
    G3B1 G3B2 G3B3 G3B4 G3B5 G3B6 G3B7
    G4B1 G4B2 G4B3 G4B4 G4B5 G4B6 G4B7
    G5B1 G5B2 G5B3 G5B4 G5B5 G5B6 G5B7
    G6B1 G6B2 G6B3 G6B4 G6B5 G6B6 G6B7
    G7B1 G7B2 G7B3 G7B4 G7B5 G7B6 G7B7

    G1G1 G1G2 G1G3 G1G4 G1G5 G1G6 G1G7
    G2G1 G2G2 G2G3 G2G4 G2G5 G2G6 G2G7
    G3G1 G3G2 G3G3 G3G4 G3G5 G3G6 G3G7
    G4G1 G4G2 G4G3 G4G4 G4G5 G4G6 G4G7
    G5G1 G5G2 G5G3 G5G4 G5G5 G5G6 G5G7
    G6G1 G6G2 G6G3 G6G4 G6G5 G6G6 G6G7
    G7G1 G7G2 G7G3 G7G4 G7G5 G7G6 G7G7

    Why are you assuming that order matters, but boys are interchangable? If we label the child that was mentioned in article as A and the other one as B then B2B2 splits into two cases when A has an older brother and when he has a yonger brother, therefore we get:


    B2B1 B2B2 B2B3 B2B4 B2B5 B2B6 B2B7

              B1B2
              B2B2
              B3B2
              B4B2
              B5B2
              B6B2
              B7B2

    B2G1 B2G2 B2G3 B2G4 B2G5 B2G6 B2G7

              G1B2
              G2B2
              G3B2
              G4B2
              G5B2
              G6B2
              G7B2

    Of these 28 families 14 have another boy, so P=14/28=1/2

  • Re:Well? (Score:3, Informative)

    by BasilBrush ( 643681 ) on Tuesday June 29, 2010 @09:59AM (#32730234)

    It's not that the order in time is especially relevant. It's that the identity of the child matters. You could call them child A and child B, and list the permutations, and the answer would still be 13/27. Child A being born on a Tueday are NOT the same set of permutations as child B being born on a tuesday. They have to be listed separately so that duplicate permutations can be removed from the list. That's what makes the difference.

  • Re:Well? (Score:3, Informative)

    by mcvos ( 645701 ) on Tuesday June 29, 2010 @11:02AM (#32731222)

    I'm still able to reach the site. Here's the entire text:

    When intuition and math probably look wrong
    A twist on the Two Children Problem shows how information can steer what looks probable.
    By Julie Rehmeyer

    I have two children, one of whom is a son born on a Tuesday. What is the probability that I have two boys?

    Gary Foshee, a puzzle designer from Issaquah, Wash., posed this puzzle during his talk this past March at Gathering 4 Gardner, a convention of mathematicians, magicians and puzzle enthusiasts held biannually in Atlanta. The convention is inspired by Martin Gardner, the recreational mathematician, expositor and philosopher who died May 22 at age 95. Foshee’s riddle is a beautiful example of the kind of simple, surprising and sometimes controversial bits of mathematics that Gardner prized and shared with others.

    “The first thing you think is ‘What has Tuesday got to do with it?’” said Foshee after posing his problem during his talk. “Well, it has everything to do with it.”

    Even in that mathematician-filled audience, people laughed and shook their heads in astonishment.

    When mathematician Keith Devlin of Stanford University later heard about the puzzle, he too initially thought the information about Tuesday should be irrelevant. But hearing that its provenance was the Gathering 4 Gardner conference, he studied it more carefully. He started first by recalling a simpler version of the question called the Two Children Problem, which Gardner himself posed in a Scientific American column in 1959. It leaves out the information about Tuesday entirely: Suppose that Mr. Smith has two children, at least one of whom is a son. What is the probability both children are boys?

    Intuition would suggest that the answer should be 1/2, since the sex of one child is independent of the sex of the other. And indeed, had he been told which child was a boy (say, the younger one), this reasoning would be sufficient. But since the boy could be either the younger or the older child, the analysis is more subtle. Devlin started by listing the children’s sexes in the order of their birth:

    Boy, girl
    Boy, boy
    Girl, boy

    Since one child is a boy, we know that girl, girl isn’t a possibility. Of the three approximately equally likely possibilities, one has two boys and two have a girl and a boy — so the probability of two boys is 1/3, not 1/2, Devlin concluded.

    He used this same method on the Tuesday birthday puzzle, enumerating the equally likely possibilities for the sex and birth day of each child and then counting them up.

    If the older child is a boy born on Tuesday, there are 14 equally likely possibilities for the sex and birth day of his younger sibling: a girl born on any of the seven days of the week or a boy born on any of the seven days of the week. (This analysis ignores minor differences like the fact that slightly more babies are born on weekdays than on weekend days.)

    Now suppose that the older child isn’t a boy born on Tuesday. The younger child then must be, of course. Now we count up the possibilities for the sex and birth day of the older child. If she’s a girl, she might have been born on any day of the week, generating seven more possibilities. If he’s a boy, he could have been born any day except Tuesday. (Otherwise this case would already have been counted in the first scenario: the older child a boy born on Tuesday). This second scenario generates just six, rather than seven, more possibilities.

    Since each of these cases is (approximately) equally likely, we can compute the probability by dividing the number of cases in which there are two boys by the total number of cases. The total number of cases is 27: 14 if the older child is a boy born on Tuesday and 13 if the older child isn’t. In 13 of those cases both children are boys (7 if the older child is a boy born on Tuesday and 6 if he isn’t), yielding a probability of 13/27.

    Devlin w

  • by pavon ( 30274 ) on Tuesday June 29, 2010 @11:02AM (#32731234)

    You are neglecting to treat the two children as independent non-exchangeable objects. It is easier to think about if you consider that you have two pets a dog and a cat, each of which can be male or female. Then the enumeration of possibilities:

    Male Dog, Male Cat
    Male Dog, Female Cat
    Female Dog, Male Cat
    Female Dog, Female Cat

    If you select a family where (at least) one of them is a Male that leaves the following options:

    Male Dog, Male Cat
    Male Dog, Female Cat
    Female Dog, Male Cat

    So the chances of both being male are 1/3.
    Now moving onto the date question. You have selected a family from families known to have one male pet born on Tuesday (and one dog and cat each). The options are:

    Male Cat born Tuesday, Male Dog born Monday
    Male Cat born Tuesday, Male Dog born Tuesday *
    Male Cat born Tuesday, Male Dog born Wednesday
    Male Cat born Tuesday, Male Dog born Thursday
    Male Cat born Tuesday, Male Dog born Friday
    Male Cat born Tuesday, Male Dog born Saturday
    Male Cat born Tuesday, Male Dog born Sunday

    Male Cat born Tuesday, Female Dog born Monday
    Male Cat born Tuesday, Female Dog born Tuesday
    Male Cat born Tuesday, Female Dog born Wednesday
    Male Cat born Tuesday, Female Dog born Thursday
    Male Cat born Tuesday, Female Dog born Friday
    Male Cat born Tuesday, Female Dog born Saturday
    Male Cat born Tuesday, Female Dog born Sunday

    Male Dog born Tuesday, Male Cat born Monday
    Male Dog born Tuesday, Male Cat born Tuesday *
    Male Dog born Tuesday, Male Cat born Wednesday
    Male Dog born Tuesday, Male Cat born Thursday
    Male Dog born Tuesday, Male Cat born Friday
    Male Dog born Tuesday, Male Cat born Saturday
    Male Dog born Tuesday, Male Cat born Sunday

    Male Dog born Tuesday, Female Cat born Monday
    Male Dog born Tuesday, Female Cat born Tuesday
    Male Dog born Tuesday, Female Cat born Wednesday
    Male Dog born Tuesday, Female Cat born Thursday
    Male Dog born Tuesday, Female Cat born Friday
    Male Dog born Tuesday, Female Cat born Saturday
    Male Dog born Tuesday, Female Cat born Sunday

    * Note that I enumerated the case where both are males born on Tuesday twice. These are redundant and one must be discarded else I will double count that situation. After doing so there are 13/27 cases where both are males.

    Notice that if you ignored the fact that one was a dog and the other was a cat you would have merged the two lists, ending up with your original list, and double counting the case where both are boys born on Tuesday.

    In other words your mistake is that you assumed you had been given the sex and birth date of child A, and enumerated the sex and birth date of child B. However, you don't know the sex and birth date of child A or B, just that one of child A or B have that sex and birthdate. That is a subtly different problem.

    So the order that they are born in is irrelevant, but keeping track of the fact that they are the two unique items while enumerating the cases is vital (and older and younger is a simple label to use while doing so).

  • Re:Well? (Score:1, Informative)

    by Anonymous Coward on Tuesday June 29, 2010 @11:03AM (#32731254)

    It goes astray where you are assuming the 2nd child is the one born on a Tuesday. What your list should look like is:

    1 Girl on Monday, Boy on Tuesday
    2 Girl on Tuesday, Boy on Tuesday
    3 Girl on Wednesday Boy on Tuesday
    4 Girl on Thursday, Boy on Tuesday
    5 Girl on Friday, Boy on Tuesday
    6 Girl on Saturday, Boy on Tuesday
    7 Girl on Sunday, Boy on Tuesday

    8 Boy on Monday, Boy on Tuesday
    9 Boy on Tuesday, Boy on Tuesday
    10 Boy on Wednesday Boy on Tuesday
    11 Boy on Thursday, Boy on Tuesday
    12 Boy on Friday, Boy on Tuesday
    13 Boy on Saturday, Boy on Tuesday
    14 Boy on Sunday, Boy on Tuesday

    15 Boy on Tuesday, Girl on Monday
    16 Boy on Tuesday, Girl on Tuesday
    17 Boy on Tuesday, Girl on Wednesday
    18 Boy on Tuesday, Girl on Thursday
    19 Boy on Tuesday, Girl on Friday
    20 Boy on Tuesday, Girl on Saturday
    21 Boy on Tuesday, Girl on Sunday

    22 Boy on Tuesady, Boy on Monday

    23 Boy on Tuesday, Boy on Wednesday
    24 Boy on Tuesday, Boy on Thursday
    25 Boy on Tuesday, Boy on Friday
    26 Boy on Tuesday, Boy on Saturday
    27 Boy on Tuesday, Boy on Sunday

    27 possibilities, 13 of them are 2 boys.

    As lots of people have said, the wording/situation is ambiguous, but this is the correct analysis for the statement: Assuming subsequent children have independent birthdates and genders, and assuming the probability of being a boy is 1/2 and the probability of being born on a Tuesday is 1/7, what is the probability of a 2 child family having 2 boys given that they have at least one boy born on a Tuesday.

  • by Target Drone ( 546651 ) on Tuesday June 29, 2010 @11:07AM (#32731334)

    i've obviously not had enough to drink - what's the answer?

    The riddle starts out as "Johnny's Mom has 3 kids" therefore one of the kids must be named Johnny.

  • by Chris Burke ( 6130 ) on Tuesday June 29, 2010 @12:30PM (#32732504) Homepage

    Yeah, say what you will about the Monty Hall problem, but at least it is stated clearly and is actually trying to trip up your intuitive understanding of probability, not your intuitive understanding of English. :P

    Though of course, the Monty Hall problem as given could be considered wrong because Monty later said he would usually only offer the contestant the chance to switch their choice if their first guess was correct. But hey, that's just funny.

  • by Chris Burke ( 6130 ) on Tuesday June 29, 2010 @02:47PM (#32734654) Homepage

    No it does't, because the problem as stated in the summary DOES NOT EXCLUDE the case that the other child is also a boy born on Tuesday. You are ASSUMING that because one child was "A boy born on Tuesday" the other child is not also a "boy born on Tuesday", a condition that was never set forth in the problem.

    Yes it does matter, and no he's not assuming that. Even though it is possible for both children to have the qualification "born on Tuesday" or "born on Feb. 29th", this information does "come close" to specifying a particular child because you're given that one of them has it, and the odds of the other also having it are low (1/7 or 1/1461). That's why he said "comes close to specifying" and not "does specify".

    Notice in the solution to the problem in RTFA, how you first assume the oldest child is the Tuesday-boy, then enumerate all cases (including another Tuesday-boy) for the first child. Then you enumerate all cases where the youngest child is the Tuesday-boy, and the oldest isn't, because you already counted that case. That's where the difference from 50% comes from.

    Make the case even more rare like a leap-year-boy, and you'll be eliminating one tiny case from thousands, and be very close to 50%.

  • by Anonymous Coward on Tuesday June 29, 2010 @07:34PM (#32738564)

    Johnny.

  • by mestar ( 121800 ) on Tuesday June 29, 2010 @08:31PM (#32739010)

    You are wrong.

    >Label the child we know to be a boy as A.

    Lets do that.

    >The child without a known gender is B.

    >Boy-A Boy-B
    >Boy-A Girl-B
    >Boy-B Boy-A
    >Girl-B Boy-A

    But, why did you list the Boy - Boy combination twice? If you have two children, there are 4 possible orders for them to be born, all equally likely:

    1 Boy-Boy
    2 Boy-Girl
    3 Girl-Boy
    4 Girl-Girl

    Just because in case (1) you can label any of the two boys as boy A, is not a reason to list that combination twice in your list of possible birth orderings. Therefore your list should be:

    Boy-A Boy-B (or Boy-B Boy-A if you label the other boy as A)
    Boy-A Girl-B
    Girl-B Boy-A

    1/3 is 1/3, as is correct.

    You are confused by the fact that having two boys, you have a choice of which one you label as A. This does not make this option twice as likely as you have presented it.

  • Re:Rubbish (Score:3, Informative)

    by guyminuslife ( 1349809 ) on Tuesday June 29, 2010 @09:38PM (#32739470)

    Nope. Wrong. Age does matter. Not because it correlates with gender or anything, but because it makes the two children distinguishable. (E.g., one of them must be the older child, one must be the younger.)

    You don't have to distinguish them with ages. You could distinguish them with height, e.g., "the taller child is a boy" or anything else.

    Probability in this case is about how much information you have. The more information you have, the more you can refine your results. If I know that a parent has two children, then I can give the probability of both children being boys depending on how much information I have:

    no further information -> .25
    one child is a boy (but we don't know which one) -> .333
    one child is a boy (and we do know which one) -> .5
    one child is a boy, and so is the other child -> 1.0
    one child is not a boy -> 0.0

    TFA does a pretty good job of explaining why people have such a hard time understanding this. The reason is that they assume that the parent is picking a child at random and then stating their gender. That's not the process. If they choose one of their children at random and she happens to be a girl, they skip over her and then state the gender of the other child.

I've noticed several design suggestions in your code.

Working...