• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Probability question

CurtC said:
No, you know specifically which coin was heads, so TT and TH are eliminated (the first letter of the pair in my usage indicates which one we've seen).
I don't think so. You've changed the description slightly by designating the shown coin as coin 1. If I flip 2 identical coins (1 and 2), the possibilities are T1T2, T1H2, H1T2, and H1H2. If I tell you that coin 1 is H, then the only possibilities are H1T2 and H1H2. If I show you a coin is heads, but not which coin, you can't eliminate either T1H2 or H1T2, since you have no way of knowing which coin you are looking at. You are arbitrarily assuming the shown coin is coin 1. If one coin was red and one was blue, then you could decide which case to eliminate and the odds would increase to 1/2. But both coins are identical.

How is seeing a coin, when you don't know if it was the first or second coin, any different from just knowing that "atleast one is heads"?

edited to remove incomplete analysis of the betting game.
 
patnray said:
How is seeing a coin, when you don't know if it was the first or second coin, any different from just knowing that "at least one is heads"?
If the one I see was selected because it was heads, then there is no difference. At that point, it's like playing the Monty Hall game and you have to consider the motivation of the person playing against you, who has more information in the game than I do.

If it was selected randomly, similarly to seeing a lady with her son at the grocery store, then it is different. You insist on using the flip-order (or birth-order) to designate which is first in the TT, HT, etc. pairings, but it's just as valid to pair them as (one I see, one I don't see), in which case if you see a heads, you've eliminated TT and TH, so it's obvious the probability is 1/2.
 
I flip two coins and cover them. I look at one coin (randomly selected) and tell you, "At least one coin is H" or "At least one coin is T" You then bet $1 that both coins are the same as the one announced. I think we agree that you would lose money because either TT (first case) or HH (second case) is not possible. Both TT and HH are possible outcomes, but once you know one coin, one of them is no longer possible.

And I maintain that you would lose the same amount if, instead of announcing that at least one coin is H (or T) I simply slide one coin out from under the cover without knowledge of whether it was the first or second coin. Your bet is always that both coins are the same as the one shown.
 
patnray said:
I flip two coins and cover them. I look at one coin (randomly selected) and tell you, "At least one coin is H" or "At least one coin is T" You then bet $1 that both coins are the same as the one announced. I think we agree that you would lose money because either TT (first case) or HH (second case) is not possible.
No, we don't agree on that. I would expect that we would come out even with this system. If you randomly pick one coin, look only at that one, then declare that "at least one is heads," that tells me logically that the coin you looked at is heads, and there is a 50-50 chance that the other is heads as well. I wouldn't lose money over the long term.

Both TT and HH are possible outcomes, but once you know one coin, one of them is no longer possible.
Once you know one coin (randomly chosen), there are two outcomes that are no longer possible.
And I maintain that you would lose the same amount if, instead of announcing that at least one coin is H (or T) I simply slide one coin out from under the cover without knowledge of whether it was the first or second coin. Your bet is always that both coins are the same as the one shown.
So you say you would win 2/3 of the time, I say I would win 1/2 the time. Give me 3:2 odds and I'll play this game for as much money as you can scrape together.
 
patnray said:
I flip two coins and cover them. I look at one coin (randomly selected) and tell you, "At least one coin is H" or "At least one coin is T" You then bet $1 that both coins are the same as the one announced. I think we agree that you would lose money because either TT (first case) or HH (second case) is not possible. Both TT and HH are possible outcomes, but once you know one coin, one of them is no longer possible.

But now TH, HT and HH (assuming it was H the one you saw) are not equally probable. In fact, HH is twice as likely as a TH or HT on their own. Of all the times you'll flip HT or TH, you'll see an H only in half of them.

1/4 of the times you'll flip HH and will see an H
1/4 of the times you'll flip TH or HT and will see an H
1/4 of the times you'll flip TH or HT and will see a T
1/4 of the times you'll flip TT and will see a T

So, of all the times you see an H (or a T) just 1/2 will be the two coins equal.

The only way to turn 1/2 to 1/3 is if all the TH and HT are in a single basket, if, for instance, every time you flip TH or HT you proclaim there's "at least one heads", or if I ask just that.
 
Here's an outline for a computer simulation that will play this game:

// flip the coins
CoinA = Random(0 or 1)
CoinB = Random(0 or 1)

// choose one of them randomly
pick = Random(0 or 1)

// assign value of that coin to 'chosen', put other in 'other'
if (pick == 0) { chosen=CoinA ; other=CoinB }
else { chosen=CoinB ; other=CoinA }

