• starman2112@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    7 months ago

    Oops, I changed it to a more unintuitive one right after you replied! In my original comment, I said “you flip two coins, and you only know that at least one of them landed on heads. What is the probability that both landed on heads?”

    And… No! Conditional probability strikes again! When you flipped those coins, the four possible outcomes were TT, TH, HT, HH

    When you found out that at least one coin landed on heads, all you did was rule out TT. Now the possibilities are HT, TH, and HH. There’s actually only a 1/3 chance that both are heads! If I had specified that one particular coin landed on heads, then it would be 50%

    • Hacksaw@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      7 months ago

      No. It’s still 50-50. Observing doesn’t change probabilities (except maybe in quantum lol). This isn’t like the Monty Hall where you make a choice.

      The problem is that you stopped your probably tree too early. There is the chance that the first kid is a boy, the chance the second kid is a boy, AND the chance that the first kid answered the door. Here is the full tree, the gender of the first kid, the gender of the second and which child opened the door, last we see if your observation (boy at the door) excludes that scenario.

      1 2 D E


      B B 1 N

      B G 1 N

      G B 1 Y

      G G 1 Y

      B B 2 N

      B G 2 Y

      G B 2 N

      G G 2 Y

      You can see that of the scenarios that are not excluded there are two where the other child is a boy and two there the other child is a girl. 50-50. Observing doesn’t affect probabilities of events because your have to include the odds that you observe what you observed.

      • Zagorath@aussie.zone
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        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.

        • Hacksaw@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          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!

          • Zagorath@aussie.zone
            link
            fedilink
            English
            arrow-up
            1
            ·
            7 months ago

            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%.

    • Floey@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      3 months ago

      This is a ridiculous argument when taken to the extreme. Say you have three bags. Bag A contains 100 blue marbles. Bag B contains 99 blue marbles and 1 red marble. Bag C contains 100 red marbles. You reach into a random bag and draw a red marble. You’ve only eliminated bag A. Would you say it is a 50-50 whether you are left with a bag now containing 99 blue marbles or 99 red marbles? No, the fact that you drew a red marble tells you something about the composition of the bag you drew from. The odds that you drew out of bag B is 1/101, the total number of red marbles in bag B divided by the total number of red marbles across all bags. The odds that you are dealing with bag C is 100x that.

      Now let’s say you have 4 bags. BB, BR, BR, and RR. You draw an R. There is a 50% chance you are dealing with bag 2 or 3 because together they contain 2 out of 4 R. There is also a 50% chance you are dealing with bag 4. So it is equally likely that you draw either color of marble if you take the remaining marble out of the bag you randomly selected despite there being twice as many BR bags as RR bags.