Riddle Me This, Batman!

Pages

AuthorTopic: Riddle Me This, Batman!
Infiltrator
Member # 3441
Profile Homepage #50
I'm guessing something funny happens when you calculate the average payout.

2^0/2^1+2^1/2^2+2^2/2^3...2^(n-1)/2^n

cancel the exponents in each term and you get:

n/2

take the limit as n approaches infinity and you realize the average payout is infinite.

Like Alorael, I wouldn't wager much either.

--------------------
"As our circle of knowledge expands, so does the circumference of darkness surrounding it." --Albert Einstein
--------------------
Posts: 536 | Registered: Sunday, September 7 2003 07:00
Board Administrator
Member # 1
Profile Homepage #51
The Shaw baby thing threw me off for a bit until I sat down with a paper and pencil. Looks to me like if every family had babies until they had a boy and then stopped, you'd still have equal boys and girls. The reason for this is that any given family might have a string of girls, but can only have one boy.

This still holds if the family size is arbitrarily capped at n children. (i.e. if you get n girls, you stop.)

Shaw was awesome. I'm gonna see Heartbreak House on Saturday. Supposed to be a good production.

- Jeff Vogel

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00
Electric Sheep One
Member # 3431
Profile #52
That is indeed the easy answer. If every birth gives equal chances for girls and boys, no rule for deciding when to try another birth can change the odds. Alorael, do your infinite sums again. I might confess that I didn't see it so well the first time I heard it, myself. Maybe I had a hunch even then about the hard answer. Or maybe I was kind of dumb as a beginning grad student, and slowly got somewhat better.

Thuryl has the right idea for the hard answer.

[ Tuesday, August 15, 2006 13:14: Message edited by: Student of Trinity ]

--------------------
We're not doing cool. We're doing pretty.
Posts: 3335 | Registered: Thursday, September 4 2003 07:00
Law Bringer
Member # 335
Profile Homepage #53
I missed the first statement of the question and addressed the not quite identical restatement. Stopping at boys gives you more sisters and fewer brothers, but you still have gender balance.

—Alorael, who is still looking for a casino that will allow him an infinite number of chances with the coin toss and a bank that will loan him an infinite amount of cash. No luck so far.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Agent
Member # 2820
Profile #54
It seems that in a purely statistical sense -- disregarding the possibility of death, assuming that all families stop after having a son, and that a family can have as many children as they want -- there would be more girls than boys in the end. However, if there were a cap n on the number of total children, as there would be in real life, then there would be no statistical skew if n were sufficiently small.

EDIT: I actually did the series math and I recant my statement. Now I think there are always more boys for all natural n.

[ Tuesday, August 15, 2006 16:43: Message edited by: Garrison ]

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Law Bringer
Member # 335
Profile Homepage #55
Actually, for any n up to and including the limit as n approaches infinity, the ratio is still perfectly balanced.

—Alorael, who isn't quite sure how to go about accounting for the fact that most families stop at a certain arbitrary number of children but that there's no hard cap at n. [Edit: This is a question of how to approach the math in a more complicated case. In this case it is 50-50 no matter what you do.]

[ Tuesday, August 15, 2006 22:58: Message edited by: Spaghetti is a toy. ]
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Triad Mage
Member # 7
Profile Homepage #56
If you assume that each family has another stopping point besides finally getting a boy, then there will be more girls.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Board Administrator
Member # 1
Profile Homepage #57
No matter what rule you come up with for how many times you flip the coin, it'll still be 50/50. And, as before, if you don't believe me, try it yourself. Coin, paper, pencil, and your new rule. Try it out for a while, write B for boy and G for girl, look at your paper, and if you carry it out for long enough, you'll see yourself floating pretty close to 50/50.

