Live data from Hacker News

Coding Horror: Finishing The Game

codinghorror.com

11–20 of 41 posts

Re: Coding Horror: Finishing The Game

#11
post #8

Jeff didn't phrase the question carefully enough. In English if you say, "I have two children, one is a girl" that CANNOT mean both are girls. If both were girls you would never say that. Saying you have 1 girl implies that you have 1 boy. Or maybe 1 girl and one hermaphrodite. 100% was the right answer. It's easy to get people to argue when you give them an almost-ambiguous word problem; they're not arguing about th…

I don't agree; Jeff was not giving a quote. Instead it is just the relevant information abstracted from whatever the person said. By choosing the quote you did, you have added more information to the problem (at least when reading it with conversational English).

I think this would be a better quote of what the person might have said:"Both of my kids are driving me crazy! Just yesterday I had to pick one of them up from the police station--I grounded her for a month!" Pulling out the information corresponding to gender and family size would give only the information given in Jeff's post.

When applying math to the real world, you have to pull out the important information and deal with just that information. But here you are doing the opposite--trying to find a real world situation that applies to the math problem. In my opinion, your example does not quite apply.

(I don't know how the probabilities change when you account for hermaphrodites, but if it changes significantly enough so that approximately 66% is a bad answer, I would find that very interesting!)

Re: Coding Horror: Finishing The Game

#12
post #9

Sorry Jeff, I understand the problem, but the language of the setup was wrong. Since a PERSON told you they have one girl, the GB and BG are equivalent and collapse to one case instead of two in the way that normal people talk . If you had said that a mathematician or a statistician said they have one girl, that would be a different story.

I don't think you do understand the problem. The thing you're taking issue with - GB vs BG - is the vitally important to the statistics, and is the thing that "normal" people get wrong when they see this kind of problem for the first time. The only real objection to the problem as it's posed is that it's pretty unlikely that anyone would say that one of their children was a girl when both of their children are girls.…

His point is that a person telling you they have one girl would be accepted as referring to a particular child. Thus, BG and GB merge and the odds are 50% of a boy and a girl.

Re: Coding Horror: Finishing The Game

#13
post #8

Jeff didn't phrase the question carefully enough. In English if you say, "I have two children, one is a girl" that CANNOT mean both are girls. If both were girls you would never say that. Saying you have 1 girl implies that you have 1 boy. Or maybe 1 girl and one hermaphrodite. 100% was the right answer. It's easy to get people to argue when you give them an almost-ambiguous word problem; they're not arguing about th…

I don't agree; Jeff was not giving a quote. Instead it is just the relevant information abstracted from whatever the person said. By choosing the quote you did, you have added more information to the problem (at least when reading it with conversational English). I think this would be a better quote of what the person might have said:"Both of my kids are driving me crazy! Just yesterday I had to pick one of them up f…

"Both of my kids are driving me crazy! Just yesterday I had to pick one of them up from the police station--I grounded her for a month!" - given just the information in your quote, the odds are 50% of a boy and a girl.

Re: Coding Horror: Finishing The Game

#14
I think that people are debating between 3 choices: (a) 100% chance that there is a boy and girl, (b) 2/3 chance that it is a boy and a girl, or (c) 50% chance that it is a boy and a girl.

It depends very much on the exact wording of the problem.

Like many people in the comments of Jeff's post said that if the person says that "one of my kids is a girl," then common sense makes it sound like ONLY one kid is a girl and the other must be a boy (case a).

If the question is worded precisely like question #2 in this wikipedia article: http://en.wikipedia.org/wiki/Boy_or_Girl#Second_question (where you have a population of families and you randomly pick a family which has a girl), then you use the Bayesian approach to conclude that there is a 66% chance that the other kid is a boy (case b).

Finally, I think that for case c, if you are just walking around and you're not specifically looking for a family with a girl, and you strike up a conversation and you hear that the person randomly decides to talk about his daughter, then I think the odds are 50% that this person's other kid is a boy. This is because you did not require that you choose a family with a specific gender (like in the wikipedia #2 scenario). First you picked a person to talk to, and then this person just happened to mention he had a daughter. Basically, we did not require that the person has a girl (case b), we only learned that he has a girl (case c).

Re: Coding Horror: Finishing The Game

#15
This can be used as a warm-up question for another fun problem (which a friend of mine was asked during a phone screen for a position at DE Shaw): What if instead of telling you that they have two children at least one of them a girl, someone told you that they have two children at least one of them named, say, Linda? The assumption is that there are no boys named Linda, that the likelihood for a girl to be named Linda is not affected by having an older brother or sister, etc. It's not a trick question, nor a sociological problem requiring any knowledge about names, it's a purely mathematical puzzle. And, as you may have guessed, the solution is not the same as in the previous case (with two children at least one of them girl).

Re: Coding Horror: Finishing The Game

#16
post #15

This can be used as a warm-up question for another fun problem (which a friend of mine was asked during a phone screen for a position at DE Shaw): What if instead of telling you that they have two children at least one of them a girl, someone told you that they have two children at least one of them named, say, Linda? The assumption is that there are no boys named Linda, that the likelihood for a girl to be named Lin…

someone told you that they have two children at least one of them named, say, Linda

You would need a special case to determine if you were talking to Johnny Cash's father...

Re: Coding Horror: Finishing The Game

#17
post #15

This can be used as a warm-up question for another fun problem (which a friend of mine was asked during a phone screen for a position at DE Shaw): What if instead of telling you that they have two children at least one of them a girl, someone told you that they have two children at least one of them named, say, Linda? The assumption is that there are no boys named Linda, that the likelihood for a girl to be named Lin…

I'm not sure what you mean. Is the question still the same? Then why wouldn't the result be 2/3rds in either case?

Re: Coding Horror: Finishing The Game

#20
post #12
post #9

Earlier quoted context omitted.

I don't think you do understand the problem. The thing you're taking issue with - GB vs BG - is the vitally important to the statistics, and is the thing that "normal" people get wrong when they see this kind of problem for the first time. The only real objection to the problem as it's posed is that it's pretty unlikely that anyone would say that one of their children was a girl when both of their children are girls.…

His point is that a person telling you they have one girl would be accepted as referring to a particular child. Thus, BG and GB merge and the odds are 50% of a boy and a girl.

Pedantically, they don't merge, you just rule out GB or BG. So, initial conditions:

    1) X: G, Y: G
    2) X: G, Y: B
    3) X: B, Y: G
    4) X: B, Y: B
If you are told, "at least one is a girl," as in the posted question, you can only rule out case (4). If you are told more specifically that X is a girl, you can rule out (3) and (4), giving the 50-50 chance.

Which still seems a little weird to me, that knowing which is a girl, regardless of which one you know about, changes the chances.

Post reply on HN