this post was submitted on 03 Dec 2023
404 points (99.5% liked)

196

16087 readers
1787 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 129 points 8 months ago (1 children)

watches the people with basic math skills fight to the death over the answer

[–] starman2112 46 points 8 months ago* (last edited 8 months ago) (8 children)

If you really wanna see a bloodbath, watch this:

You know that a couple has two children. You go to the couple's house and one of their children, a young boy, opens the door. What is the probability that the couple's other child is a girl?

[–] [email protected] 45 points 8 months ago (1 children)

50%, since the coins are independent, right?

[–] starman2112 9 points 8 months ago* (last edited 8 months ago) (4 children)

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%

[–] [email protected] 50 points 8 months ago* (last edited 8 months ago) (3 children)

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.

[–] [email protected] 9 points 8 months ago (2 children)

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.

[–] [email protected] 11 points 8 months ago (1 children)

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!

[–] [email protected] 16 points 8 months ago (2 children)

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

[–] [email protected] 11 points 8 months ago

That's cool. Always nice to see a practical example of theory. Thanks to you I got to brush up on my Python too! I think it all makes sense. Everything is random, you exclude examples where s girl comes to the door. The odds are 50-50. Looks like you were right in the end though, this DID stir quite a bit of conversation lol!

[–] starman2112 3 points 8 months ago* (last edited 8 months ago) (1 children)

There've been a lot of times when I simply didn't believe something in statistics until I simulated it. Like this problem:

I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?

I wanted to simulate that because the answer seems absurd. 13/27? Where does that even come from? I'm scared of snakes, so I use Baby's First Programming Language: Tasker.

  1. Variable randomize %sex Min:1 Max:2

  2. Variable randomize %day Min:1 Max:7

  3. Variable set %child1 "%sex%day"

  4. Variable randomize %sex Min:1 Max:2

  5. Variable randomize %day Min:1 Max:7

  6. Variable set %child2 "%sex%day"

  7. Goto 1 IF %child1 != 11 AND %child2 != 11

Now I've generated two random children, at least one of which is 11–a specific sex born on a specific day.

  1. Variable add %BoyGirl IF %child1 = 2* OR %child2 = 2*

  2. Variable add %BoyBoy IF %child1 = 1* AND %child2 = 1*

If either child is a girl, it adds one to the BG bucket. If neither one is a girl, it adds one to the BB bucket.

  1. Variable add %Counter

  2. Goto 1 IF %Counter > 1,000

Hit play and yep, about 48% of families were BB. But remove the Tuesday part and just simulate the question "I have two children, and at least one of them is a boy," and it drops down to 33% again. I don't understand it, but apparently the math maths.

[–] [email protected] 5 points 8 months ago (1 children)

the math maths

Ha. As someone from the "mathematics is shortened to maths" part of the world, this sounds weird to me. I'd probably say "the maths mathses". I just thought you might enjoy that.

Anyway, I Googled the problem you presented, and came across this excellent answer:

There are even trickier aspects to this question. For example, what is the strategy of the guy telling you about his family? If he always mentions a boy first and not a daughter, we get one probability; if he talks about the sex of the first born child, we get a different probability. Your calculation makes a choice in this issue - you choose the version of "if the father has a boy and a girl, he'll mention the boy".

What I'm aiming to is this: the question is not well-defined mathematically. It has several possible interpretations, and as such the "problem" here is indeed of the language; or more correctly, the fact that a simple statement in English does not convey enough information to specify the precise model for the problem.

The whole answer is worth reading, but that part there is the crux of it. It goes back to one of my earliest comments on this topic in this thread. The problem isn't that maths is weird, it's that language's ability to describe mathematical problems is lacking. There are so many different ways to translate the described problem into mathematical formulae and they necessarily carry assumptions. Even far more subtle assumptions than I at first thought.

[–] [email protected] 3 points 8 months ago (1 children)

I know this wasn’t the main point of your comment, but to be grammatically correct, it would be “the maths math.”

Plural verbs go with their plural noun subject and don’t need the s:

  • This book belongs on the shelf.
  • These books belong on the shelf.

And like you said, maths being short for mathematics means it’s plural.

[–] [email protected] 4 points 8 months ago