(Ideally, you'd do this with a computer program and have it run for a few hundred thousand families.)

- Jeff Vogel

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00
Agent
Member # 2820
Profile #58
My reasoning would be more clear if I had bothered to edit my entire post after doing the quick math.

I have not come to a different conclusion than you, Alo, because my calculations do tend toward a 1:1 ratio between boys and girls. However, I believe that for a statistically perfect balance, the number of families must be infinite; otherwise, the boys will be in majority more often.

As a quick example, if there was only one family, then these are the situations, assuming every family stops after having exactly 1 male:

More Males:
M: 50%

Tie:
FM: 25%

More Females:
F...M: 25%

If there is any confusion about why I think there need to be infinite families, I could always present the formulas up for public scrutiny.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Post Navel Trauma ^_^
Member # 67
Profile Homepage #59
Males and females come out equal even if you limit the family size. For small numbers, it's easy to calculate it by brute force. For larger numbers:

It's obvious that if you limit it to one child then the sex ratio will be equal, because the rule "have on, then stop" is the same for each sex.

Suppose the sex ratio is the same if you limit the size to n. If you then increase the limit to n+1, the only case that changes is the FF..n..FF one, which will have one additional child. But that child is equally likely to be male as female, so the ratio is still balanced.

Actually, the whole thing is a lot simpler: For each birth, boys and girls are equally likely, and so long as you aren't selectively killing anyone then the overall birth ratio must be even too.

--------------------
Barcoorah: I even did it to a big dorset ram.

desperance.net - Don't follow this link
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
Board Administrator
Member # 1
Profile Homepage #60
OK. Here is a real explanation for why the proportions will be 50/50 after a huge number of coin flips, no matter what rule you come up with to end with more heads in the long run.

Suppose I come up with a rule for how many times to flip the coin. (Maybe I flip until I get heads. Or I flip until I get 2 heads. Or any other rule you care to name, with the intent of ending up with more heads in the long run.)

I flip the coin until the rule is fulfilled, recording the outcome. Then I start flipping it again until the rule is fulfilled. And I repeat this a huge number of times. (Until I get millions of flips, or whatever you want.)

Now I look at all of the flips I recorded. No matter what rule I was using, I have recorded an enormous number of fair, independent coin flips. The Law of Large numbers say that (with probably approaching 1 as the number of flips increases) the flips will be half heads and half tails.

It doesn't matter what the rule was. In the end, you have a huge pile of independent coin flips. And that is roughly 50/50 heads tails. The key is repeating the same trial with the same stop condition many many times.

I don't really have any interest in writing it out as a formal proof. If you really don't believe it, try it yourself with a coin, paper and pencil. You will soon see, in actual reality, why it is true.

- Jeff Vogel

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00
...b10010b...
Member # 869
Profile Homepage #61
The trick is that for the above argument to hold, the coin flips have to be both fair and independent. The conditions of the problem as stated require the former (at least for the population as a whole), but not the latter. A coin that's turned up heads three times in a row isn't any more likely to turn up heads than tails on the next flip, but a couple that's had three girls in a row may well be more likely to have a girl than a boy as their next child.

To balance this out (and make the overall population odds of a couple's next child being a boy be 50%), a couple that's had three boys in a row would have to be more likely to have another boy than a girl as their next child if they had one, but we don't see those extra boys because couples stop at one boy. Therefore, if couples that have already had a girl have a greater than 50% chance of their next child being a girl as well, and if all couples stop having children if and only if they have had a boy, more girls than boys get born.

The moral of the story is that biology and statistics don't mix. :P

[ Wednesday, August 16, 2006 00:22: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
La Canaliste
Member # 5563
Profile #62
As stated above, each toss of the coin in the puzzle is fair and independent.
Social factors might influence how mant times each couple tosses the coin, which does not affect the outcome in terms of gender balance.
Biological factors such as differences in sperm which affect the gender balance in families in real life are discounted in the problem.
The coin has no memory, no matter how many times it is tossed!

--------------------
I am a mater of time and how .

Deep down, you know you should have voted for Alcritas!
Posts: 387 | Registered: Tuesday, March 1 2005 08:00
...b10010b...
Member # 869
Profile Homepage #63
quote:
Originally written by saunders:

Biological factors such as differences in sperm which affect the gender balance in families in real life are discounted in the problem.
The coin has no memory, no matter how many times it is tossed!

Certainly, they have to be discounted for the "correct" solution to be correct. But the problem as stated doesn't say they are, which was, I think, SoT's point. :P

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Electric Sheep One
Member # 3431
Profile #64
Right. You could have average probabilities equal (in the sense that I had in mind) if half of the families always had boys, and half always had girls. Then if nobody cared about the sex of their children there would be equal numbers of each; but if everybody wants one boy, you get half the families with one son and the other half with huge numbers of daughters, for a whopping gender imbalance.

I think Shaw was kind of a loon, and I don't really know whether he ever propounded this theory. But it goes to show something, I figure. Maybe that there's often a fine line between idealized model and straw man.

--------------------
We're not doing cool. We're doing pretty.
Posts: 3335 | Registered: Thursday, September 4 2003 07:00
Agent
Member # 2820
Profile #65
The ratio does always tend to 1:1; however, I would still like for someone else to help confirm for me that the number of families is important. I still doubt I should post up my math since it would be difficult to explain, so perhaps someone for whom dealing with a little math is trivial could PM me?

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Law Bringer
Member # 335
Profile Homepage #66
What you've said is that boys are more likely than girls to be in the majority if there's only one family. That's true, because there's a 50% chance of only one boy and a 25% chance of one of each, so girls are only the majority 25% of the time. But majority is not the same as number, because in that 25% girl majority is 12.5% 2 girls, 6.25% 3 girls, 3.125% 4 girls, and so on.

Put another way, if a single family really did skew towards boys, then two single families should still be skewed towards boys because each family is independent, and a thousand families should be a thousand independently skewed, boy-heavy families.

—Alorael, who somehow thinks this relates to the batters. Boys can be in the majority most of the time without actually being more likely overall. This is, in fact, the question he first answered. You'll have more sisters than brothers and more families with excess males than families with excess females, but you will have one boy for every girl.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Board Administrator
Member # 1
Profile Homepage #67
"The ratio does always tend to 1:1; however, I would still like for someone else to help confirm for me that the number of families is important. I still doubt I should post up my math since it would be difficult to explain, so perhaps someone for whom dealing with a little math is trivial could PM me?"

The Law of Large Numbers says that, when you flip a coin a large number of times, you will eventually reach a point (with probability 1) where you get as close as you like to 50% heads.

That's why the number of flips/families is important. In the short run, all kinds of stuff can happen. In the long run, 50/50.

- Jeff Vogel

PS Actually, the Law of Large Numbers is a far more powerful theorem than what I said. But I'm restricting my discussion of its glories to coins/babies.

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00
Lifecrafter
Member # 6388
Profile #68
quote:
Originally written by Khoth:

Another one to think about:
Keep tossing a coin until it comes up tails, then stop. You win $2^(number of heads)
ie your winnings in each case look like:
T : $1
HT: $2
HHT: $4
HHHT: $8
etc...

How much would you be willing to pay to play this game?

However much it takes, assuming an infinite line of credit. I'm bound to make back my losses eventually - assuming I don't die of old age first.

EDIT: There's a difference, of course, between this and something like the slots: assuming an infinite line of credit and an infinite number of bets, I will make a profit, irrespective the investment, because there's no upper bound on the winnnings. On the other hand, on something like the slots I'm bound to lose in the long run.

And this all assumes an infinite line of credit.

If I have a finite line of credit, the largest safe bet is $1.49.

At $1.49, there's a 50% chance of losing money - 49 cents - and a 50% chance of gaining money - at least 51 cents. As the number of attempts progresses towards infinity, so should your winnings as well.

I suppose $1.499 is as safe and larger, but I'm assuming no fractional pennies.

[ Wednesday, August 16, 2006 22:46: Message edited by: The Worst Man Ever ]
Posts: 794 | Registered: Tuesday, October 11 2005 07:00
Agent
Member # 2820
Profile #69
quote:
Originally written by Tursing Slef:

What you've said is that boys are more likely than girls to be in the majority if there's only one family. That's true, because there's a 50% chance of only one boy and a 25% chance of one of each, so girls are only the majority 25% of the time. But majority is not the same as number, because in that 25% girl majority is 12.5% 2 girls, 6.25% 3 girls, 3.125% 4 girls, and so on.

Put another way, if a single family really did skew towards boys, then two single families should still be skewed towards boys because each family is independent, and a thousand families should be a thousand independently skewed, boy-heavy families.

—Alorael, who somehow thinks this relates to the batters. Boys can be in the majority most of the time without actually being more likely overall. This is, in fact, the question he first answered. You'll have more sisters than brothers and more families with excess males than families with excess females, but you will have one boy for every girl.

Ahh, but that is exactly what I am arguing, is it not? Notice that your totaling of the individual results of several families is the same as increasing the number of families to begin with. Thus, the number of families is important, QED. The ratio is not always preserved without an infinite pool of families.

If there were a cap on the number of children a single family could have, there would still be a skew without infinite families.

EDIT: All I ask for is an acknowledgement that the ratio tends toward the answer of 1:1 only as the number of families approaches infinity.

EDIT: I am also arguing this to death because I coded a simulation for this which confirms everything I have been saying.

[ Wednesday, August 16, 2006 21:56: Message edited by: Garrison ]

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Law Bringer
Member # 335
Profile Homepage #70
Except it isn't right. The probability is always 1:1. It doesn't matter if you have one family or one million families. The difference is that the probability is a matter of simple statistics, so the smaller the sample size the greater the possible variation in actual ratio. That does not mean the probability changes.

Here's an analogy using coins. If you flip a coin once there is a 0% chance of getting the expected 1:1 ratio of heads or tails. You'll get only one or only the other. The more times you flip, the closer the observed ratio will be to 1:1. The probability is always 1:1.

Here's the question I tried to ask before: if each family acts independently of the others, and one family is skewed towards boys, how can an infinite number of families cause the skew to disappear? They should all share it.

—Alorael, who would like to know how you set up your simulated families/coin tosses.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
La Canaliste
Member # 5563
Profile #71
quote:
Originally written by Tursing Slef:



—Alorael, who somehow thinks this relates to the batters. Boys can be in the majority most of the time without actually being more likely overall. This is, in fact, the question he first answered. You'll have more sisters than brothers and more families with excess males than families with excess females, but you will have one boy for every girl.

I think Alorael has identified the counter-intuitive problem here. Any one family will have either one son, one son and one daughter, or more daughters than sons. Families with equal gender balance will not affect things either way (one quarter of the families in a large enough population). There will be enough families with one son only (half the families in a large enough population) to compensate for the remainder with an excess of daughters.

Though I pity that population where half the boys are only children, and half the rest are the lastborn in a family of girls. Boy, does that sound like a population where no boy will learn do do his own laundry!

*giggles and runs away from accusations of sexism*

Edit: dratted typos!

[ Thursday, August 17, 2006 05:05: Message edited by: saunders ]

--------------------
I am a mater of time and how .

Deep down, you know you should have voted for Alcritas!
Posts: 387 | Registered: Tuesday, March 1 2005 08:00
Agent
Member # 2820
Profile #72
quote:
Originally written by Tursing Slef:

—Alorael, who would like to know how you set up your simulated families/coin tosses.
Because you asked, I will say that my final function takes two numbers, one for the number of families in each population, and one for how many populations to generate. It does not take the total between populations because, as I stated in my previous post, that would be equivalent to making a single population with more families. You will argue that the actual number of boys and girls is more important, but look at the original question:
quote:

Nevertheless (the theory argues) there end up being more girls born than boys, because many families want to have at least one boy, so they keep having children until they get one, resulting in disproportionately many families with several sisters and one baby brother.

The most important piece of information is how often a gender is in majority. E.g., if girls are proven to be in majority more often, then it does support the premise of original question. It does not matter by how much it exceeds the other side in each trial. If you do not believe me, then try doing the simulated coin tosses/whatever. They should still prove my theory.

By the way, I have tested whether the random number generator in my PE is balanced, and out of 1000000 trials, there were 499374 heads and 500626 tails. I would say that is good enough.

I could E-mail someone either the source code if he knows Scheme or the distribution if I can figure out how to compile it. But that is a last resort.

Regardless, here I present hopefully my last two (and unfortunately most involved) arguments.

Argument 1: Appeal to Probability

As per the original question, the goal is to determine which side will be in majority more often in a given population. I will define a population as a number of families. For each different example of a population, I will present the probability for 1) the boys to be in majority, 2) a tie, and 3) the girls to be in majority. The chance for a tie will be disregarded, and I will present this premise without stated proof.

