Active Users:285 Time:02/05/2024 04:37:58 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 985 Views
How is boy/girl different from girl/boy? - 25/05/2010 01:05:15 AM 830 Views
I think it has to do with sequence - 25/05/2010 08:37:05 AM 711 Views
The problem doesn't state the sequence, so there's no reason to assume it. - 25/05/2010 08:56:09 AM 804 Views
Yes there is - 25/05/2010 10:36:02 AM 700 Views
Then see my response. - 25/05/2010 12:20:04 PM 653 Views
Faulty "logic". 2/4 - 25/05/2010 02:12:54 AM 871 Views
I was going to say. - 25/05/2010 02:48:38 AM 733 Views
Yeah - 25/05/2010 05:05:16 AM 673 Views
Re: Yeah - 25/05/2010 09:52:58 AM 914 Views
I don't know Python, but I think I know what went wrong there. - 25/05/2010 11:33:18 AM 747 Views
Re: I don't know Python, but I think I know what went wrong there. - 25/05/2010 01:53:01 PM 909 Views
Ah, I see now; sorry. - 25/05/2010 02:27:05 PM 714 Views
It's also playing off your mental biases - 25/05/2010 04:49:40 PM 677 Views
If you stop now I'll still be verbal. - 26/05/2010 10:58:27 AM 710 Views
I think I see where I went wrong. - 25/05/2010 07:44:25 PM 657 Views

Reply to Message