Since using "maths" as a verb is very much nonstandard, I would argue against trying to apply any rigorous rules to it. It's about the vibes of the thing.

[–] [email protected] 4 points 8 months ago

And this interaction is why lemmy (and others) is superior. No “fuck you, you’re wrong” just “well I think it’s this” followed by “okay, let me try that” 10/10

[–] starman2112 3 points 8 months ago

Yes! They responded to my comment before the edit, where I gave the coin example: "I flipped two coins, at least one of them was heads. What is the probability that both of them are heads?"

Before I read their reply, I edited it to the more confusing and infuriating two kids example. It's annoying because it seems like it should be the same as saying "I have two children, and at least one is a boy. What is the probability that I have two boys?" In both the coin case and this one, the answer is 1/3, but when one child answers the door, it's like sliding one quarter out from behind my hand. Now you know a particular (child, coin)'s (sex, face), and the answer is 50% again.

load more comments (1 replies)
[–] [email protected] 5 points 8 months ago (1 children)

You assume that the probability of TH = HT = HH

When In fact, the probabilities are as follows:

P(HT)+P(TH) = 50% P(HH) = 50%

For all the probabilities being equal, you'd have to consider 4 cases:

HT, TH, HH (1) and HH (2).

The difference between HH (1) and HH (2) is which one you were told that was heads.

Then P(HH) = P(HH (1)) + P(HH (2)) = 2/4 = 50%

[–] starman2112 2 points 8 months ago (7 children)

The issue is that you weren't told a particular one was heads, only that at least one was heads. If I flipped a nickel and a dime, then the four possibilities are NtDt, NtDh, NhDt, and NhDh. If I say that at least one of them is heads but don't tell you which one, then there are three possibilities: I flipped NhDt, NtDh, or NhDh. It's only when I tell you that the nickel landed on heads that it collapses to NhDt and NhDh.

Sorry if the acronyms are hard to read, they're much faster than typing something like "Heads (nickel) tails (dime)"

load more comments (6 replies)
[–] [email protected] 3 points 8 months ago (2 children)

You’ve also ruled out TH by knowing one is heads. So the only possibilities are HT and HH. Is that not 50/50?

[–] [email protected] 3 points 8 months ago

it depends on how you know this information. did you look at one of the coins? then it's 50/50. did you ask a friend to look and yell you whether at least one of them is heads? then it's 2/3.

[–] starman2112 3 points 8 months ago (1 children)

At least one is heads, but unless you know which one it is, you haven't ruled out HT or TH

[–] [email protected] 7 points 8 months ago* (last edited 8 months ago)

But you do know which one it is, because you said "other child". As soon as you ask the question, you assign a specific outcome to a specific child eliminating HH and HT (or in the new example, BB and BG). "What are the odds they have a female child" and "what are the odds the other child is female" are not the same question.

[–] [email protected] 1 points 5 months ago* (last edited 5 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.

[–] [email protected] 15 points 8 months ago (6 children)

This is basically Monty Hall right? The other child is a girl with 2/3 probability, because the first one being a boy eliminates the case where both children are girls, leaving three total cases, in two of which the other child is a girl (BG, GB, BB).

[–] [email protected] 28 points 8 months ago (1 children)

Actually, it's a Monty Hall problem because a door is opened.

[–] [email protected] 7 points 8 months ago (1 children)

Unironically, yes. A door is opened, and the opening of that door reveals information about the problem and eliminates some possible world-states.

[–] [email protected] 23 points 8 months ago* (last edited 8 months ago) (1 children)

It doesn't, though. The Monty Hall problem utilizes the fact that there were more possibilities before one was eliminated AND that it cannot eliminate the "best" outcome. No such qualities are at play here.

The question being asked here is "what is the gender of the second child?" The gender of the first child is completely irrelevent. Observed or unobserved, door open or closed, it doesn't impact the outcome of the second child.

I suspect it's not the question OP intended to ask, but it's the question they asked nonetheless.

[–] [email protected] 2 points 8 months ago (5 children)

The Monty Hall problem utilizes the fact that there were more possibilities before one was eliminated

So does this problem. There was the GG possibility.

AND that it cannot eliminate the "best" outcome.

True, this problem doesn't have that element.

The question being asked here is "what is the gender of the second child?" The gender of the first child is completely irrelevent. Observed or unobserved, door open or closed, it doesn't impact the outcome of the second child.

I don't agree. First, I'd say your use of the term "second child" is ambiguous, because normally that would mean "the younger of two children", which obviously isn't what's meant here. What you mean to say here is "the child that we have not already seen". It's in that rephrasing that it becomes obvious that having observed the first child matters, because there cannot be a second until there has been a first. And it's in that observation that the outcome is altered.

If we haven't seen the first child and are asked "what will be the gender of the second child to walk through the door?" we would have to answer 50/50. But having seen one child, we eliminate one of four possibilities of gender pairs (BB, BG, GB, GG). This we are left with 3 equally possible cases, 2 of which will be the opposite of the gender of the child we saw first.

Of course, we could easily simulate this experiment to arrive at an empirical answer. Randomly generate 2 genders, randomly select one of those. If they're a girl, end the experiment and move to another iteration (because they didn't fit the parameters). If a boy, record the gender of the other child. Repeat a few dozen times and see how many times the second child was a girl.