If the chances for both the boys and the girls to be in majority are equal or sufficiently equal, then there is no skew. In any other case, there must exist a skew. My contention is that there will be a skew unless there are an infinite number of families in the population.

Pop(n) is a population of n families. M is for male/boy and F is for female/girl. The rightmost (last) character in each sequence will be M. Each sequence represents a family. After each product of families is a probability. The combinations are multiplied to represent permutations of the same combination. The probability for the girls is calculated by 1 – boys – ties.

Pop(1)
Boys: 1/2
M: 1/2

Tie: 1/4
FM: 1/4

Girls: 1/4

==========

Pop(2)
Boys: 1/2
M * M: 1/4
(FM * M) * 2: 1/4

Tie: 3/16
FM * FM: 1/16
(FFM * M) * 2: 2/16

Girls: 5/16

==========

Pop(3)
Boys: 1/2
M * M * M: 1/8
(FM * M * M) * 3: 3/16
(FFM * M * M) * 3: 3/32
(FM * FM * M) * 3: 3/32

Tie: 5/32
FM * FM * FM: 1/64
(FFM * FM * M) * 6: 3/32
(FFFM * M * M) * 3: 3/64

Girls: 11/32

==========

I infer from this trend that chances for the boys will remain 50%. The chances for a tie approach 0 as n -> infinity. Consequently, the chances for the girls will approach 50% as well.

