x = [(c1,c2,d1,d2)
for c1 in ["B","G"]
for c2 in ["B","G"]
for d1 in [0,1,2,3,4,5,6]
for d2 in [0,1,2,3,4,5,6]
if (c1 == "B" and d1 == 1) or (c2 == "B" and d2 == 1)]
num = sum(1 for (c1,c2,d1,d2) in x if c1 == "B" and c2 == "B")
denom = sum(1 for _ in x)
print("%s/%s" % (num,denom))Think you understand Monty Hall? Try the Tuesday boy problem.
71–80 of 152 posts
Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#72Earlier quoted context omitted.
ajanuary explains the duplicates problem nicely here: http://news.ycombinator.com/item?id=3290185 so I won't double up. I've spent the last hour and a half wrestling with the same clash between maths and intuition that you're experiencing so I understand your frustration - 13/27 really is the right answer though.
He explains it, and he's wrong. Look, I understand your intuition wants you to remove duplicates "They are the same!". But you should resist, because doing that gives incorrect results.
Besides: please re-read my original post - I didn't mention anything about removing duplicates, and in fact chose to explain the problem in a different way precisely because the duplicate removal thing was so difficult for me to grasp sufficiently to be able to explain it.
Ask yourself this: where does the original 28 come from? One of those 28 permutations appears to be 'Child 1 is Tuesday boy' and 'Child 1 is Tuesday girl'. If you can answer that then you should be able to understand the whole thing.
(edited for clarity)
Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#73 1BT 2BM 1BM 2BT
1BT 2BT 1BT 2BT
I think the issue people are having is that they want to distinguish between the two instances of '1BT 2BT', but it doesn't work like that. Let's say I numbered each of the possibilities written above 1 through 28. If I handed you a piece of paper with '1BT 2BT' written on it, could you tell me which number that corresponded to? No - it would be one of two numbers - so the numbering is additional information not given in the problem statement.Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#74 import random, time, collections, pprint
sample = collections.defaultdict(float)
now = time.time()
known_child = ('M', 2)
while sum(sample.values())
Result when I ran this was .4816, approximately equal to 13/27.Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#75I've been thinking about this for an hour, and I'm now convinced that the author is wrong. The fact that we found out about one of the children from the father means that all probabilities are not equal, even though they're treated here like they are. The difference is between the information being offered, and determined independantly. I'll do this with the boy/girl problem, for simplicities sake. If we ask a man if…
Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#76 A small simulation in Python
from random import randint
oneBoy=0
twoBoys=0
# 0 = boy, 1 = girl
for i in range(10000):
s1 = randint(0,1)
s2 = randint(0,1)
if s1 * s2 == 0: # Here is at least one boy
oneBoy = oneBoy+1
if s1 == s2: # Here are two boys
twoBoys = twoBoys+1
print("Two Boys")
print(float(twoBoys)/float(oneBoy))
# As expected the result is near 1/3.
oneBoyT=0
twoBoysT=0
#days 0=Monday, 1=Twesday ...
# (0,1) means (sex,day) = a boy was born one Twesday
for i in range(1000000):
s1 = randint(0,1)
d1 = randint(0,6)
s2 = randint(0,1)
d2 = randint (0,6)
if (s1,d1)==(0,1) or (s2,d2)==(0,1):
oneBoyT = oneBoyT+1
if s1 == s2:
twoBoysT = twoBoysT +1
print("Two Boys in Twuesday")
print(float(twoBoysT)/float(oneBoyT))
# The simulation gives a result near 1/3,
# this is a hint to prove that 13/27 is incorrect
# under the assumption that the population sex and
# day are independent, and with probability 1/2 and 1/7
# if you want to convince me otherwise, I'll be
# glad to see the code to generate the population
# and the estimated probability.Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#77As the currently top voted comment does not get it, I try to intuitively explain the paradox. No, it is not ambiguity of language. It says formally: I have two children. There exists a child of mine who is (boy and born on tuesday). And yes, the probability of the other child being a boy is 13/27. To understand this, try a more extreme case: When a child is born we generate a random number: rnd(1billion) Now the man…
No, it is not ambiguity of language. This is a big call to make, seeing as English is not your native language. As a native English speaker, I find it very ambiguous as to which set of probabilities I should be counting.
"I have 2 children. Exists child where (Born_on_tuesday(child) and Boy(child))."
(Some other paradoxes completely disappear when you try to write the statement into first order logic. It is not the case here.)
This is what I wanted to say.
Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#78Earlier quoted context omitted.
"One of them is a boy." is a completely different scenario and no one is arguing about it. (BG, GB, BB, GG - by saying one is a boy you exclude GG leaving 1/3.) In this case we are asking if the other is a boy NOT if the other was born on Tuesday.
Ah, sorry, I misunderstood your question. You are asking, why the information "one is born on Tuesday" says anything about the gender or birthday of the other, right? More specificaly, this: > Let us first assume that it is the older child who was a son born on a Tuesday. In this case the second child could be either of two sexes, and could have been born on any of seven days of the week, for a total of 14 possibilit…
A: Boy A: Boy
M T W T F S S M T W T F S S
B M . 1 . . . . . B M . 1 . . . . .
T 1 1 1 1 1 1 1 T . 1 . . . . .
B W . 1 . . . . . G W . 1 . . . . .
o T . 1 . . . . . i T . 1 . . . . .
y F . 1 . . . . . r F . 1 . . . . .
S . 1 . . . . . l S . 1 . . . . .
S . 1 . . . . . S . 1 . . . . .
A: Girl A: Girl
M T W T F S S M T W T F S S
B M . . . . . . . B M . . . . . . .
T 1 1 1 1 1 1 1 T . . . . . . .
B W . . . . . . . G W . . . . . . .
o T . . . . . . . i T . . . . . . .
y F . . . . . . . r F . . . . . . .
S . . . . . . . l S . . . . . . .
S . . . . . . . S . . . . . . .
total: 196
of which are possible ('1'): 27
of which 'the other is a boy': 13
(all the ones from the upper left table)
of which 'the other child is born on a tuesday': 3
(the T/T-cell of each table)Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#79Here's the thing: nobody needs to see how you obtained your answer, we're all smart enough to enumerate things, so don't bother; similarly, leave out the equations, they're simple enough, and that's not where anyone falls over. If you want to argue productively about this type of problem, you need to explain why you enumerate the possibilities the way you do, not how.
And actually, I think the article goes through this problem pretty well, as mentioned there it hinges on two questions:
1) In this "random sampling", was "girl" a possible answer? Or did we restrict the sample pool to only people with boys, and only let them reveal that they had a boy?
2) Similarly, was any day other than "Tuesday" a possible answer?
Once people agree what the "obvious" answers to these questions are, disagreements tend to evaporate very quickly, and the enumerations/equations solve themselves. Unfortunately these assumptions are almost never spelled out in the problem, which is why these damn problems keep confusing people...
Re: Think you understand Monty Hall? Try the Tuesday boy problem.
#80I've been thinking about this for an hour, and I'm now convinced that the author is wrong. The fact that we found out about one of the children from the father means that all probabilities are not equal, even though they're treated here like they are. The difference is between the information being offered, and determined independantly. I'll do this with the boy/girl problem, for simplicities sake. If we ask a man if…
You're making the exact mistake the author is cautioning against, which is assuming the day doesn't matter. Write out all the possibilities (see my other comment in this thread), eliminate the dupe, and you get 13/27.
But the fact that the father voluntarily offered up the information changes the probability distribution. We can assume he's selecting one of his children at random, and revealing their birthday and gender.
If only one of his children is a male/Tuesday, there's a 50% chance he'll say male/Tuesday.
If both are, there's a 100% chance.
So I'm not counting the possibility twice; I'm saying that given that the father reveals male/Tuesday, it's disproportionately likely that's as a result of having two male children born on a Tuesday compared to any other possibility.