Active Users:626 Time:24/11/2024 02:47:24 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 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
Yes there is - 25/05/2010 10:36:02 AM 752 Views
Then see my response. - 25/05/2010 12:20:04 PM 696 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 970 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 951 Views
Ah, I see now; sorry. - 25/05/2010 02:27:05 PM 758 Views
It's also playing off your mental biases - 25/05/2010 04:49:40 PM 721 Views
If you stop now I'll still be verbal. - 26/05/2010 10:58:27 AM 756 Views
I think I see where I went wrong. - 25/05/2010 07:44:25 PM 703 Views

Reply to Message