Winning the lottery

Cooper and Glee,

After thinking about this I’m getting a glimmer of what I think might be the resolution to this- but maybe it’s just a poorly-thought out, caffeine-deficiency induced illusion, so feel free to cut it to shreds :slight_smile:

Seems to me the problem cannot be clearly answered because the terms don’t specify how it is that we learn the gender of the first female. If we learn it by a random process involving the total pool of females, then Cooper is right- the girl is either

1A in his chart, meaning the other child is female (25%)
1B, meaning the other child is female (25%)
3A, meaning the other child is male (25%)
4B, meaning the other child is male (25%)

resulting in a 50-50 split.

On the other hand, if we learn it by a random process involving the pool of families, then the breakdown I posted before holds

family 1, meaning the other child is female (33%)
family 2, meaning the other child is male (33%)
Family 3, meaning the other child is male (33%)

resulting in the 2 out of 3 split Glee and I had been arguing for.

Without further clarification of the terms it is impossible to determine the correct answer.

Cooper, I think you’re missing something here. I’ll see if I can explain why Cecil’s strategy works, given the assumption that none of the families you will be guessing on have two children who are both sons. (I didn’t ask for only families where the older child is a girl, if you reread my post - just families where they’re not both boys.)

I’ll generalize Cecil’s strategy out to “Guess the other child is the opposite of the gender you’re told.” If you are told one of the kids is a girl, guess that the other is a boy; if you’re told it’s a boy, guess the other is a girl. (This is the strategy that I’ll put into the code.)

Let’s give the older sibling a capital letter, and the younger sibling a lowercase letter. We have four possible combinations, as you said: Bb, Bg, Gb, Gg. We get the gender of one of the children, and must guess the other. Let’s see how our strategy works with each combination.

  1. Bb. If you’re told about B, you guess female and are wrong. If you’re told about b, you guess female and are wrong. Score: 0 of 2.

  2. Bg. If you’re told about B, you guess female and are right. If you’re told about g, you guess male and are right. Score: 2 of 2.

  3. Gb. If you’re told about G, you guess male and are right. If you’re told about b, you guess female and are right. Score: 2 of 2.

  4. Gg. If you’re told about G, you guess male and are wrong. If you’re told about g, you guess male and are wrong. Score: 0 of 2.

As you can see, two combinations (Bb and Gg) are guaranteed losers with Cecil’s strategy. Two combinations (Bg and Gb) are guaranteed winners, no matter which child you’re told about.

The ringer is that we get told that one of the kids is a daughter. That means we know Bb will not occur, and we’re left with Bg (guaranteed win), Gb (guaranteed win), and Gg (guaranteed loss). Two out of three. I don’t need to even consider your “which child do you think it is, A or B?” question. I just sit back, act contrary, and collect my chickens.

Just having skimmed the volley of replies, it appears that a mix of statistical concepts have been all thrown together here. Thus, the primary question has become convoluted. In short, we’ve got oranges and apples here!

With Monty’s doors, the sea of debate all boils down to one key concept. Are the events independent or dependent? Is the door selected initially acting as an independent event from the next set of doors? Or, does the end result indeed depend on a two-step
process (initial and secondary selection)?
One person in the initial debate with Uncle Cecil did hint at this.

Also of note, stats cannot predict the human factor of subjectivity! It sounds like we’re outguessing ourself by trying to second-guess what door Monty really wants you to pick. Statistics and psychology don’t mix! Math is objective, so just stick with the facts!

On the question on the sexes of twins, Uncle Cecil is correct although the difference is subtle. Statistics looks at ALL possible outcomes as unique events. It depends if we are talking combinations or permutations! Thus, statistically, there IS a distinction between a boy-girl or a girl-boy set of twins - although subtle. To math, it’s just a set of results. To people, we see that set of results and throw out the solution(s) which lack a practical meaning. In this case, the permutations are seen as equalivalent - but often, permutations are distinct solutions!

Recall your days in Algebra class. When a problem has an answer set of two possible solutions, often only one solution is a meaningful solution! (Didn’t your algebra teacher always preach about plugging back into the equation to prove the solution!?)
The other solution is just as valid in math, but it is simply theoretical - lacking
practical application in the real world.

