Bayes theorem and conditional probability example.

507 views

Greetings to all.
I started an MSc that includes a course in statistics. Full disclosure: my bachelor’s had no courses of statics and it is in biology.

So, the professor was trying to explain the Bayes theorem and conditional probability through the following example.
“A friend of yours invites you over. He says he has 2 children. When you go over, a child opens the door for you and it is a boy. What is the probability that the other child is a boy as well.”

The math say the probability the other child is a boy is increased the moment we learn that one of the kids is a boy. Which i cannot wrap my head around, assuming that each birth is a separate event (the fact that a boy was born does not affect the result of the other birth), and the result of each birth can be a boy or a girl with 50/50 chance.
I get that “math says so” but… Could someone please explain? thank you

In: 77

24 Answers

Anonymous 0 Comments

Here’s the way I see it.

For notation purposes, the child listed first is the one who opens the door, and the child listed second is the one who doesn’t. In the case where any child answers the door, the possible cases are as follows. In the cases where both children are the same gender, 1 denotes the older child, and 2 denotes the younger child.

1. B1B2

2. B2B1

3. BG

4. GB

5. G1G2

6. G2G1

Then, after knowing the given information that a boy opens the door, cases 4-6 are no longer considered. This leaves cases 1-3.

Among cases 1-3, two of them involve a boy, and only one of them involves a girl. Therefore, the chance that the parent has two boys given that a boy opens the door is **2/3**.

Since the question your professor asked is what the probability is that the unseen child is a boy *as well*, the “as well” part makes the probability that is being asked already take into account the given information. The 50% answer would only be true if the question didn’t specifically include “as well”; in that case, you’d indeed not care about the gender of the child who opened the door at all.

Let me know which part of this breaks down.

Anonymous 0 Comments

There are eight possibilities for the combination of sex and which child opens door. A male child opening the door eliminates half the possibilities.

C1 M C2 M, C1 answers door.
C1 M C2 M, C2 answers door.
~~C1 F C2 M, C1 answers door.~~
C1 F C2 M, C2 answers door.
C1 M C2 F, C1 answers door.
~~C1 M C2 F, C2 answers door.~~
~~C1 F C2 F, C1 answers door.
C1 F C2 F, C2 answers door.~~

So the remaining child is still female half the time.

Anonymous 0 Comments

In the ‘boy or girl’ problem (where you imagine 2 child familes with either daughters or sons), you get some information about one child, and then try to work out the probability of the other child’s gender.

An important thing here is that it is very very important *how* you come about the information.

For instance, if you poll 2-child families and ask “Do you have a son named Bob?”, and get a ‘yes’, you might calculate a different probability than if you get into a conversation with them and they happen to mention their son Bob. (I forget if that precise difference in circumstance changes our probability calculation, but that *sort* of nuanced and subtle change can matter.)

Thinking about your example, the exact way in which you learn they have at least 1 boy matters.

Maybe you show up to their house and see that a son opens the door. (Which is the scenario your professor said.)

But note that if they fill out a survey that asks “Do you have 1 or more sons? Y / N” and answer Y; or if they mentioned before you visit “My son Bob loves football and was born on a Sunday.” then that might change the probability you should guess for their other child.

I think in the wording you phrased, assuming that either child could have opened the door with equal probability, the professor made a mistake. The other kid has a 50-50 chance of people a boy or girl.

The answer might not be the same if the way you gain that information is slightly different.

Here are two videos on the topic:

[https://www.youtube.com/watch?v=bDZieLmya_I&t=0s&ab_channel=ZachStar](https://www.youtube.com/watch?v=bDZieLmya_I&t=0s&ab_channel=ZachStar)

Anonymous 0 Comments

Plenty of discussion here on the specific example, but let me back up and ELI5 Bayesian thinking.

What does it mean to say something has a certain “probability”?

In one way of thinking, we would say “probability is how often event X happens if we repeated the experiment a lot of times.” This is called frequentism. It looks at the situation independent of other information.

In another way of thinking, the probability of something is “based on everything I already know, and this new data, how likely is event X to happen?” That’s Bayesian thinking.

It’s not always intuitive. But most of us are Bayesian if we are honest—and that’s not bad. If I were to say, “How likely is it that Joanna is a firefighter?”, a frequentist might say “0.04%” by dividing the total number of firefighters by total number of adults in the US. But a Bayesian might say “0.0002%”. Why? Because the Bayesian uses their prior knowledge, which is that “Joanna” is usually a girls name and 96% of firefighters are male. In other words, the frequentist uses only the data on hand. The Bayesian combines the data on hand with prior knowledge.

Now, there are some potential problems with the professors version (or your memory of it), as others have said. But what he is trying to show is that revealing a bit of info should change the probability you expect for the coming events.