Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

Orginal text from forum reads:

"Ok, so Teanchi and Beanchi are a married couple (dont ask me whose he and whose she)!

They have two kids, one of them is a girl, what is the probability that the other kid is also a girl.

Assume safely that the probability of each gender is 1/2.

Of course its not 1/2 else would make it a lousy puzzle..."

and then given and accepted answer in the puzzle is this:

Ans: 1/3

This is a famous question in understanding conditional probability, which simply means that given some information you might be able to get a better estimate.

The following are possible combinations of two children that form a sample space in any earthly family:

Girl - Girl

Girl - Boy

Boy - Girl

Boy - Boy

Since we know one of the children is a girl, we will drop the Boy-Boy possibility from the sample space.

This leaves only three possibilities, one of which is two girls. Hence the probability is 1/3

Now my question is, is this solution correct?

So this is what I think, please correct me if I'm wrong because this one really puzzled me, even though it seems so simple.

I think the answer is 1/2 still. Now before you guys all get mad, see my logic:

Now we know one of the children is a girl. And as previously stated, the only possibilities are:

GG

GB

BG

BB.

Now the original poster of the question said since we know one is a girl, so then that eliminates the BB out of the sample space. So since only 1 of the remaining 3 has a girl, so then that means the answer is 1/3. I DISAGREE with this logic.

So here's my logic:

Knowing that one of the children is a girl, there's 2 possible scenarios:

Scenario 1. The given girl is the elder child.

Scenario 2. The given girl is the younger child.

Now assuming that both these possibilities are equal (i.e. 50%). Then we have the following.

Scenario 1: probability that the remaining child is a girl is 50% (because we have {GG and GB})

Scenario 2: probability that the remaining child is a girl is 50% (because we have {GG and BG})

Thus total probability should be 0.5 * 0.5 + 0.5 * 0.5 = 0.5 = 50% (i.e. 0.5 * scenario 1 + 0.5 * scenario 2)

Is my logic correct? Please elaborate. :)

Link to comment
Share on other sites

Recommended Posts

  • 0

But this is assuming the question is implying the girl does not need to have been born first.

Yes, I am assuming order doesn't matter because the question states both kids are already born. The fact that one is a girl just means that out of the two, one is a girl.

Link to comment
Share on other sites

  • 0