// evaluate if both are the same
if (chosen==other) curt_wins++
else pat_wins++

Loop through this 10000 times and see what it gives.
 
CurtC, your program does not play the game as described in the OP, and in fact doesn't even play the game as you feel it should be playing the game.

Your psudocode asks "given no information, what is the probability that both children share the same gender". The probability of this, of course, is two ways out of the four ways to combine two children (reducing to 1/2). This is, however, not the question asked of the OP by any stretch of imagination.

But from the OP, we know there is at least one boy involved. We've seen him. We don't really know who this boy is, but we know there's a boy here.

This eliminates even the possibility of turning up a pair of girls (that your code incorrectly allows). So that leaves only one remaining way out of the remaining three combinations for us to see two children of the same gender (specifically, both boys).
 
Moose said:
CurtC, your program does not play the game as described in the OP...
I know that. Everyone on the planet agrees that the answer to the question in the OP is 1/3 (it would help if it were worded better though, the census worker phrasing is my favorite).

But I think it plays the game that patnray was describing in his post on 06-27-2005 at 03:13 PM (I think this is CDT), where he said "I flip two coins and cover them. I look at one coin (randomly selected) and tell you, "At least one coin is H" or 'At least one coin is T' You then bet $1 that both coins are the same as the one announced. I think we agree that you would lose money because either TT (first case) or HH (second case) is not possible. Both TT and HH are possible outcomes, but once you know one coin, one of them is no longer possible."
 
Moose said:
But from the OP, we know there is at least one boy involved. We've seen him. We don't really know who this boy is, but we know there's a boy here.

This eliminates even the possibility of turning up a pair of girls (that your code incorrectly allows). So that leaves only one remaining way out of the remaining three combinations for us to see two children of the same gender (specifically, both boys).

Yes, it eliminates one possibility, but it also alters the probability of the others. If you know one is a boy, the two boy-girl cases have their probabilities reduced by one half, because you can eliminate those cases where you'd have seen a girl. Yes, there are still 3 possibilities, but they don't have equal probabilities anymore. If someone has two boys, you can be sure (100%) you'll se a boy, if someone has a boy and a girl, you have only a 50% chance of seeing a boy. And this balances the probabilities again.

It is different if you can be sure that if there is at least a boy, you'll know that (in the previous case, you'll know that only in 50% of the times). For example, if you ask directly, or if the mother must bring a boy if she has one.
 
CurtC said:
I know that. Everyone on the planet agrees that the answer to the question in the OP is 1/3 (it would help if it were worded better though, the census worker phrasing is my favorite).

I don't. I agree with Martin Gardner that the problem is not well defined. In the census worker case I agree is 1/3. But with some random stranger saying some random phrase about his/her children... I can't say whether it's 1/2 or 1/3, and in lack of further data, I'd choose 1/2 because it implies fewer assumptions.
 
Jellby said:
Yes, there are still 3 possibilities, but they don't have equal probabilities anymore. If someone has two boys, you can be sure (100%) you'll se a boy, if someone has a boy and a girl, you have only a 50% chance of seeing a boy. And this balances the probabilities again.

...

...

...

Wha?

Jellby, you're still assuming that you know which child you've been told the gender of. "Elder" and "Younger" is irrelevant except as a way to identify each child. In a way, it's a red herring. It could just as easily have been "leftie" and "rightie" or "innie" and "outie".

The only requirement is the recognition that the children are not interchangable, and that their genders are both fixed and independent.

There are four possibilities, and only four possibilities. B-B, G-B, B-G, and G-G. Because each child's gender is a 50-50 possibility until it is known, each combination carries an equal probability of 1/4.

The twist is that we know both children aren't girls. That's all the information we've been given. Even if we see a boy, we don't know which boy this is. This does not fix a gender to a child, it only eliminates the G-G possibility.

The other probabilities have not been affected in any way. This leaves three possibilities, each bearing an equal probability of 1/3.

Remember, there are two ways to encounter a boy and a girl, which your example seemingly ignores.
 
CurtC said:
I know that. Everyone on the planet agrees that the answer to the question in the OP is 1/3 (it would help if it were worded better though, the census worker phrasing is my favorite).

