I was about to reply to you with a comment that started with “oh shit you’re right!” But as I wrote it I started rethinking and I’m not sure now.
Because I actually don’t think it matters whether we’re BB1 or BB2. They’re both only one generation of the four possible initial states. Which child opens the door is determined after the determination of which child is which gender. Basically, given that they have two boys, we’re guaranteed to see a boy, so you shouldn’t count it twice.
Still, I’m now no where near as confident in my answer as I was a moment ago. I might actually go and write the code to perform the experiment as I outlined in an earlier comment (let me know if you think that methodology is flawed/biased, and how you think it should be changed) to see what happens.
That’s a great idea let me know how it turns out. If you randomly pick the genders and randomly pick who opens the door, I think it will be 50-50. With these kinds of things they can get pretty tricky. Just because an explanation seems to make sense doesn’t mean it’s right so I’m curious!
I put it together. Here’s the code I wrote in Python.
import random
genders = ['boy', 'girl']
defrun():
other_child_girls = 0for i inrange(10000):
other_child = get_other_child()
if other_child == 'girl':
other_child_girls += 1print(other_child_girls)
defget_other_child():
children = random.choices(genders, k=2)
first_child_index = random.randint(0, 1)
first_child = children[first_child_index]
if first_child == 'boy':
other_child_index = (first_child_index + 1) % 2return children[other_child_index]
# Recursively repeat this call until the child at the door is a boy# (i.e., discard any cases where the child at the door is a girl)return get_other_child()
if __name__ == '__main__':
run()
And it turns out you were right. I ran it a few times and got answers ranging from 4942 to 5087, i.e., clustered around 50%.
I was about to reply to you with a comment that started with “oh shit you’re right!” But as I wrote it I started rethinking and I’m not sure now.
Because I actually don’t think it matters whether we’re BB1 or BB2. They’re both only one generation of the four possible initial states. Which child opens the door is determined after the determination of which child is which gender. Basically, given that they have two boys, we’re guaranteed to see a boy, so you shouldn’t count it twice.
Still, I’m now no where near as confident in my answer as I was a moment ago. I might actually go and write the code to perform the experiment as I outlined in an earlier comment (let me know if you think that methodology is flawed/biased, and how you think it should be changed) to see what happens.
That’s a great idea let me know how it turns out. If you randomly pick the genders and randomly pick who opens the door, I think it will be 50-50. With these kinds of things they can get pretty tricky. Just because an explanation seems to make sense doesn’t mean it’s right so I’m curious!
I put it together. Here’s the code I wrote in Python.
import random genders = ['boy', 'girl'] def run(): other_child_girls = 0 for i in range(10000): other_child = get_other_child() if other_child == 'girl': other_child_girls += 1 print(other_child_girls) def get_other_child(): children = random.choices(genders, k=2) first_child_index = random.randint(0, 1) first_child = children[first_child_index] if first_child == 'boy': other_child_index = (first_child_index + 1) % 2 return children[other_child_index] # Recursively repeat this call until the child at the door is a boy # (i.e., discard any cases where the child at the door is a girl) return get_other_child() if __name__ == '__main__': run()
And it turns out you were right. I ran it a few times and got answers ranging from 4942 to 5087, i.e., clustered around 50%.