One last note: If you’ve ever taken a course in statistics, probability, or reliability - the odds are it’s so confusing, no one really knows! You can bet on it! There are so many
formulas (known as “tests”) - it’s as if there are more exceptions than rules! The basic statistics to which most of us have exposure is simply the watered-down story.


I’d rather have a bottle in front of me than a frontal lobotomy - Hawkeye 4077th

Yoop you posted:

Actually, it is not necessarily guaranteed, depending on the terms under which you are first told the gender of one of the children. As I said in a previous post, since the problem did not specify how that child is selected the problem is unsolvable.

Consider your example of three families

#1- Gg
#2- Bg
#3- Gb

If the rule is pick one girl from any of the three families and identify her gender to the guesser, then the logic you (and I previously) presented is ironclad- 2 out of 3 times the other child will be a boy

However, if the rule is pick one of the four girls from the above group and identify her gender to the guesser, then Cooper is correct- half the time the other child will also be a girl.

If 1G was revealed the other child is 1g
If 1g is revealed the other child is 1G
If 2g is revealed the other child is 2B
If 3G is revealed the other child is 3b

Well, here is the program. I’ve only made the mode where it accepts AutoPlay - I can’t imagine anyone really wants to sit and press “G” or “B” 100 times. If its asked for I might do it though. The computer uses Cecil’s rules to “guess” the gender of the unknown child, if the known is a Girl, it picks boy and vice versa. As I suspected, the results hover around 50% (though I’ve seen as high as 59%, I’ve seen no where near 66% which is where it should hover if Cecil were right).

To run this program - copy and paste it into notepad. In notepad, do a file save as and type (the quotes are important) “C:\gender.bas” (or whatever filename and path you wish, so long as it has the .BAS extension and the quotes its fine). Then from the command line or the run programs box, type:

qbasic c:\gender.bas

Press F5 to run the program.

This code is very simple, hopefully anyone will be able to follow it. If anyone thinks what I have done is not relevant to the question, please explain why and suggest the necessary changes (in code if you can).

Enjoy!

DECLARE SUB ManualPlay ()
DECLARE SUB AutoPlay ()
’ Guess the Gender Game!
’ Courtesy of Cooper, for the SDMB and the interest of scientific advancement

DIM InitComplete AS INTEGER, GgCount AS INTEGER, bbcount AS INTEGER
DIM BgCount AS INTEGER, GbCount AS INTEGER, i AS INTEGER
DIM PlayResp AS STRING, NumberRight AS INTEGER
DIM SHARED array1(100) AS STRING, array2(100) AS STRING

'Initialize Families
RANDOMIZE TIMER

    FOR i = 1 TO 100
            IF RND > .5 THEN
                    array1(i) = "B"
            ELSE
                    array1(i) = "G"
            END IF

    'Children's gender determined independently, just like in real life
    'if we understood this part better, we could stop here

            IF RND > .5 THEN
                    array2(i) = "B"
            ELSE
                    array2(i) = "G"
            END IF

    NEXT i

    'Now we check our pairs to ensure they are within tolerances

    FOR i = 1 TO 100
    IF array1(i) = "B" AND array2(i) = "B" THEN bbcount = bbcount + 1
    IF array1(i) = "B" AND array2(i) = "G" THEN BgCount = BgCount + 1
    IF array1(i) = "G" AND array2(i) = "B" THEN GbCount = GbCount + 1
    IF array1(i) = "G" AND array2(i) = "G" THEN GgCount = GgCount + 1
    NEXT i

    'I'm going to print the totals at the outset, if you play in manual
    'mode you could count but then you can count anyway because you have
    'a pretty good idea what the breakdown will be. In any event the
    'distribution should be even and
    'I doubt if many are going to play in manual much.
    'This way you could decide to start over if you feel its way too
    'lopsided.

    PRINT "BB: ", bbcount
    PRINT "BG: ", BgCount
    PRINT "GB: ", GbCount
    PRINT "GG: ", GgCount

'Find out if the user wants to play manual or auto, and begin the game!

GetPlayInput:
INPUT "Play: (A)uto, (M)anual, or (Q)uit: ", PlayResp

SELECT CASE PlayResp
CASE “A”
AutoPlay
CASE “M”
ManualPlay
CASE “Q”
END
CASE “a”
AutoPlay
CASE “m”
ManualPlay
CASE “q”
END

    CASE ELSE
    GOTO GetPlayInput:

END SELECT

