Active Users:243 Time:19/04/2024 05:01:02 PM
Re: Yeah Tor Send a noteboard - 25/05/2010 09:52:58 AM
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)
Fram kamerater!
Reply to message
Recreational mathematics - 24/05/2010 09:17:27 PM 979 Views
How is boy/girl different from girl/boy? - 25/05/2010 01:05:15 AM 826 Views
I think it has to do with sequence - 25/05/2010 08:37:05 AM 708 Views
The problem doesn't state the sequence, so there's no reason to assume it. - 25/05/2010 08:56:09 AM 802 Views
Yes there is - 25/05/2010 10:36:02 AM 695 Views
Then see my response. - 25/05/2010 12:20:04 PM 650 Views
Faulty "logic". 2/4 - 25/05/2010 02:12:54 AM 866 Views
I was going to say. - 25/05/2010 02:48:38 AM 731 Views
Yeah - 25/05/2010 05:05:16 AM 671 Views
Re: Yeah - 25/05/2010 09:52:58 AM 911 Views
I don't know Python, but I think I know what went wrong there. - 25/05/2010 11:33:18 AM 744 Views
Re: I don't know Python, but I think I know what went wrong there. - 25/05/2010 01:53:01 PM 905 Views
Ah, I see now; sorry. - 25/05/2010 02:27:05 PM 709 Views
It's also playing off your mental biases - 25/05/2010 04:49:40 PM 675 Views
If you stop now I'll still be verbal. - 26/05/2010 10:58:27 AM 707 Views
I think I see where I went wrong. - 25/05/2010 07:44:25 PM 652 Views

Reply to Message