[–] [email protected] 16 points 8 months ago* (last edited 8 months ago)

Well, I guess OPs point is demonstrated. People will in fact argue about it.

What you're trying to present has multiple holes, but only one matters: you're not paying attention to the question that's being asked. You can say first, second, alpha, beta, Leslie, whatever you want to assign the child in question as, but the question only asks you the gender of a singular child. The door opening child doesn't matter, because it isn't part of the question. No one asked what gender that child is. No one asked what the odds they have a female child is. It just isn't a part of the question.

Yes, I referred to it as the second child because the question that was asked happens to have a child in it and ask you about another. Because we're communicating in a hilariously precise language, we have to say "the other child". But that doesn't make the door opening child a part of the equation. The question could be "there is a child in a box. What are the odds the child is female? Oh, it has a brother by the way." Cool, who cares, the sibling wasn't a part of the question.

The Monty Hall problem spreads multiple outcomes across multiple choices and then eliminates one. The outcomes and options have a relation. This question just asks you about a singular variable with two possible outcomes and throws around an unrelated red herring.

load more comments (4 replies)
[–] starman2112 8 points 8 months ago (2 children)

It's somewhat ambiguous!

On the one hand, you might be right. This could be akin to flipping two coins and saying that at least one is heads. You've only eliminated GG, so BG, GB, and BB are all possible, so there's only a 1/3 chance that both children are boys.

On the other hand, you could say this is akin to flipping two coins and saying that the one on the left (or the one who opened the door) is heads. In that case, you haven't just ruled out GG, you've ruled out GB. Conditional probability is witchcraft

[–] [email protected] 3 points 8 months ago

Assuming the chance of either sex is equal, this problem can be broken down into multiple cases. The first is that there are two unseen kids in the house. What's the probability they are both boys? 1/4. Now the door opens and you see two boys. The probability both are boys is 1/1. But if you only see one boy, the problem simplifies into the probability of a child being a boy. One of the probabilistic events postulated in the original problem is fixed at 1. So the answer is 1/2.

Think of it as the two coin flip, except one coin has two heads. That simplifies to a one coin flip.

[–] [email protected] 3 points 8 months ago

I don't think the problem is conditional probability, it's translating word problems to maths problems.

If you make the assumptions I made, the maths is unambiguous. Namely, I assumed that a child has a 50/50 probability of being born a boy or a girl. I assumed the child who opens the door is random. I don't think I made any other assumptions that could have been made any other way. With those assumptions, I'm pretty confident my answer is the only correct one, though I'd love to see an argument otherwise.

If the probability of a child being a girl is different, say, 52%, that will affect the result.

More interestingly, if the probability of which child opens the door is different, that will affect the result. If there's a 100% chance the elder child opens the door, it goes to 50/50 of the gender of the second child. This makes it like the "coin on the left" example you gave.

If we said the elder child is going to open the door 75% of the time…well, the maths becomes more complicated than I can be bothered with right now. But it's an interesting scenario!

[–] [email protected] 6 points 8 months ago

No, because knowing the first child is a boy doesn't tell you any information about the second child.

Three doors, Girl Girl Boy

You select a door and Monty opens a door to show a Girl. You had higher odds of picking a girl door to start (2/3). So switching gives you better odds at changing to the door with the Boy because you probably picked a Girl door.