SUB AutoPlay
DIM i AS INTEGER, NumberRight AS INTEGER, Guess AS STRING
DIM numberlines AS INTEGER
PRINT “Known”, “Guessed”, “Correct Answer”
PRINT “------------------------------------------”

FOR i = 1 TO 100
'You can take this part out or comment it if you just want to run the program
'a bunch of times without a screen pause
IF numberlines = 20 THEN
PRINT “Press a key to continue…”
DO
LOOP UNTIL INKEY$ <> “”
numberlines = 0
END IF

IF array1(i) = “G” THEN Guess = “B”
IF array1(i) = “B” THEN Guess = “G”
IF Guess = array2(i) THEN NumberRight = NumberRight + 1
PRINT array1(i), Guess, array2(i)
numberlines = numberlines + 1
NEXT i

PRINT "I got “; NumberRight; " correct!”

END SUB

SUB ManualPlay
PRINT “This doesn’t exist. If you really think its needed then”
PRINT “write it yourself or pester me a bunch.”
END SU

Cooper, your program appears to select for the known female, without regard to family, the condition where my brain finally understood the logic you were explaining (I actually was composing a message detailing why I thought it was wrong when its truth sunk in, so I had to rewrite as I was going along). Thus I’m not surprised by the outcome of your program. However, as I said before, the original answer isn’t wrong either, if the initial conditions are specified slightly differently.

Lets compare two different scenarios (and assume for the sake of the illustration that people actually answer instead of fleeing or calling the cops)

Scenario 1- stop adults on the street and ask “are you the parent of two, and only two, children, and is at least one of them a girl?” For those who say “Yes”, then 2 out of 3 times their other child will be a boy.

Scenario 2- stop females on the street and ask “do you have only one sibling?” For those who answer “Yes”, then half the time the sibling will be a sister.

The difference between the two scenarios is that in the second one, the families with two girls, while only a third of the pool, have twice the chance of having a child stopped as either of the boy/girl or girl/boy family groups have.

You are close, but you are still not there. My program emulates the first example. It has a family (pair) of children, for which it reveals one of the pairs. This is the same as finding a person with two children, and asking them the gender of one of their children (asking whether one is a girl or one is a boy makes no difference, the principle is the same). The computer then chooses the opposite sex for the other pair. It is right 1/2 the time. I think you’ll have it soon.

Cooper,

you said

I don’t think anyone is disputing the logic of that- it is that when you systematically eliminate one group of parents (either those of 2 boys or those of 2 girls) and then ask the parents remaining that the 2 out of 3 bias for the other gender will occur. And putting it in those terms should make it clear why that must be so- one couldn’t expect a 50-50 breakdown from a group which results from selectively excluding cases from only one gender.

I very stupidly said

Drat! My brain must be cramping up from all the unaccustomed exercise it’s getting :slight_smile:

My conclusion is still true, but wording and attempted logic really sucked on that last post. I got the bias thing backwards there, but the point remains that excluding one, and only one set of same gender families will preclude a 50-50 split.

Right, but my point is that you cannot exclude only one family. Whenever you learn the gender of a child, you are excluding two families - the two gender family of opposite gender and one of the split gender families.

If you are told the gender of A is female (it doesn’t matter whether you are told the child’s name is A) you cannot have the family where A is a Male left as an option.

Ah, Cooper, you’ve got a bug: the original question specifically states that there’s at least one daughter, but you still aren’t removing the Bb pairs from your list of families!

It doesn’t take a chicken baron to see that without that critical point, anyone should expect to do no better than chance.

Yoop:
First, I am eliminating the BB (or GG) option immediately.

That is not the point. It doesn’t matter whether you say there is one daughter, or say there is one son. It doesn’t matter when you find out there is a daughter; it doesn’t matter whether you ask, are told, or meet her. Either way, you immediately eliminate two options: the Bb option, and one of the Bg options. As I have said now three times, it matters not which Bg option you decide to eliminate, one absolutely MUST go - the easiest way to see this is to use the names and the chart. Since the names and charts are completely arbitrary, you can arbitrarily decide to eliminate either of the mixed options.

Really, this is surprising to me. It surprises me that anyone could think you can use what is not even argued to be a relevant piece of information in a decision making process and in any way affect your chances of making a correct determination. This has nothing whatever to do with the Monty Hall situation - in which case Monty has more information than you and is in fact revealing more information.