Okay. Sorry, I lost the train of the thread over the weekend. I should have made sure I knew the context of your reply before I got mesmerized by that pretty code. (It's sooo alluring! :p )
 
After thinking it over, I realize Jellby is right and my game is flawed (or has probability of 1/2). Good thing I wasn't betting on it. Probability is 1/3 only when you know at least one coin is H.
 
Moose said:
Jellby, you're still assuming that you know which child you've been told the gender of. "Elder" and "Younger" is irrelevant except as a way to identify each child. In a way, it's a red herring. It could just as easily have been "leftie" and "rightie" or "innie" and "outie".

No, I'm not assuming that. All I'm assuming is that the selection of which child we see is independent from its gender. I mean, we see a child, whatever child, and it happens to be a boy, it could be a girl, but it's a boy. Especially important is that, if the children are boy and girl (or girl and boy), we could just as likely see a girl or a boy.

The twist is that we know both children aren't girls. That's all the information we've been given. Even if we see a boy, we don't know which boy this is. This does not fix a gender to a child, it only eliminates the G-G possibility.

The other probabilities have not been affected in any way. This leaves three possibilities, each bearing an equal probability of 1/3.

Remember, there are two ways to encounter a boy and a girl, which your example seemingly ignores.

I wasn't ignoring that. I'll try to explain it again. Let's consider a population of 100 mothers with 2 children each, ideally:

25 have 2 girls
50 have 1 boy and 1 girl
25 have 2 boys

Now, all of them say the sex of one (at random or at will) of their children with the phrase "I have two children, one of them is a ...", and that's all they say.

25 will have to say "girl"
25 will have to say "boy"
50 will be able to choose between "boy" and "girl", ideally 25 will choose "girl" and 25 will choose "boy".

So the total is 50 will say "boy", and of these, 25 have 2 boys, that's 50%.

My point is only 50% of the mothers who have one son and one daughter will say "one of them is a boy", so when a mother says that, you can eliminate half of them. Not a specific half, you don't have such information, but you know the "population" has been reduced to one half.

But if you ask: "do you have at least one boy?" then all the 50 mothers who have a boy and a girl will have to say "yes", and then we're at 1/3 probability.

Put in other way. We have 4 coins: two normal coins, one with two heads, and one with two tails. Flip a coin at random and it gives heads, what's the probability of it being the coin with two heads? 1/2.

Now pick a coin and look at it. I ask you, does it have at least a head? You say "yes". What's the probability of it being the coin with two heads? 1/3.

I say someone saying "one of my kids is a boy" when no one asked and when nothing forced him/her to speak only of boys is equivalent to the first case.
 
patnray said:
After thinking it over, I realize Jellby is right and my game is flawed (or has probability of 1/2). Good thing I wasn't betting on it. Probability is 1/3 only when you know at least one coin is H.

Now let's say you know it.

Flip two coins, labeled A and B. I ask "was H at least one of them?" You say "yes". Now I ask "which one?" You say "the one labeled B". What's the probability of both coins being H?
 
Jellby said:
Now let's say you know it.

Flip two coins, labeled A and B. I ask "was H at least one of them?" You say "yes". Now I ask "which one?" You say "the one labeled B". What's the probability of both coins being H?
After the first answer, 1/3. After the second answer, 1/2.
 
patnray said:
After the first answer, 1/3. After the second answer, 1/2.

What if one were labeled "Pat" and the other "Chris"? Trying to figure out how knowing an arbitrary name or label gives you more information.
 
Knowing that Pat and Chris, as names, are suitable for both boys and girls, then the probability remains 1/2. No additional information is provided.

So long as you can distinguish between the children in some way, and you know the specific gender of a specific child, then it becomes a problem of figuring out the probability that the other specific child is a boy.
 
Moose said:
Knowing that Pat and Chris, as names, are suitable for both boys and girls, then the probability remains 1/2. No additional information is provided.

So long as you can distinguish between the children in some way, and you know the specific gender of a specific child, then it becomes a problem of figuring out the probability that the other specific child is a boy.

You misunderstand... one has been identified as a boy... does it matter if you know he's child "A" or his name is "Tom"... what does that tell you? It's arbitrary.
 
patnray said:
After the first answer, 1/3. After the second answer, 1/2.

Sorry, wrong.

If both coins are heads, you are not forced to say B was heads, you could have chosen to say A.

A=T, B=T and A=H, B=T can be discarded.
25% of the times you get A=T, B=H, and 25% of the times you say B was H
25% of the times you get A=H, B=H, but only 12.5% of the times you say B was H, as you can choose the coin.

And here the probabilities stay 2:1 (that's 1/3).

If the conversation were: "Was H at least one of them?" "Yes." "Was it the one labeled B?" "Yes." Then your answer would have been correct.
 

Back
Top Bottom