If so, it's NOT because of that proof.Just thinking said:... but 0.99999 --> is 1.
If so, it's NOT because of that proof.Just thinking said:... but 0.99999 --> is 1.
Moose said:I realize this is a quick-and-dirty implimentation, but if you were planning on running this over a large number of iterations, it's inefficient and vulnerable to (short-term) deadlock.
It's a fairly tight loop, and these are usually worth the effort of optimizing.
Instead of randomizing both children and checking to see if they fit the criteria for inclusion, I would do something like this:
This is guaranteed to run in one pass per trial, does not compromise (pseudo)-randomness and requires no comparisons.
No, he was disagreeing with you. He was saying that in the situation where you call her up and tell her that if she has a son to bring him to the store, the probability is 1/3, but in the situation where you just happen to see her with one son, the probability is 1/2.Just thinking said:Good -- because that was my intent. By saying "A woman is in a store with her son ... " I wanted to guarantee that she shows a son and that she has at least one.Originally posted by 69dodge
If you randomly pick a woman out of the phone book, and you call her up and say, "if you have exactly two children, not both girls, please come to the store and bring a son with you," you are forcing her to bring a son if she has any, and then if she does come to the store, the probability is 1/3 that she has two sons.
Well, it's at least logical enough for the computer to run it. I can't say that of the description of your experiment.And you call my post vague???
You code is impenetrable
No, child(1) cannot be anything else but a boy, because child(1) is defined as the known child.More precisely: either child 1 is a boy, or child 2 is a boy, or child 1 and child 2 are boys.
Boy = 1
Girl = 0
KnownChild = Boy
FOR n = 1 TO 10000
UnknownChild = INT(RND * 2)
IF UnknownChild = Boy THEN
Total.Times.Child2.Is.Also.A.Boy = Total.Times.Child2.Is.Also.A.Boy + 1
END IF
PRINT Total.Times.Child2.Is.Also.A.Boy / n
NEXT
And you know that one is either a boy or a girl. Order of birth is irrelevant. Alphabetical order of their names is irrelevant. Which one is the better one at school is also irrelevant.In a strange sense, you can not know the gender of either child. You only know that one or more is a boy.
Why not? The mother asks us tells us the gender of one child and asks us for the gender of the other child. Since the individual genders are independent from eachother, the knowledge of the gender of one does not affect the gender of the other, as far as I know.You are assuming (from the first 2 outcomes) that each has an equal probability of happening. They do not.
I mean the child the mother has told us the gender of. I thought that was obvious.Also, when you say "The child we know of ... " just what exactly do you mean?
Now, since there are 3 outcomes (not just 2) from only knowing one was a boyWhat is the third outcome?Well, I'd say we are playing game 1. Dr. Adequate's explanation is pretty good, isn't it?We are (I believe) playing game 2.
I believe we are playing game one, because we have no reason to believe that the mother would only have told us the gender of the child if one of them was a boy. So I'll assume that she would have told us no matter what. Ockham's Razor and all that: the simplest explanation that fits the evidence.
What is your reason for believing we are playing game two? Doesn't that require that you make assumptions about the behaviour of the mother that do not exist in the OP?
CurtC said:Older or younger doesn't matter. When you call her on the phone and tell her to bring a son if she has one, this is equivalent to asking "is either of your kids a boy" and is different from "is that particular, specific kid a boy?" (particular and specific could be the one who's older, the one she happens to have in the grocery cart, the one who's taller, or whatever, as long as we're talking about just one).
Jellby said:It was an implicit premise: if you see a woman giving birth to a son and you know she already has another child, it's obvious the baby you're seeing is younger than his sibling.
Well, yes, ignoring all that (as we ignore differences in boy/girl frequencies and hermaphrodites).
As I understand it, if you can label unambiguously both children and you know which one is a boy, then the probability is 1/2. If you know one is a boy but can't assign that piece of information to either of the labeled children, then it's 1/3.
So, if we know that the oldest is a boy, we have 1/2. But would it be different if we knew the tallest is a boy?
What if we know somehow that one of the children is out of the city when we see mother and child? We can call the one in this city A and the one away B, we know A is a boy... the probability of B being a boy too is 1/2 (I'd say). What are the restrictions we have when giving a label the the children? (Surely, we can't say "let's call the one we know is a boy A", can we? This would be what Earthborn suggested).
Alkatran said:I wrote the code to be as much like the problem as possible. I was looking at it from the point of someone picking families at random. I wasn't worried about optimization because... well I only looped through it 1000 times. I mean come on.![]()
In the gambler's fallacy the gambler knows the results of all previous flips and is speculating only on the next flip.ReFLeX said:What I don't understand is how this is different from the 'gambler's fallacy', that the previous flip of the coin affects the next one, and so on.
The proof that 0.999... = 1 easily simplifies to the equation 9x=9, so if you saw it as "9x=9x" there was a typo in there somewhere.Originally posted by ReFLeX
If so, it's NOT because of that proof.
That's true, and that's why I pointed out earlier that the question is better stated as a census worker asking her first if she has a boy.Originally posted by Jorghnassen
Though, on a pure common sense approach, if you say "I have two children, one of them is a boy", you're clearly implying the other one is a girl...
No, if you're given that the tallest is a boy, we're back to P=1/2. That's because you're now talking about a specific kid, and not the question "is either of them a boy" as in the census worker example (which is P=1/3).Originally posted by Just ThinkingYes, this does nothing except tell us that one is a boy -- we're back to P = 1/3.So, if we know that the oldest is a boy, we have 1/2. But would it be different if we knew the tallest is a boy?
CurtC said:No, if you're given that the tallest is a boy, we're back to P=1/2. That's because you're now talking about a specific kid, and not the question "is either of them a boy" as in the census worker example (which is P=1/3).
CurtC said:No, he was disagreeing with you. He was saying that in the situation where you call her up and tell her that if she has a son to bring him to the store, the probability is 1/3, but in the situation where you just happen to see her with one son, the probability is 1/2.
Older or younger doesn't matter. When you call her on the phone and tell her to bring a son if she has one, this is equivalent to asking "is either of your kids a boy" and is different from "is that particular, specific kid a boy?"
ReFLeX said:If so, it's NOT because of that proof.
Just thinking said:Well, you first said (before mentioning a twin birth) ... "The only difference with the shop scene is you now know that the boy you saw is the younger child." This statement in no way infers that the child you see is the younger one.
I'm not sure we can ignore that. Perhaps the ratio of Identical to Fraternal is not 1:1 given a twin birth ... maybe it's not even close. And maybe one is more likely to have twin girls rather than twin boys. I don't know that either. So let's keep twins and other oddities out of this for now.
Just thinking said:We walk up to her and ask (without seeing a child) ... "How many children do you have?" She says "2". We then ask "Is one a boy?" and she replies "Yes". We caculate the probability of the second being a male as 1/3.
Next we see another woman (without seeing a child) and do the same. "How many children do you have?" She says "2". We then ask "Is one a boy?" and before she replies a male child runs up to her crying for his mommy. Are you saying this gives us more information than the first woman? (Keep in mind my intended conditions above.)
Jellby said:Strangely, I think there is a difference, but I can't say exactly what it is. In the second case you know that "this particular kid" is a boy, which I think is enough.
Originally posted by Just thinking
We walk up to her and ask (without seeing a child) ... "How many children do you have?" She says "2". We then ask "Is one a boy?" and she replies "Yes". We caculate the probability of the second being a male as 1/3.
Next we see another woman (without seeing a child) and do the same. "How many children do you have?" She says "2". We then ask "Is one a boy?" and before she replies a male child runs up to her crying for his mommy. Are you saying this gives us more information than the first woman? (Keep in mind my intended conditions above.)
I agree with this statement!Just thinking said:Here's where we disagree.
Yes, I'm saying that gives you more information, and the odds would adjust accordingly. If the pair of kids is (kid in the store, kid not in the store) then out of the four possibilities (B,B) (B,G) (G,B) (G,G) you now have ruled out two of them.Next we see another woman (without seeing a child) and do the same. "How many children do you have?" She says "2". We then ask "Is one a boy?" and before she replies a male child runs up to her crying for his mommy. Are you saying this gives us more information than the first woman?
CurtC said:I agree with this statement!Yes, I'm saying that gives you more information, and the odds would adjust accordingly. If the pair of kids is (kid in the store, kid not in the store) then out of the four possibilities (B,B) (B,G) (G,B) (G,G) you now have ruled out two of them.
And I would be willing to wager a lot of money on this answer if we carry out random simulations.