Flight_Cadet_SRIK's blog

By Flight_Cadet_SRIK, history, 2 years ago, In English

question link:interviewbit

Supposedly a friend of yours has 2 children and at least one of them is a boy. What is the probability that the other is also a boy?

---------------------------------------------------------------------------------------------------------------------------------------- Their explanation:Byjus

answer according to their approach is 1/3.

My approach:

le the boy child be represented as B and girl as G ,younger child as 2 and elder child as 1.

So total outcomes are:((B1,B2),(B1,G2),(G1,B2),(G1,G2)).

so the known boy can be B1 or B2.

the probability of boy being elder child and he having a brother is (B1,B2)=(1/2)*(1/2).

the the probability of boy being younger child and he having a brother is (B1,B2)=(1/2)*(1/2).

so final probability =1/4+1/4=**1/2**.

OR SIMPLY BOTH ARE INDEPENDENT EVENTS

| Write comment?
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

$$$(G_1, G_2)$$$ is not a possible outcome based on the given constraints. At least one of them is a boy.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    So total outcomes are:((B1,B2),(B1,G2),(G1,B2),(G1,G2)). format is (elder child ,younger child) the above are all possible outcomes.

    the boy whom they mentioned can be younger(B2) or elder child(B1). lets assume he is younger child he either has elder sister or elder brother so the probability is 1/2 for assuming he is younger where he can be elder also and other 1/2 for choosing (B1,B2) from ((B1,B2),(G1,B2)).**(here I didn't consider (G1,G2) anyway)

    I think that makes sense.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Now the issue is about counting $$$(B_1, B_2)$$$ twice.

»
2 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Probability problems like these tend to be extremely sensitive to the precise wording, as that affects the exact mathematical formalization of what is "the experiment" that one presumably repeats. Conditional probability ("if we know X information, what is the chance that Y") is interpreted in terms of the "experiment" that one repeats as: "we repeat the experiment lots of times, and filter all cases where X did not occur. What fraction of the remaining experiments after filtering have Y?".

This is a classical "riddle", because the solution is 1/3 but 1/2 is such an intuitive answer, but I would argue that the statement as presented is slightly misleading / could easily be phrased more explicitly to avoid misinterpretations of what exactly is "the experiment".

For example, the phrase "THE OTHER is also a boy", suggest that you have already "fixed" one of the children (that you know it is a boy). But in the first sentence, it is not globally "fixed" whether the first child is a boy, or the second is a boy, or both (we only know "AT LEAST ONE is a boy"). So when they say "THE OTHER", it is ambiguous, because in particular the case of boy-boy... Which one exactly is "the other"?

The statement can reasonably be argued to be equivalent to the slightly less misleading:

"Supposedly a friend of yours has 2 children and at least one of them is a boy. What is the probability that both children are boys?"

If when reading this updated statement, you say "wait, that statement is another problem!", then indeed it is a language issue :)

Note that the following version, where we fix a distinction between the first and second child, unambiguously has a solution of 1/2:

"Supposedly a friend of yours has 2 children, and THE FIRST ONE (the one that is older) of them is a boy. What is the probability THE SECOND ONE (the one that is younger) is also a boy?"

Basically, changing the known information from "at least one is boy" to "THE FIRST ONE" is boy restores independence, and the result "Girl — Boy" becomes disallowed, and only "Boy — Girl" and "Boy — Boy" remain.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you for taking time!!

    Supposedly a friend of yours has 2 children and at least one of them is a boy. What is the probability that the other is also a boy?

    what I wanted to convey simply I know one of my friends child is boy so now the sample space wrt genders possible for his two children is (boy ,boy) or (boy ,girl).

    so why shouldn't I come to a decision of 1/2.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Indeed if you don't care about order, boy boy and boy girl are the only possible results. But they are not equiprobable, boy boy has 1/3 and boy girl has 2/3. You should have a "proof" or a "reason" to explain why some results are equally likely, it is not true that if you have N results then each is 1/N.

      It is exactly like saying "I throw two coins. Possible results are only three: 2 coins heads, 2 coins tails, or 1 head 1 tails. So each of them has 1/3", but that would be wrong: the true probabilities are 1/4, 1/4, 1/2 respectively. You can check by throwing coins 100 times :D Similar mistake would be "I throw two dice, the sum can be from 2 to 12, so each number has 1/11 chance". Board game experience quickly shows you that is not the case.

      There is no probability "rule" that whenever you have N results, they are all equally likely. You have to think about whether that is true and why.

      There is a very useful "rule" let's say, that when you throw a fair dice or a fair coin or a fair something similar N times, each time being independent, then the list of all possible results are equally likely, when the results take the ORDER into account. That is, getting "1 4" and "4 1" on the dice must be listed as separate entries in the list, not just a single entry "a one and a four", similar to "tails — heads" vs "heads — tails". An intuitive explanation of why order matters that is often given is, imagine that you do the experiment but paint one of the coins black and the other white. That should not affect probability (physical intuition), but suddenly you can clearly distinguish "white heads black tails" vs "white tails black heads", so when you suddenly cannot distinguish the coins (because say, you quickly throw both at the same time without looking and they are not painted) you are actually "mixing" two underlying results in your now "larger" result of "one heads, one tails", so that is why it ends up appearing twice as often as, say, "heads — heads".

      "boy — girl" vs "girl — boy" is the same thing :)

»
2 years ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

Imagine you have many friends. Many, many friends. Like $$$1000$$$ friends.

Now they are very special. Each one of them has $$$2$$$ children!

You didn't count, but you assume, that they are statistically normal distributed. So you can assume, that $$$250$$$ have a young boy and an older boy, $$$250$$$ have a young boy and an older girl, etc. $$$[1]$$$

Now the unimaginable happens. All your friends feel the need to tell you about their children. And now many, many friends storm you and tell "One of my children is a boy!". Of course nobody lied. So the $$$250$$$ friends who have $$$2$$$ girls did not talk to you. They seem to be more level-headed and understand, that you can't talk with too many people.

Now out of these friends that talked to you, one of them left his children at home. And after telling you, that one of his children is a boy, he asks "Well, guess, what is the gender of my other child?"

So you think, it must be one half. $$$50\% $$$ boy, $$$50\% $$$ girl. $$$[2]$$$

Now you do a calculation. Assume each one of your friends asked you this question. Now calculate the total number of female children and male children of those friends that asked you.

Using your assumption $$$[2]$$$ there should be $$$750+(750/2)=1125$$$ Boys and $$$(750/2)=375$$$ Girls. But wait, that is wrong! Remember $$$[1]$$$! There must be $$$4\cdot250=1000$$$ boys and $$$2\cdot250=500$$$ girls. Where does this discrepancy come from?

The assumption $$$[2]$$$ was wrong in the first place. The probability for the other child being a boy is $$$1/3$$$ and being a girl is $$$2/3$$$. This reasoning can be condensed down to the case of only one friend with two children telling you "I have two children. One of them is male. What is the gender of the other one?"