Argument 2: Appeal to Something Else

quote:
Originally written by Tursing Slef:

Except it isn't right. The probability is always 1:1. It doesn't matter if you have one family or one million families. The difference is that the probability is a matter of simple statistics, so the smaller the sample size the greater the possible variation in actual ratio. That does not mean the probability changes.

Here's an analogy using coins. If you flip a coin once there is a 0% chance of getting the expected 1:1 ratio of heads or tails. You'll get only one or only the other. The more times you flip, the closer the observed ratio will be to 1:1. The probability is always 1:1.

Here's the question I tried to ask before: if each family acts independently of the others, and one family is skewed towards boys, how can an infinite number of families cause the skew to disappear? They should all share it.

The skew disappears because, by adding together the populations, you create a new population with more families. In that case, the majority is insignificant because the actual numbers are added up, reducing the skew. This is the conclusion of my theory. As you continue the trend, the skew becomes sufficiently small and you have a quasi-balance.

I did the series math and determined that a single family does have an average 1:1 ratio between girls and boys. But an average has no meaning without the infinite number of trials from which to derive it. The majority, as you poignantly pointed out, exists because of the restricted sample size family (like in the above cases in Argument 1). By increasing the sample size, the ratio is brought closer and closer to 1:1. Thus, the number of families is important as my theory set out to establish. Interestingly, though, you are completely right about the shared skew. For any population with a finite number of families, the skew will still mathematically exist.

