Today's post is a simple question.
Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?
Consider your answer carefully, without doing a web search, or reading the comments to this post. Don't cheat -- but be prepared to explain your reasoning, because the solution might surprise you.
It's almost like some kind of conspiracy or something.
Jeff has a lot of reading to do.
Michael Weller on December 31, 2008 1:00 AM@Arnos
Your 1 million coins example is wrong. The question would be 1 million coins were tossed. 999,999 were tails. What's the chance the other one was heads?
I'm not going to solve this problem but the key is that the single heads result doesn't have to be the 1,000,000th toss - it could be the 999,998th toss or 57th toss or any single toss as long as the other 999,999 are tails. So the probability will not be 50%.
Tim Hollingsworth on December 31, 2008 1:00 AM@sam
The number of trials that would match the conditions you give would be different between the two
How so? There are no conditions for A and are not in B also. I only added the step I tell you the one on the right is heads.
You knew one was heads already, so it tells you nothing about the state of the coins.
*one on the right == where they land on the table, not some kind of order.
Chase Seibert on December 31, 2008 1:00 AM@Sam A.
The 999,999 coins that you placed on the table have NO bearing on the one you are actually flipping. The 999,999 are the given, known information. The probability of the coin you flipped (unknown information) is still 50%.
COIN TOSS EXPLAINED
2 coins were tossed. One is heads. What's the probability that the other is tails?
1) Assume coin on left is heads. Then the other coin has 50% chance of heads and 50% tails.
2) BUT the question didn't say the coin on the left was heads. So let's now assume that the coin on the right is heads, then the coin on the left is 50% chance of heads and 50% tails.
3) Combine 1 and 2 (naive solution): (2 * 50%) / (4 * 50%) = 50%
Step 3 is wrong. The problem is that the heads-heads combination was double-counted. The times in 1) when we got heads-heads and the times in 2) when we got heads-heads were the SAME events, so we should only count them once. So to adjust: (2*50%) / (4*50% - 50%) = 100 / 150 = 2/3
Tim Hollingsworth on December 31, 2008 1:02 AMI'm not sure.. I'll make a wild guess..
100%
I think a person will say I have two girls rather than mentioning one girl..
I'm not sure I'm taking the question in the right direction.
Now, I do the search... :)
I'm not sure.. I'll make a wild guess..
100%
I think a person will say I have two girls rather than mentioning one girl..
I'm not sure I'm taking the question in the right direction.
Now, I do the search... :)
I'm not sure.. I'll make a wild guess..
100%
I think a person will say I have two girls rather than mentioning one girl..
I'm not sure I'm taking the question in the right direction.
Now, I do the search... :)
Amr on December 31, 2008 1:04 AM@Arnos
Ah.. But i flipped all of the coins.
Sam A. on December 31, 2008 1:05 AMFor those who are confused if you remove the order than GB and BG are the same thing (because there are is just a B and a G somewhere in the pot, they are not ordered in any way).
Practicality on December 31, 2008 1:05 AM@Chase Seibert
Ah I was interpreting you to mean the one on the right was the second coin flipped.
For those who are confused if you remove the order than GB and BG are the same thing (because there are is just a B and a G somewhere in the pot, they are not ordered in any way).
So you cannot call BG and GB separate solutions.
If you call them separate solutions then you are saying the order matters. The question did not say the order mattered, so these are not separate solutions.
I am convinced that the common voodoo beliefs portrayed as statistics and logic are diametrically opposed (IE, Statistics theory is fundamentally flawed).
Practicality on December 31, 2008 1:08 AMSorry, I don't buy anyone's reasoning. A firm believer in empirical evidence, I'm going to go out right now and try to make some babies.
Jeff R. on December 31, 2008 1:09 AMFor those who are confused if you remove the order than GB and BG are the same thing (because there are is just a B and a G somewhere in the pot, they are not ordered in any way).
So you cannot call BG and GB separate solutions. They would be the SAME SOLUTION.
If you call them separate solutions then you are saying the order matters. The question did not say the order mattered, so these are not separate solutions.
Practicality on December 31, 2008 1:10 AMOk, I was wrong. I didn't believe that the child's age makes a difference but it does. There are two working possibilities out of three. Guess I should have though that through more carefully.
Anyway, here is link with a chart that explains it well:
a href=http://en.wikipedia.org/wiki/Boy_or_Girl_paradox#Second_questionhttp://en.wikipedia.org/wiki/Boy_or_Girl_paradox#Second_question/a">http://en.wikipedia.org/wiki/Boy_or_Girl_paradox#Second_question/a">http://en.wikipedia.org/wiki/Boy_or_Girl_paradox#Second_questionhttp://en.wikipedia.org/wiki/Boy_or_Girl_paradox#Second_question/a
I was thinking of the first question on that page.
Arnos on December 31, 2008 1:12 AMSo if BG and GB are the same solution then we started with three possibilities (which they are if order does not matter):
BB
GG
BG (which is the same as GB)
and we eliminated BB.
That leaves GG and BG.
Practicality on December 31, 2008 1:12 AM@Chase Seibert
Well, asking me to go back in time and revise my previous guess based upon knowledge I didn't have when I made it is a bit of a tall order :-)
The probability estimates in my head have changed with the new information, but I'm temporally incapable of changing my bet now.
... or do you still think that probability exists anywhere outside of a mind?
You knew one was heads already, so it tells
you nothing about the state of the coins.
Yes it does.
Given coin A and coin B.
With no information, each combination of A and B, heads or tails has a 25% chance of occurring.
At least one is heads - A heads, B tails OR A tails, B heads OR A heads B heads. 33% chance of each, given our new information.
A is heads - A heads, B tails OR A heads, B heads. 50% chance of each, given our new information.
Probability estimates are the result of a mind's information about the world. Adding to that information will change the probability estimates.
Therac-25 on December 31, 2008 1:13 AMTo those still hanging onto the 50% argument that the first baby doesn't affect the chances of the second one...
You're looking at it wrong, and the most concise argument I can see for this is mike's:
the information is being presented encompasses the sum of the results of both events
We know LIMITED INFORMATION about the SUM of two babies.
We do not know ANYTHING about one particular baby. Nor is the question about a particular baby, but rather about the SUM of the two babies.
So stop thinking about just one child and the resulting 50% chance.
Make the leap.
@Practicality
You are correct. You simply need to note that P(BG) = 2*P(GG).
Therac-25 on December 31, 2008 1:15 AMIf it's a word game, then the answer is 0% because she said [only] one kid is a girl. But if it's a math game, the answer is 50%.
We start with 2 booleans, and then one of them is already solved. The simplified phrasing of this question is: I have 2 kids. Guess the gender of ONE in particular.
Everybody who tries to solve a more complex problem is overengineering it.
Harry on December 31, 2008 1:16 AM
@Harry
But if it's a math game, the answer is 50%.
Then you lost the game. (Sorry if anyone else lost it just now...)
We start with 2 booleans, and then one of them is already solved.
Which one is solved? You don't know. All you know is that they can't both be boys.
Therac-25 on December 31, 2008 1:17 AMHm. Back to my original statement:
Given that we can throw away one of the likelihoods (i.e. B+B)...
P(b|g) = P(b AND g)/P(g) = 0.667
P(b|g) = 0.667/1 = 0.667
So.... 66.67%
nuclearnewyears on December 31, 2008 1:18 AMIs this really still be debated??
...met someone who told you they had two children, and one of them is a girl...
Read carefully...
HB on December 31, 2008 1:20 AMThe fundamental issue I think lies in the fact that, having one un-age-defined girl means that a state with two girls is at half the probability of a BG mixture.
nuclearnewyears on December 31, 2008 1:21 AM@Patrick
I looked back at the question, thought about it for another minute, and I see what you 66% people are saying now. There is a difference between what are the chances that she has a boy AND girl and what are the chances she has a boy as her next baby.
I'm changing my answer from 50% to 66%.
chris on December 31, 2008 1:22 AMBefore the guy told us that he had a girl, the probability of him having a boy and a girl are 2/4 (4 permutations B-B, B-G, G-B, G-G out of which two have one boy and one girl). But now he gave us additional information that one of them is a girl so it has to be B-G/G-B/G-G which is three permutations and out of which two have one boy and one girl. So the answer is 2/3 = 66.67%
Minhajuddin on December 31, 2008 1:24 AMBefore the guy told us that he had a girl, the probability of him having a boy and a girl are 2/4 (4 permutations B-B, B-G, G-B, G-G out of which two have one boy and one girl). But now he gave us additional information that one of them is a girl so it has to be B-G/G-B/G-G which is three permutations and out of which two have one boy and one girl. So the answer is 2/3 = 66.67%
Minhajuddin on December 31, 2008 1:24 AM@Therac-25
Again, if we did Trial A 1000 times, and Trial B 1000 times, are you saying that the number of times you're right would be statistically different?
... or do you still think that probability exists anywhere outside of a mind? Yes, the number of times you're right between Trials A and B will exist outside of your mind, when we measure how often you are correct.
Chase Seibert on December 31, 2008 1:27 AMThis is exactly why I love developers. On the surface this is a trivial question, assuming my assumptions are correct. But immediately the first several posts shot holes in my assumptions. Leave it to developers to overcomplicate a question just to make sure they are correct.
John on December 31, 2008 1:28 AM@PunchAndPie and everyone else in the 50% camp
Consider it this way: we have 1000 mothers with two children.
250 mothers will have two boys.
500 mothers will have one girl and one boy.
250 mothers will have two girls.
I think we can all agree on that, yes?
Now, if we know that one of a mother's children is a girl, we eliminate the 250 mothers who have two boys. That leaves us with 750 mothers, 500 of which have one girl and one boy.
500/750 = 66%
Tyler on December 31, 2008 1:28 AMIt depends why the parent revealed that one child is a girl.
If its because you asked is (at least) one of the children a girl? and you're told yes then its 66%.
But if you stumble upon the information (phone rings, parent has conversation that's obviously about a girl, you *then* ask and its confirmed that at least one of the children is a girl) then its 50%.
The difference is that, whilst there are twice as many BG households as GG, you're twice as likely to stumble upon one child being a girl when in a GG household.
xooorx on December 31, 2008 1:29 AM
Jeff Atwood,
Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?
This question might have several answers depending upon what the purpose of asking the question was.
If the question was to show that Bayesian Reasoning is very difficult and many people get it wrong {as the link would imply}. Then the answer is 2/3.
If the question was to show that normal people don't think like CS majors or Mathematicians. Then the answer is near 100%, depending upon the number of percentage of people in a random sample that would happen to be Mathematicians. I wonder what percentage of the populace are Mathematicians.
If the question is posed to make us ask, Are we really given enough information. I should get more detailed information before drawing a conclusion. Then the answer is I don't know, need more info.
If the question was posed just to hit 1000+ comments, well done.
Please Jeff, stop the madness. What was the point?
Here's a little joke for you all...
An astrophysicist, a physicist, and a mathematician were on a train riding through Ireland. They looked out the window and saw a black sheep grazing on the pasture.
The astrophysicist says, All of the sheep in Ireland are black.
The physicist chimes in, Your wrong, you only know that there exists in Ireland at least one black sheep.
Your both wrong, the mathematician says, You only know what there exists in Ireland at least one sheep that black on one side.
Mike on December 31, 2008 1:29 AMI'm all for reductionism, but not to the point of re-writing the problem statement.
Unless I'm missing something, the answer 2/3.
People are right that order doesn't matter and that the gender of each child is completely independent, but as someone mentioned, this is a matter of filtered information, and the 50% crowd is mis-reading the problem.
This isn't a simple question of the likelihood of a particulay child being a boy (with some extra rhetorical icing); this is a different question altogether.
In a two-child family, there are -- presumably -- 4 combinations of gender outcomes, each statistically even:
Boy then Girl (25%)
Boy then Boy (25%)
Girl then Boy (25%)
Girl then Girl (25%)
One way to look at it is to simply eliminate the combination where there are two boys since we're given that information...
Boy then Girl (25%)
Girl then Boy (25%)
Girl then Girl (25%)
so, now two of the three {equally liklely} combinations contains a boy. (therefore 2/3)
But some are quick to call foul here because order doesn't matter.
So we can take order out of the equation, but not blindly; A boy followed by a girl may be equivalent to the vice-versa, but a B/G combination is still twice as likely as either G/G or B/B. The original breakdown becomes the following (order irrelevant):
Boy/Girl (50%)
Boy/Boy (25%)
Girl/Girl (25%)
(not as some might assume 33%/33%/33% respectively)
Eliminate Boy/Boy from the mix (per the information given) and once more we have 50/75 = 2/3 likelihood that the other child is a boy.
Steven on December 31, 2008 1:31 AMnuclearnewyears,
No, applying Bayes' theorem, we need to first consider the probability within the entire population. Then we can do the math to get the new probability given known information. Taking the givens into account too early leads to errors.
P(x|y) = P(x^y) / P(y)
Or, the probability of x given y is equal to the probability of x AND y divided by the probability of y. You can't assume that y is true, yet. Otherwise the denominator would always be 1.
Michael L Perry on December 31, 2008 1:33 AMHere's another way to think about it for you 50%ers. (Feel free to substitute in your currency of choice.)
Your claim is that when I flip two coins and at least one is heads, there is a 50% chance that the overall outcome will be one heads one tails, and a 50% chance that it will be two heads. So I propose a bet. We flip two coins, and when at least one is heads, the bet comes into play. If the other coin is tails, you pay me $1. If the other coin is heads, I pay you $1.20, so that if you're right you'll tend to make money after a decent number of flips.
That means:
Two tails - Draw; no one wins
One heads one tails - I win $1
Two heads - You win $1.20
Would you take this bet?
Chickencha on December 31, 2008 1:35 AM@Mike
You're all wrong, says the philosopher, who was listening in on all this. You only know that on this particular trip through Ireland, your mind has brought to consciousness the percept, illusory or not, of a sheep, black on this side.
A 50% argument that the 66%ers can understand:
Lets assume the parent picked a child at random and revealed that it was a girl.
From 100 parents lets say:
25 have BB
50 have BG
25 have GG
Now... *ONLY HALF* of the BG parents will have said girl whereas *ALL* of the GG parents will have said it. So its 50% not 66%.
(You have to *ask* if there's at least one girl to get 66%)
xooorx,
Nicely stated. Exactly the premise of my original 50% argument.
However, I switched to 67% because the purpose of this argument is to study Bayesian theory. If I were being practical, I'd be in the 100% camp.
Michael L Perry on December 31, 2008 1:45 AMHere's another puzzle for you:
A certain king is often out fighting wars. He loves battle, but there is a problem: his kingdom is running low on men! So he thinks about it, and passes a new law: Women must stop having children after their first girl.
For he reasons thus: with this law, sure, there will be the occasional one-girl family, but there will also be boy-girl families, boy-boy-girl families, boy-boy-boy-girl families, and so on. Thus, the proportion of boys amongst children will increase.
So, the problem: calculate the boy:girl percentage in the kingdom after a sufficiently long period of time has passed (assuming 50-50 odds for each birth).
John Fouhy on December 31, 2008 1:46 AM@Chase Seibert
Again, if we did Trial A 1000 times, and Trial B 1000 times,
are you saying that the number of times you're right would
be statistically different?
Okay, let me get this clear. We do this 1000 times.
You flip two coins. You tell me one is heads.
I predict the other is tails. I will be right 66% of the time.
You tell me the right one is heads.
Here's your problem. This is only going to be the case 66% of the time -- in 33% of these trials, the right one is not going to be heads.
So what do you do in this case? Just pick one that's heads and tell me that one? If the right one is ALWAYS heads, then the game is fixed, so of course my estimates are going to be wrong.
You aren't giving me any new information in this case.
Therac-25 on December 31, 2008 1:47 AMThis is truly getting STUPID. You people need to get a life.
Chris on December 31, 2008 1:48 AM@xooorx
I'll buy that argument, but I don't think that that was the intent of the question. (Jeff can tell us for sure.) I also don't think that's the same logic that most 50%ers are using -- I believe most of them are arriving at the same conclusion through erroneous logic.
Chickencha on December 31, 2008 1:49 AM@Mike
Shut up already! Who gives a flip about a sheep, anyway? asked the software developer. I'm trying to get some work done on my laptop, and there you are jabbering away. Here's a real puzzle for you: 'Let's say, hypothetically speaking, you met someone who told you they had two children ...'
Jeff R. on December 31, 2008 1:50 AM@John Fouhy
I am pretty sure the proportion of men:women stays at roughly 1:1. Half the population has a girl and stops. The other half has a boy. At this point the ratio is 1:1 (ignoring multiples). Of the people who continue to have children, the same occurs again.
@Chris
Why are you even here and reading the comments? It's stupid, so go do something else.
The 2/3rds answer seems to hinge on treating B-G and G-B as two separate possibilities. I'm still struggling to see why one would do such a thing in a situation where you haven't been asked to do so. It seems to be creating a discrete possibility out of something in which there isn't one. Of the genders of children one can have, I only see B-B, B-G, and G-G. Why should I treat G-B as a discrete entity in a problem like this? That's what I don't get.
I'm not a mathy person but I haven't seen anyone explain satisfactorily why this apparently commonsensical observation is incorrect in terms that can similarly appeal to common sense.
Shmork on December 31, 2008 1:53 AM50% vs 66% -or- B-G vs G-B
People are confusing Events with Outcomes!!!
An Event is a set of related Outcomes. An Outcome is, simply put, all that one can reasonably measure and/or record
about an (ideally instantaneous) observation.
For example, consider the Events on the roll of one standard six sided die:
- Event Even is Outcome of 2, 4, or 6
- Event Odd is Outcome of 1, 3, or 5
- Event Factor-of-3 is Outcome of 3 or 6
- Event One is Outcome of 1
There is also the special Event called the Sample Space that is the set of all possible Outcomes. The Sample Space
for the one die roll is of course 1, 2, 3, 4, 5, or 6.
Note: An Event CANNOT contain an Outcome that is NOT contained in the Sample Space! This is because, by definition,
the Sample Space must contain all possible Outcomes for a given context.
An Event is said to occur when the Outcome one observes matches one of the Outcomes that defines the Event.
(Ideally, the match should be exact, but in real life the match can be close enough.) And, yes, it is possible for
one to define Events such that more than one occurs within a single (instant) observation. If the roll had an
Outcome of 3, then Events Odd and Factor-of-3 have occurred (simultaneously).
Note also that the Outcomes in the Sample Space are (ideally) distinct. In other words, if one is to work with a six
sided die that is labelled with 1, 2, 2, 3, 3, and 3, your theoretical Sample Space might need to look like 1, 2A,
2B, 3A, 3B, and 3C, and you may need Events like Rolled-a-2 (2A or 2B) and Rolled-a-3 (3A, 3B, or 3C). In real
life, you're not likely to tell the 2's and 3's apart, but your theory (of 2A, 2B, 3A, etc.) will aid you in getting
the odds right.
Each Outcome may have a numerical weight of its own. Ideally all Outcomes should have the same weight, but this is
not always the case. Still, for most problems, giving each Outcome the same weight works well enough.
Each Event, in turn, has a weight equal to the sum of the weights of its Outcomes. Assuming the above Outcomes each
have a weight of 1, then Events Even, Odd, Factor-of-3, and One have weights of 3, 3, 2, and 1.
One can normalize these weights by dividing each with the weight of the Sample Space. This will give the weights,
going from 0 to 1, that is conventionally used in Probability. For the one die roll, this is a weight of 6. Hence,
the Probability of Event Even is 3/6 = 50%. In other words, P(Even) = 50%. Also, P(Odd) = 3/6 = 50%, P(Factor-of-3)
= 2/6 = 33.3%, P(One) = 1/6 = 16.7%.
As many have already pointed out, the possible Outcomes for the one is a Girl, odds on a Boy problem are:
(Boy, Girl), (Girl, Boy), (Girl, Girl)
The Sample Space of this problem has a weight of 3 (keeping it simple, only two kids, gender mix at 50/50, and no
twins). The observation being recorded is the gender of the first born and the gender of the second born. Hence the
Outcomes here are ORDERED sets - (Boy, Girl) and (Girl, Boy) are NOT the same! (Mathematically speaking, an Outcome
is really more like a Vector or a Matrix.)
The Event we would like to track is Girl-and-Boy:
- Event Girl-and-Boy is Outcome of (Boy, Girl) or (Girl, Boy)
Events are NOT ordered sets! {(Boy, Girl), (Girl, Boy)} IS the SAME as {(Girl, Boy), (Boy, Girl)}.
An Outcome should be (in principle, anyway) a perfect record of all that can be observed. Dropping information, such
as birth order, often brings misleading results. This is because, ideally, all Outcomes should have equal weight,
and following the mechanics of the situation is your best hope of achieving this. With birth order, Girl-And-Boy
is an Event with a weight of 2. Without birth order, Girl-And-Boy is an Outcome with a (presumed) weight of 1.
If
you insist on dropping birth order from your Outcome record, you may miss out on whether the Girl-And-Boy Outcome
needs a weight of other than 1.
Event Girl-and-Boy has a Probability of 2/3 = 66.7% (weight of Girl-and-Boy divided by weight of Sample
Space).
Since the problem originally asks for the odds of a boy and a girl, that is simply the weight of
Girl-and-Boy to
the weight of Only-Girls:
{(Boy, Girl), (Girl, Boy)} : {(Girl, Girl)}
2 : 1
What makes this problem Bayesian is in the way information is used to remove Outcomes from the Sample Space and
Events. Once this reduction happens, the weights on Events and the Sample Space can change, which in turn changes
the probability.
Let's say in addition to one is a girl we are also told and she is the first born. The Sample Space then
becomes:
(Girl, Boy), (Girl, Girl)
because the information she is the first born now makes (Boy, Girl) impossible.
By definition, Sample Space indicates all possible Outcomes FOR THE GIVEN CONTEXT, and so (Boy, Girl) must be
removed from Event Girl-and-Boy too:
- Event Girl-and-Boy is Outcome of (Girl, Boy)
And so, in the context of one is a girl and she is the first born, the weights of Sample Space and Girl-and-Boy
are 2 and 1.
Thus P(Girl-and-Boy) is now 1/2 = 50%, and the odds change to:
{(Girl, Boy)} : {(Girl, Girl)}
1 : 1
Gosh ... look at all those replies. Would it make a difference if they told you that the oldest child is a girl?! Hmmmm ....
chris on December 31, 2008 1:55 AM@Therac-25
You aren't giving me any new information in this case.
Just to clarify what I'm saying here.
Coin A is heads tells me something.
Saying One of them is heads, and then picking one of the ones that are heads after the fact -- necessarily changing it on each trial -- does not tell me anything new. It's an obfuscated way of saying One of them is heads.
The point is there are cases where you can say One of them is heads and you CAN'T say Coin A is heads.
That's why Coin A is heads gives me information, and the process of One of them is heads - Coin [A|B] is one of the the ones that is heads doesn't. If you then asked me to undergo a SUBSEQUENT guess, then I would wager at 50% the face of the other coin.
Therac-25 on December 31, 2008 2:00 AMKeep posting:
p1 = 50%
p2 = 66%
n1 = posts for 50%
n2 = posts for 66%
answer = (n1*p1 + n2*p2) / (n1 + n2)
Nikos on December 31, 2008 2:02 AMIf somebody says in casual conversation exactly I have two children and one of them is a girl obviously they have 1 girl and 1 boy. Believing otherwise is to fail at understanding how normal people talk.
As the problem is stated, one should probably infer that there were two statements: I have two children and Blah blah, my daughter Jane is in kindergarten (or something like that). In this case the answer is 2/3 chance of having a boy and a girl as many have explained.
Now get back to work everybody!
mj on December 31, 2008 2:02 AM0% they have a boy or girl. You are only hypothetically meeting this person. Hypothetical people do not have real children.
Ben on December 31, 2008 2:05 AM@Rich K
Thank you, that is the first satisfactorily complete answer to why BG and GB should both be considered as unique for the purposes of probability (rather than just squirting that into the explanation as a 'given')
66% it is then.
PunchAndPie on December 31, 2008 2:06 AMShmork,
Treating BG and GB as separate possibilities is only useful for calculating the probability of having one of each.
Thinking of it another way, if you have 8 children, is it more likely that you have 4 and 4, or 1 and 7? They are the same outcome, but they do not have the same probability. 4 and 4 is much more likely than 1 and 7.
So the probability of 1 and 1 is 50%, the probability of 2 and 0 is 25%, and the probability of 0 and 2 is 25%.
Michael L Perry on December 31, 2008 2:12 AM50%
---------
two childs - one is a girl
two possible outcomes (boy girl, girl girl)
odds for (boy girl) is 50%
Happy new year everyone!! Go home and drink beer..
Happy on December 31, 2008 2:18 AM@Jon Ericson: Rather, when I flip two coins and reveal the result of one of the coins, there is a 50% chance the other coin will end up the same as the first and 50% chance it will be different.
If you randomly select whether to reveal heads or tails each time, then I might agree. But that's not the problem we're given in this post. We're given that at least one child (coin) is a girl (heads). It doesn't matter whether or not the hypothetical person in the problem randomly selected which child to tell us the gender of: we know the outcome.
Chickencha on December 31, 2008 2:21 AMThe New Year's partying is still hours away, but I'm giddy already. Thank you, Jeff Atwood, for that clever post, and stirring up all the entertaining and educational commentary. Could you make it a December 31 tradition???
All you posters out there, you're awesome! Happy New Year!
I read through most of the thread, then drew a little diagram to help me think through it.
B1 50% G1 50%
/ \ / \
/ \ / \
B 50% G 50% G 50% B 50%
When a couple has a child, 50% that's it a boy or a girl. Another child = 50% boy or girl. **It doesn't matter which is born first**. When a couple has two children,there's a 75% chance that one is a girl. When we know that one child is girl, there is a 66.6 (2/3) chance that the other is a boy. **This chart does not mean the the B1 and G1 on top are the first child. B1 and G1 could just as easily be the second child. Order does not really matter.**
Ben J on December 31, 2008 2:25 AMActually, I think it is not an answerable question and invalid. Who is 'that person'? Is it the hypothetical person that is telling us or is it the person who we know is a girl? Completely changes the nature of the question. Since it is not clear who 'that person' is, we are unable to determine the correct answer because the sentence is not clear.
Ben on December 31, 2008 2:26 AMCongratulations, Jeff, you win the Internet. Now please give someone else a turn.
Anonymous Cowherd on December 31, 2008 2:27 AMI read through most of the thread, then drew a little diagram to help me think through it.
B1 50% G1 50%
/ \ / \
/ \ / \
B 50% G 50% G 50% B 50%
When a couple has a child, 50% that's it a boy or a girl. Another child = 50% boy or girl. ***It doesn't matter which is born first***. When a couple has two children,there's a 75% chance that one is a girl. When we know that one child is a girl, there is a 66.6 (2/3) chance that the other is a boy. ***This chart does not mean the the B1 and G1 on top are the first children. B1 and G1 could just as easily be the second children. Order does not really matter.***
Ben J on December 31, 2008 2:27 AM(sorry, didn't read all the posts, this may have been correctly answered and explained already).
The answer is 2/3
This is similar to a problem in the all of statistics textbook by wasserman. The problem goes something like you have one card that is green on both sides, one that is red on both sides, and one that is red on one side, green on the other. You draw a card at random and see one side at random. If the side you see is green, what is the probability that the other side is also green?
Most people will intuitively (and incorrectly) answer 50%. Let's say A is the event you see green, then P(A) = 1/2 (there's 6 sides, 3 of them are green, 3/6 = 1/2).
Let B be the event you see green on the other side of the card, so the probability that we see green on the other side, given we saw green on the first side is (by bayes rule) P(B|A) = P(A and B)/P(A).
P(A and B) is 1/3, because there's 3 cards and only one of them is green on both sides so:
P(B|A) = P(A and B)/P(A) = (1/3)/(1/2) = 2/3
arturo on December 31, 2008 2:32 AMNone of this takes into account the fact that the sex of offspring tends to run in the family. So, given any set of two-child families, the number with a GG and BB combination is each higher than the number with a BG combination. Therefore, a couple that already has a girl is statistically more likely to produce another girl.
lt;gringt;
I think the chances are slim to NONE that the person can have a baby that is both a GIRL and a BOY...
@Jon Ericson: I'm not sure I follow.
I don't see that it matters how Jeff chose to reveal what he did. Regardless of how random or planned it might have been, the probability of him revealing that there's at least one girl is 1. Because that's what he did.
Chickencha on December 31, 2008 2:39 AMChickencha: It matters how Jeff chose to reveal what he did because, eg, if he was asked do you have at least one girl? then he would have definitely said yes, even if one of the children was a boy. But if he was asked Randomly pick one of your children and tell me its sex then he might have said boy even though he has a girl as well.
xooorx on December 31, 2008 2:44 AMClassic Monty Hall problem: 66%
Alex on December 31, 2008 2:45 AMTo the 66%ers mentioning that the possible combinations are BB, GB, BG, GG, and that knowing one is a girl removes the BB option, you do realise that knowing one is a girl also removes one of the BG/GB options as well? As such, I'm going for 50% based on my interpretation of the question and the assumption that child birth results in an even distribution of boys/girls over a large sample.
BootLace on December 31, 2008 2:47 AMIts NOT Monty Hall.
Monty never opens the door on the car.
xooorx on December 31, 2008 2:47 AMI'm switching back to 50%. Here's why.
i'm going to make up my own rules (because I can). Pick a parent of two children at random. They pick one of their children at random. They tell me the gender of that child, and I guess whether they have one of each.
The probability that they have one of each is 50% (as established so many times above). The probability that they have one of each and say girl is 25%. They would choose their girl half the time.
So, by Bayesian theory, the probability that they have one of each GIVEN that they said girl is equal to .25/.50 = .50.
QED
Michael L Perry on December 31, 2008 2:47 AM0%. I just met this guy, and he's probably lying. I'm going to check my pockets to ensure nothing's missing.
Owen on December 31, 2008 2:49 AMThe real problem is that the title of this post implies that he will never let this game finish...
Practicality on December 31, 2008 2:51 AMAbsolutely no way to tell from the information given.
Some possibilities besides the ones listed above:
The person SAYS they have two children, and SAYS that one of them is a girl. What if the person is delusional and has no children? Or is simply lying?
That's a non-zero possibility. As such, it's going to mess with the probabilities such that it's not going to be 1, 1/2, or 2/3, or any of the other possibilites given.
If we assume that the information given is accurate -- and that's an assumption -- we also have to consider HOW it was given. Was it phrased in such a way that this information was simply gathered incidentally? If so, then the fact that one of the children is a girl is almost irrelevant -- I suppose that the fact that identical twins exist would SLIGHTLY push the chances of the other child being a girl up, but there aren't that many identical twins, so it probably wouldn't matter much. So the most likely situation is that the odds that the other child is a boy is the same odds that a random birth will be a boy, whatever those odds are.
In other words, if the situation is that you've established through conversation that the person has two children, and then, later, the parent mentions that they're worried that their older child will become pregnant, then that information is irrelevant to the sex of the younger child.
If the person says, I've got two kids -- one daughter, then, in almost all cases, that means that the person is saying that they have ONLY one daughter, and that the other child is either a son or intersexed or something -- most likely a son, and the odds are NEARLY 100% that their other child is a boy -- except that there is the chance that they're lying, or that the other child is intersexed, or some other situation.
Ian Osmond on December 31, 2008 2:54 AMChance of having a girl (.5) x Chance of having a boy (.5) = .25 = 25%
Chance of having a boy AND a girl = 25%
kevin on December 31, 2008 2:56 AM@Matt
Appeal to authority is a logical fallacy. Just because wikipedia (or your statistics textbook) says this is the solution does not make it true.
Practicality on December 31, 2008 2:59 AMThere are three possibilities:
boy/boy
boy/girl (same as girl/boy)
girl/girl
thus it's 33% because we can't rule out boy/boy as we don't know if he/she's lying or not.
Patrick on December 31, 2008 3:02 AMFor the 50% crowd that says that order doesn't matter or two possible outcomes (BG,GG), you have to take into account the how likely each of the outcomes is. Since there are two ways of getting a boy and a girl, and only one way of getting two girls. Having one of each is twice as likely.
mike on December 31, 2008 3:10 AMThe probability is 100%.
Why?
They told you they have two children. If they have two children, they can also have three. Or four. Or five. Or an infinite amount of children, in theory.
If they have an infinite amount of children, they will almost surely have a boy.
Do I win a prize?
Casey on December 31, 2008 3:13 AMI'd say 50%.
Mikael on December 31, 2008 3:17 AMi was in the 50% column until I ran
double boys = 0;
double girls = 0;
Random r = new Random();
while(girls 1000000 )
{
int first = r.Next(0, 2);
int second = r.Next(0, 2);
if ( first == 1 || second == 1 )
{
if (first == 0 || second == 0) boys++;
girls++;
}
}
double percentage = boys/girls;
and got .667199
I guess knowing the ordering matters. If you know the ordering it changes the percentage to .50 Weird
alex on December 31, 2008 3:18 AM50%
The fact that one is a girl has nothing to do with the probability of the event of the other being a boy.
Anyone saying odds are better than that, I live in chandler Arizona and would love to play poker with you.
33%
Isaac on December 31, 2008 3:19 AMTrue, this is not exactly monty hall, but it can be looked at the same way. There are essentially 4 'doors' in this problem: gg gb bg bb. By saying that at least one is a girl they essentially 'open' the bb door. This leaves 3 doors, two of which have one boy and one girl behind them. probability 2/3.
Could also be solved as follows:
P(girl then girl) = .5*.5 = .25
P(girl then boy) = .5 * .5 = .25
P(boy then girl) = .5 * .5 = .25
P(boy then boy) = .5 * .5 = .25
thus
P(girl and boy) = P(boy then girl) + P(girl then boy) = .5
so gg = .25 bg = .5 bb = .25
eliminating the possibility of bb, you need to get the probability of bg from the remaining choices:
bg/(gg+bg) = .5/.75 = .66
Actually, 100%. They say one of them is a girl. Therefore the other must be a boy.
Isaac on December 31, 2008 3:21 AMquick thought: 45% and I'm not ashamed of being wrong.
I read once somewhere that 55% of humans are female.
@Bobson
if(numberOfGirls == 1 numberOfBoys == 1)...
else if(numberOfBoys == 1 numberOfGirls == 1)...
There is a very clear difference between those two cases - Where you'd crash with the following definitions:
numberOfGirls=0
numberOfBoys=one
See? Order does matter :p
We already know numberOfGirls 0 so that one is out from the start.
I wasn't trying to show all the possibilities, just my opinion that saying BG != GB is silly.
Greg Davis on December 31, 2008 3:22 AMAnd what abou hermaphrodites???
Ino on December 31, 2008 3:23 AMIt's 50%. You already know that one of the two kids is a girl, so the problem is reduced to What is the probability that the other one is a boy?
Hussein on December 31, 2008 3:24 AM100% - if they have 2 children, and they've told you that only one is a girl, the other one must be a boy (at least that's my take on it and assuming we aren't dealing with any of the more exotic genders).
I'm going for 2/3
The combinations could be:
Boy/Girl
Boy/Boy
Girl/Girl
Girl/Boy
We know one of the children is a girl so we can drop the boy/boy combination. This leaves three combinations, two of which include boys.
Toot toot.
jammus on December 31, 2008 3:24 AM50% or .5 probability.
Two thirds.
My explanation:
Since this is hypothetical, we may assume we are talking about the expected value. We may further assume that in an independent experiment (i.e. birth), the odds for a boy or a girl are identical at 50%.
Now, for two children there are four possibilities, with equal probabilities:
1. boy-boy
2. boy-girl
3. girl-boy
4. girl-girl
Since we've discounted the first possibility, we are left with three possibilities with equal probabilities, two of which yield the desired outcome. Hence, two thirds.
Options are BB BG GB GG
Comment rules out BB so the answer is 2 to 1 (assuming B/G 50/50)
But realistically, anyone who says one is a girl implies the other is a boy
Dave on December 31, 2008 3:26 AM2/3
If they have 2 children, there are four possible permutations, all other things being equal:
BB
BG
GB
GG
If you know that one of them is a girl (ignoring the very valid semantic point that Isaac raised) that eliminates the 'BB' possibility. Of the three remaining possibilities, two satisfy the 'boy and girl' condition. Therefore, 2/3.
Murali on December 31, 2008 3:28 AM@Isaac - that's brilliant reasoning.
I'd say that there are four possible combinations for two children:
a) boy + boy
b) boy + girl
c) girl + boy
d) girl + girl
and that we could naively assume 25% probability for each.
(a) is ruled out, therefore the person has one of a,b,or c, with 33% probability each. The odds of boy and girl are therefore 66%.
i have to revise my answer to 1/3 because my answer was for probability of both children being girls.
Same cards analogy, let A seeing green on first side, B = seeing RED on other side (not green as my original post had it).
P(A and B) = 1/6, not 1/3 because there are six possible ways of drawing one card (3 cards * 2 sides per each card). So
P(B|A) = P(A and B)/P(A) = (1/6)/(1/2) = 1/3
arturo on December 31, 2008 3:30 AMOf course, the closer answer is 68.75%.
The natural birth sex ratio being 1.1 boy/girl, probabilities for pairs are:
bb 27.44%
bg 24.94%
gb 24.94%
gg 22.68%
Discarding bb and considering the remaining population:
bg 34.38%
gb 34.38%
gg 31.25%
so bg|gb = 68.75%
---
Ok, I cheated: I did a web search to find the sex ratio there:
http://en.wikipedia.org/wiki/Human_sex_ratio#Natural_ratio
There are a ton of very different, very complicated answers to a question that a 4th grader can figure out.
They tell you a person has two children, and they ask you the odds of the person having one boy and one girl. Without any other information, the answer would be 50%(combos of: GG, GB, BG, BB).
They tell you that one of the children is a girl, so all they are asking for is the probability that the other child is a boy. There are only two choices to choose from(boy/girl), meaning you have a 50% chance of getting it right. Nothing else matters, probability does not change of the second child being a boy/girl no matter what the first child is.
Simple Example: I flip a coin, it comes up heads. I flip the coin again, what are the odds it comes up heads again?
It is completely irrelevant what happened the first time you flipped the coin, the odds don't change, it is still 50%. It's the same with children, you have a 50% chance of a baby being a boy or a girl.
Anon on December 31, 2008 3:32 AMThis problem is well documented:
See http://en.wikipedia.org/wiki/Boy_or_Girl
for the answer being 66% Have a good day
Kieth on December 31, 2008 3:32 AMThis problem is well documented:
See http://en.wikipedia.org/wiki/Boy_or_Girl
for the answer being 66% Have a good day
Kieth on December 31, 2008 3:32 AMThe comments to this entry are closed.
|
|
Traffic Stats |