Here the child being a boy doesn't matter and the other child can be either.

It's 50/50 assuming genders are 50/50.

[–] [email protected] 5 points 8 months ago (1 children)

Well not really, right? BG and GB are the same scenario here, so it’s a 50/50 chance.

Even if, say, the eldest child always opened the door, it’d still be a 50/50 chance, as the eldest child being a boy eliminates the possibility of GB, leaving either BG or BB.

[–] [email protected] 4 points 8 months ago (3 children)

Ironically you've got the right answer, but (as you can see in some of the other conversation here) not necessarily for the right reason. It's not necessarily that BG and GB are the same, but that BB and BB are two different scenarios worthy of being counted separately.

load more comments (3 replies)
load more comments (2 replies)
[–] mindbleach 12 points 8 months ago (1 children)

Cheeky bastard.

It is 50-50, though. The remaining possible states are BG and BB. Both are equally likely. Any further inference is narrative... not statistics.

The classic example of this is flipping 100 coins. If you get heads 99 times in a row... the last coin is still 50-50. Yes, it is obscenely unlikely to get heads 100 times in a row. But it's already obscenely unlikely to get heads 99 times in a row. And it is obscenely unlikely to alternate perfectly between heads and tails. And it is obscenely unlikely to get a binary pattern spelling out the alphabet. And it is obscenely unlikely to get... literally any pattern.

Every pattern is equally unlikely, with a fair coin. We see 99 heads in a row versus 1 tails at the end, and think it narrowly averted the least-probable outcome. But only because we lump together all sequences with exactly one tails. That's one hundred different patterns. 1-99 is not the same as 99-1. We just treat them the same because we fixate on uniformity.

Compare a non-binary choice: a ten-sided die. Thirty 1s in a row is about as unlikely as 100 heads in a row. But 1 1 1... 2 is the same as 1 1 1... 3. Getting the first 29 is pretty damn unlikely. One chance in a hundred million trillion. But the final die can land on any number 1-10. Nine of them upset the pattern our ape brains want. Wanting it doesn't make it any more likely. Or any less likely.

It would be identically unlikely for a 10-sided die to count from 1 to 10, three times in a row. All the faces appear equally. But swap any two events and suddenly it doesn't count. No pun intended.

If this couple had eight children, for some god-forsaken reason, and you saw seven boys, the eighth kid being another boy is not less likely for it. The possibility space has already been reduced to two possibilities out of... well nine, I suppose, if order doesn't matter. They could have 0-8 boys. They have at least 7. The only field that says the last kid's not a coin toss is genetics, and they say this guy's chromosome game is strong.

[–] starman2112 6 points 8 months ago* (last edited 8 months ago)

You're right, but it's not a subversion of the Gambler's Fallacy, it's a subversion of conditional probability. A classic example is that I have two kids, and at least one of them is a boy. What is the probability that I have two boys?

The intuitive answer is 50%, because one kid's sex doesn't affect the other. But when I told you that I have two kids, there were four possibilities: GG, GB, BG, or BB. When I told you that at least one of them is a boy, all I did was take away the GG option. That means there's only a 1 in 3 chance that I have two boys.

But by having one child answer the door, I change it yet again–now we know the sex of a particular child. We know that the child who opened the door is a boy. This is now akin to saying "I have two children, and the eldest is a boy. What is the possibility that I have two boys?" It's a sneaky nerd snipe, because it targets specifically people who know enough about statistics to know what conditional probability is. It's also a dangerous nerd snipe, because it's entirely possible that my reasoning is wrong!

[–] [email protected] 7 points 8 months ago (1 children)

i hate it when ppl do nb erasure for their stupid math text problems. use anything else pls

[–] [email protected] 1 points 8 months ago

What's the probability of the other kid being non-binary?

[–] [email protected] 4 points 8 months ago

And don't forget that there's always a slim chance that no matter the gender, the other child is GOAT.

[–] starman2112 2 points 8 months ago

Two more for funsies! I flipped two coins. At least one of them landed on heads. What is the probability that both landed on heads? (Note: this is what my comment originally said before I edited it)

I have two children. At least one of them is a boy born on a Tuesday. What is the probability that I have two boys?

load more comments (1 replies)