My last post(#15) was awkward and ill-worded. Here's a better one:

Suppose many two-child households each filled out a questionnaire truthfully.

The questionnaire contained two questions: "Do you have a daughter?" and

"Do you have a son?". If you take all of the questionnaires with a yes

answer to "Do you have a daughter?", what portion of these would have a

no answer to "Do you have a son?" (this is the same as saying that

both are daughters)?

To simulate this, just use two tosses of a fair fair coin to decide the

genders of the two children. Use this to fill out each questionnaire.

If you then take those with a yes answer to "Do you have a daughter?",

you will find that 1/3 of those have a no answer to "Do you have a son?".

Try it!

I just did it quickly for 12 questionnaires and I got 10 with a yes to

"Do you have a daughter?". Of these 10, 4 (that's 4/10 = .4) had a no

answer to"Do you have a son?". The more questionnaires you do, the closer

this gets to 1/3.

Link to comment
Share on other sites

  • 0

My last post(#15) was awkward and ill-worded. Here's a better one:

Suppose many two-child households each filled out a questionnaire truthfully.

The questionnaire contained two questions: "Do you have a daughter?" and

"Do you have a son?". If you take all of the questionnaires with a yes

answer to "Do you have a daughter?", what portion of these would have a

no answer to "Do you have a son?" (this is the same as saying that

both are daughters)?

To simulate this, just use two tosses of a fair fair coin to decide the

genders of the two children. Use this to fill out each questionnaire.

If you then take those with a yes answer to "Do you have a daughter?",

you will find that 1/3 of those have a no answer to "Do you have a son?".

Try it!

I just did it quickly for 12 questionnaires and I got 10 with a yes to

"Do you have a daughter?". Of these 10, 4 (that's 4/10 = .4) had a no

answer to"Do you have a son?". The more questionnaires you do, the closer

this gets to 1/3.

Hmmm I'm gonna write a quick java program and test this quick, but yeah, when you think about it that way, does seem to be a third :)

BUT I STILL LIKE 1/2 AS AN ANSWER!!! FOOK YOU ALLLLL :P

Link to comment
Share on other sites

  • 0

i seem to be getting 1/2.


import random

count1 = 0

count2 = 0

for i in range(0,100000):

   value1 = random.randint(0,1)

   if value1 == 1: #if they answer yes to "do you have a daughter" (if they answer no to this then we dont consider it.)

      count1 += 1

      value2 = random.randint(0,1) 

      if value2 == 0: #if they answer no to "do you have a son"

         count2 += 1


print(count2/count1)

gives me .4996. it's all in how you interpret it. of course, if i wrote the program...

for i in range(0,100000):

   value1 = random.randint(0,1)

   value2 = random.randint(0,1)

   if value1 == 1:

      count1 += 1

      if value2 == 0:

         count2 += 1

then it would be 1/3.

Link to comment
Share on other sites

  • 0

i seem to be getting 1/2.


import random
count1 = 0
count2 = 0
for i in range(0,100000):
value1 = random.randint(0,1)
if value1 == 1: #if they answer yes to "do you have a daughter" (if they answer no to this then we dont consider it.)
count1 += 1
value2 = random.randint(0,1)
if value2 == 0: #if they answer no to "do you have a son"
count2 += 1

print(count2/count1)
[/code] gives me .4996. it's all in how you interpret it. of course, if i wrote the program...
[code]
for i in range(0,100000):
value1 = random.randint(0,1)
value2 = random.randint(0,1)
if value1 == 1:
count1 += 1
if value2 == 0:
count2 += 1

then it would be 1/3.

No, you don't flip the coins to answer the questions -- you flip them to decide

the genders of both children. Then, and only then, do you fill out the

questionnaires. In reality, the children would already exist before you got

the questionnaire, so you have to decide about both children first in order

to accurately simulate the situation.

Link to comment
Share on other sites

  • 0

but again, if i do...


import random

total1girl = 0

total2girl = 0

child = [-1]*2

for i in range(0,100000):

  for j in range(0,2):

     child[j] = random.randint(0,1)

  if child[0] == 1 or child[1] == 1: #if either the first or second child is a girl

     total1girl += 1

     if child[0] == 1 and child[1] == 1: #if both childern are girls

        total2girl += 1


print(total2girl/total1girl)

then i of course will get 1/3. if however i do...

for i in range(0,100000):

  for j in range(0,2):

     child[j] = random.randint(0,1)

  if child[0] == 1: #if the first child is a girl.

     total1girl += 1

     if child[1] == 0: #if the second child is a girl.

        total2girl += 1

then its 50/50.

Edited by phillip1882
Link to comment
Share on other sites

  • 0

but again, if i do...


import random
total1girl = 0
total2girl = 0
child = [-1]*2
for i in range(0,100000):
for j in range(0,2):
child[j] = random.randint(0,1)
if child[0] == 1 or child[1] == 1: #if either the first or second child is a girl
total1girl += 1
if child[0] == 1 and child[1] == 1: #if both childern are girls
total2girl += 1

print(total2girl/total1girl)
[/code] then i of course will get 1/3. if however i do...
[code]
for i in range(0,100000):
for j in range(0,2):
child[j] = random.randint(0,1)
if child[0] == 1: #if the first child is a girl.
total1girl += 1
if child[1] == 0: #if the second child is a girl.
total2girl += 1

then its 50/50.

You're still cutting corners. Simulations should carry out every step of

the process as closely as possible. In this case, flip the coins to make 2

kids, then answer the two questions "Do you have a daughter?" and "Do you

have a son?" and make a large bunch of questionnaires this way. Then, take

the questionnaires that have a "yes" answer to "Do you have a daughter?" and

count the proportion of them with a "no" answer to "Do you have a son?".

That second program seems to make distinctions (first child -- second child)

which the questionnaire doesn't address at all. To be REALLY convincing,

a simulation must carry out every step of what it is trying to simulate.

Every programming shortcut must be avoided. So, I don't think even the first

program qualifies as a good simulation of the questionnaire scenario.

Link to comment
Share on other sites

  • 0

My 2 cents worth:

I wrote these in AutoHotKey to try and give my 2 teenage children (both girls!) an idea of how a computer program works. To prove a point I included a breakdown of no. of boys from the same sample.

The first is easier to read and understand (I hope), the second is about 25% faster. I apologise if the ;comments are a bit obvious/patronising


#NoEnv

SendMode Input

;set counters to 0

atleastonegirl = 0, botharegirls = 0, atleastoneboy = 0, bothareboys = 0		

loop 10000000

  {

    random, child1, 0, 1               	;  randomly assign 1 (girl) or 0 (boy) to child1 

    random, child2, 0, 1               	;  likewise child2

    if (child1 or child2 )             	;  if either are girls

      {

        atleastonegirl ++                  ;  add one to counter

        if (child1 and child2)         	;  if both are girls

       	botharegirls ++             	;  add one to counter

      } 

    if (!child1 or !child2)                ;  if either are boys

      {

        atleastoneboy ++               	;  add one to counter

        if (!child1 and !child2)       	;  if both are boys

       	bothareboys ++                  ;  add one to counter      

      }

  }

girlpercent := botharegirls / atleastonegirl * 100 

boypercent := bothareboys / atleastoneboy * 100


;  Write to file 

FILEAPPEND, 10000000 - sample of 2 children families`n %atleastonegirl% - no. who have at least one girl. `n %botharegirls% - no. who have both girls`n`n %girlpercent% percent  `n`n`n%A_SPACE%, %A_MYDOCUMENTS%\famsample.txt

;

FILEAPPEND, %atleastoneboy% - no. who have at least one boy. `n %bothareboys% - no. who have both boys`n`n %boypercent% percent `n, %A_MYDOCUMENTS%\famsample.txt 

msgbox Done

result: 10000000 - sample of 2 children families 7500583 - no. who have at least one girl. 2501412 - no. who have both girls 33.349568 percent 7498588 - no. who have at least one boy. 2499417 - no. who have both boys 33.331835 percent

#NoEnv

SendMode Input

;set counters to 0

atleastonegirl = 0, botharegirls = 0, atleastoneboy = 0, bothareboys = 0		

loop 10000000

  {

    random, child1, 0, 1               	;  randomly assign 1 (girl) or 0 (boy) to child1 

    random, child2, 0, 1               	;  likewise child2

    if (child1 or child2)                  ;  if either are girls

      {

        atleastonegirl ++                  ;  add one to counter

        if (child1 and child2)         	;  if both are girls

       	botharegirls ++             	;  add one to counter

        else 

       	atleastoneboy ++                ;  if one is a girl but not both, then one is a boy 

      } 

    else            

      {

        bothareboys ++                 	; if neither are girls, both are boys

        atleastoneboy ++               	; and at least one is, too!

      }

  }

girlpercent := botharegirls / atleastonegirl * 100 

boypercent := bothareboys / atleastoneboy * 100


;  Write to file 

FILEAPPEND, 10000000 - sample of 2 children families`n %atleastonegirl% - no. who have at least one girl. `n %botharegirls% - no. who have both girls`n`n %girlpercent% percent  `n`n`n%A_SPACE%, %A_MYDOCUMENTS%\famsample.txt

;

FILEAPPEND, %atleastoneboy% - no. who have at least one boy. `n %bothareboys% - no. who have both boys`n`n %boypercent% percent `n, %A_MYDOCUMENTS%\famsample.txt 

msgbox Done

result:

10000000 - sample of 2 children families

7500527 - no. who have at least one girl.

2500002 - no. who have both girls

33.331018 percent

7499998 - no. who have at least one boy.

2499473 - no. who have both boys

33.326316 percent

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...