[ Thursday, August 17, 2006 14:03: Message edited by: Garrison ]

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Law Bringer
Member # 335
Profile Homepage #73
If you are talking only about majority, than we're not disagreeing. I already said that boys are in the majority more often despite being no more prevalent in the overall population. There is a separate but related discussion of gender ratios.

I can't really decipher your appeal to probability, but I think it's a non-issue. What I do think is an issue is another statement:

quote:
I did the series math and determined that a single family does have an average 1:1 ratio between girls and boys. But an average has no meaning without the infinite number of trials from which to derive it.
The average ratio is the probability. The probability is the ratio that you will get from an infinite sample size. The real ratio from any finite sample size may deviate from the probability, but it should deviate in a bell curve with even tails above and below the expected outcome.

—Alorael, who thinks this argument has gone nowhere and requires either an arbitrary end or a third party to make it make senes.
Posts: 14579 | Registered: Saturday, December 1 2001 08:00
Agent
Member # 2820
Profile #74
I have a pretty good feeling about this current post. It should make everything clear.

quote:
Originally written by This Space For Rent:

If you are talking only about majority, than we're not disagreeing. I already said that boys are in the majority more often despite being no more prevalent in the overall population. There is a separate but related discussion of gender ratios.
This might be the root of this argument. I am completely talking in context of the problem as originally stated by Student of Trinity, wherein the probability of majority is the issue at hand.

[quote]I can't really decipher your appeal to probability, but I think it's a non-issue.[/quote]I was using enumeration to prove the trend toward the majority of boys. It is merely a device to aid my argument. If you think, however, that it is either flawed or unclear please tell me. I wouldn't argue with you on any criticism; I just want to make sure I was being clear.

What I do think is an issue is another statement:

quote:
quote:
I did the series math and determined that a single family does have an average 1:1 ratio between girls and boys. But an average has no meaning without the infinite number of trials from which to derive it.
The average ratio is the probability. The probability is the ratio that you will get from an infinite sample size. The real ratio from any finite sample size may deviate from the probability, but it should deviate in a bell curve with even tails above and below the expected outcome.
I had a feeling you see that small liberty I took in wording. I only put it in there as a red herring style argument to the other red herring you threw in earlier about tossing coins. I swear, if you make an accurate simulation of this, you will see what I mean. An infinite number of families is necessary if you are talking about majority.

[quote]—Alorael, who thinks this argument has gone nowhere and requires either an arbitrary end or a third party to make it make senes.[/quote]I am pretty sure we are both right, so to finalize:

1. In terms of ratios, would you agree that the boy to girl ratio tends to 1:1?

2. In terms of majority, would you agree that infinite families are necessary?

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00

Pages