But Cooper, what about when I tell you about child B?

In your grid from 12/29 7:35pm, if I want to talk about a girl, I certainly have no choice but to tell you about child B in case #4. And of course if there are two girls I can tell you about whichever of A or B I prefer.

Cooper, I certainly don’t have to eliminate one of them! You tell me that “one child is a girl”. Is there a girl in Bb? No, so it’s gone. Is there a girl in Gg? Yes, so I can’t eliminate it. Is there a girl in Bg? Yes, so I can’t eliminate it. Is there a girl in Gb? Yes, so I can’t eliminate it.

I don’t need to entertain any assumptions about which child is which, or which possible girl you have told me about, or Monty’s possible motives, or the temperature of tea in Sumatra. I just need to ask “Is there a girl in this combination?” And there’s no way I can ask that question and eliminate either Bg or Gb.

Yoop: You cannot hold both Gb and Bg without being willing to relinquish one of them when it is known NOT to be true. When you are told “I have a girl child” you are being told of a SPECIFIC child which is a girl, it is either A or B.

This is absolutely meaningless. I mean, lets say a woman tells you she has two children, Trix and Bix. For Trix and Bix, there are four combinations:

( ) Trix Bix
(1) B B
(2) G G
(3) B G
(4) G B

Now, the first two we agree on. Here is what you say though. You say that if this woman tells you that Bix is a Girl, that you cannot eliminate option 4.

Ok, you disagree.

Now lets say the woman doesn’t tell you their names. But it happens that Bix is the only girl. She tells you she has a girl. You don’t really know that you have to eliminate 4 - but you have. 4 is no longer a valid option, and it affects your odds the same way whether you know it or not. Just like when you play a rigged video poker machine, even though the odds are worse than you think they are, you are still losing money hand over fist. So if you are smart, you will eliminate 3 or 4 (it doesn’t matter which you think of, your odds WILL be altered by that much)and maybe the one eyed jacks won’t make you take out a second mortage this trip.

But enough about this. If you don’t understand this, then tell me why my program does not represent this situation appropriately. Copy it, paste it, run it. Step through it in debug. Find out whats wrong with it. If you cannot do tell me whats wrong with it, you will have to concede that the empiricle evidence it presents is more relevant than any logic that we cannot agree on.

Okay kids - go have a piece of rum cake and give your brains a rest.

PRECISELY! It is either A or B. I do not know which one! So I must include all possible combinations where either A is a girl or B is a girl when I make my guess. I can’t just say “I will assume that B is the girl, so I must eliminate one of these mixed-gender choices,” regardless of whether or not B is a girl. Why is this such a difficult concept?

Because, as I said before, you didn’t get rid of families with the “B B” choice that cannot happen when you are told one of the children is a girl. I’m in Linux at the moment, but if you want help to patch that thing, I’ll reboot for you and make the patch.

Ok, I will try one more time. Then I’m with JillGat.

This is so wrong I can’t believe you don’t see it. Odds have nothing to do with what you believe or know about a situation. If you are playing three card shuffle, no matter how firmly you believe the Ace is still on the table it is NOT, and your odds of finding it are zero. Since you know it is A or B, you must adjust your odds accordingly. End of story.

I’m not sure what you want here. Of course if one of the children is a girl, there is no BB choice. If you want the program to only generate families that have a girl, and simply tell you that they have a girl, I would be willing to do this. Is this what you want?

Odds do have to do with what you know about the situation, because the knowledge can change which odds you are calculating. To change the example a little, suppose you were planning to have two children, but didn’t have any yet, and wanted to figure the chances of having a boy and a girl. There would be a 25% chance of two girls, a 25% chance of two boys and a 50% chance of a boy and a girl. Suppose you already had one girl.The odds of having a boy and a girl are still 50%, but now the odds of having two girls are also 50%.In the second case, the chances actually being calculated are the sex of the second child (50/50) since the first is a given and has a probability of 1

This isn’t just a change in knowledge, this is a change in the reality of the circumstances. What you are trying to find out by gaining knowledge is what the real odds of something happening are. When just guessing about an existing reality however, what you want to do is build a set of odds that most completely mimics how that reality came to be. Other than that, I agree with everything you said.

Everyone understands that this is true - can anyone tell me how its different than just finding out a person has two children and one girl?