They are right, and you are wrong. Here is an easy way to test this.
An equivalent problem:
If someone threw a coin twice, and all you know is that at least one of those throws ended up tails, what is the probability that they got tails tails?
It is a trivial matter to write a script which performs for example a million pairs of coin throws, and then divide the number of tails tails by the number of pairs where at least one is tails. And you get 1/3.
The whole point of the problem is that order doesn't matter. If you knew the first child was a boy, then it would be fifty-fifty for the next child to be a boy. But since you don't know which one is a boy, it's 1/3 for both to be boys.
Here is the script I wrote to test this.
#!/usr/bin/env python
from random import randint
A = []
for x in xrange(100000):
A.append([randint(1,2), randint(1,2)])
c = 0
d = 0
for a in A:
if 1 in a:
c += 1
if a == [1,1]:
d +=1
print float(d)/float(c)
An equivalent problem:
If someone threw a coin twice, and all you know is that at least one of those throws ended up tails, what is the probability that they got tails tails?
It is a trivial matter to write a script which performs for example a million pairs of coin throws, and then divide the number of tails tails by the number of pairs where at least one is tails. And you get 1/3.
The whole point of the problem is that order doesn't matter. If you knew the first child was a boy, then it would be fifty-fifty for the next child to be a boy. But since you don't know which one is a boy, it's 1/3 for both to be boys.
Here is the script I wrote to test this.
#!/usr/bin/env python
from random import randint
A = []
for x in xrange(100000):
A.append([randint(1,2), randint(1,2)])
c = 0
d = 0
for a in A:
if 1 in a:
c += 1
if a == [1,1]:
d +=1
print float(d)/float(c)
Fram kamerater!
Recreational mathematics
24/05/2010 09:17:27 PM
- 1046 Views
How is boy/girl different from girl/boy?
25/05/2010 01:05:15 AM
- 886 Views
I think it has to do with sequence
25/05/2010 08:37:05 AM
- 763 Views
The problem doesn't state the sequence, so there's no reason to assume it.
25/05/2010 08:56:09 AM
- 858 Views
Faulty "logic". 2/4
25/05/2010 02:12:54 AM
- 930 Views
I was going to say.
25/05/2010 02:48:38 AM
- 783 Views
Yeah
25/05/2010 05:05:16 AM
- 739 Views
Re: Yeah
25/05/2010 09:52:58 AM
- 971 Views
I don't know Python, but I think I know what went wrong there.
25/05/2010 11:33:18 AM
- 800 Views
Re: I don't know Python, but I think I know what went wrong there.
25/05/2010 01:53:01 PM
- 952 Views
Ah, I see now; sorry.
25/05/2010 02:27:05 PM
- 758 Views
You realize this thread now contains the words "Monty" and "Python" several times, right?
26/05/2010 11:01:24 AM
- 672 Views