6 ms·
Do men or women have more brothers?
- tlrobinson 10y ago> I think women have more as no man can be his own brother The obvious rebuttal: no woman can be her own brother either.
- deleted 10y ago[deleted]
- mudbungie 10y agoI chose to answer the question empirically. http://pastebin.com/1g1bAEPt http://pastebin.com/1g1bAEPt Turns out it's equal.
- micheljansen 10y agoWhile that's a nice way to approach a mathematical problem, it does not take into account the social aspects of the problem. For example, it used to be (and perhaps still is?) quite common for families to aspire to have a boy and therefore have another child when they have a girl, but not when they have a boy. Interestingly, these sort of things are much easier to model empirically the way you did (all you would need is a small tweak to the "haveAKid" condition in the while loop around line 35), whereas the math gets pretty complicated fast.
- dhimes 10y agoWell, it was posted in probability and not is some social science board. So I thought it was safe to assume a purely mathematical question. Not that I can answer it...
- mudbungie 10y agoYeah, I wrote that after staring at it for a few minutes, and giving up any pretense that I could model it with confidence.
- oh_sigh 10y agoSocial and biological aspects. Assume there may be some genetic factor which makes it impossible(or even just less equal-odds) for a pair to produce a female, or male. If that's the case, men will on average have more brothers than women do.
- sp332 10y agoI think you forgot to put quotes around "Girl" on line 46. Edit: Actually I'm not sure what the problem is but I'm getting 0 girls and a divide-by-0 error. Edit2: I don't remember why I was getting all girls, but the other issue was integer division. If boybrothers/boys truncates to 0, then (girlbrothers/girls)/(boybrothers/boys) will divide by 0.
- mudbungie 10y agoActually, line 46 is referencing the class Girl, so you wouldn't want quotes. Technically, you're supposed to use try/except duck-typing in Python, but I often find that clearer code comes out of assertions where you literally check the type of an object instead of handling errors. This was no exception. (Sorry, bad pun) You might try throwing in a random seed. I just trusted that my system would iterate enough that it wouldn't matter, but if you're getting all boys (I'm not sure that's the case, but you said that you're getting 0 girls...), it could be that for whatever reason, the system might not be advancing the seed. Try inserting the following two lines immediately after import random: from datetime import datetime random.seed(datetime.now())
- kqr 10y agoRun it in Python 3.
- sp332 10y agoYeah in hindsight that was pretty obvious. I guess the real bug was leaving off the #! line :)
- kqr 10y agoI'm surprised you managed to make it that complicated! http://pastebin.com/fck8qkMc http://pastebin.com/fck8qkMc
- mudbungie 10y agoI like your solution! Good use of iter(). You actually bring up an interesting question of design philosophies. I thought that the script that I posted was extremely explicit, and therefore clear. Yours is far more terse, and implicit, which means that there's less to understand, but there is some onus on the reader to decode what is happening. I'm not sure which is better, as a policy. Obviously, solving problems with fewer lines is desirable, but it's also good to make solutions that are intrinsically obvious.
- kqr 10y agoIt is as they say: every problem can be solved with an additional level of indirection... except the problem of too many levels of indirection.
- serge2k 10y agoClassic stack overflow, top answer is a giant mass of "look how awesome I am!" sensible answer is 3 down with half as many upvotes.
- get2zpointer 10y agoWhy is three better? In any family with k brothers, each male will have k-1 brothers, while each female (if any exist) will have k brothers. So the number of brothers in S(x) is gender dependent, despite the the third answer's claim that it isn't.
- serge2k 10y ago> Why is three better? Because you're wrong.
- hinkley 10y agoThat's one of my productivity secrets. Always read the top 4 answers before deciding on a course. Answer #3 is right far too often for my liking. And sometimes answer #4 brings up corner cases the others missed.
- stcredzero 10y agoI think the above structure is eerily reflected in large corporations and in government. The actual work/know-how resides in tier 3 and 4, with the top two tiers actually just being better at politics and self promotion.
- deleted 10y ago[deleted]
- gruntled 10y agoGlad I scrolled down far enough to find this comment
- oh_sigh 10y ago
- jakobegger 10y agoWhat a great example of a seemingly simple question that can't be answered. The question sounds like an elegant and abstract question straight out of a mathematical textbook, but to answer it you need to start making assumptions about the the distribution of family sizes, which leads you to family planning and cultural differences. There is no way to solve this problem on a napkin. Why does everyone try to solve this problem from first principles? The best way to solve this problem would be to look at actual statistics! So now I wonder: Is there any publicly available census data that's detailed enough to answer this question? Or are there any public genealogical databases that might be helpful in answering this?
- acbabis 10y ago> Why does everyone try to solve this problem from first principles? Trying to solve the problem from first principles is probably how a lot of the posters came to the conclusion that it wasn't possible. If the problem were possible to solve from first principles, it would have been a waste of time to find/create data, so trying to solve it from first principles is the correct approach given no prior knowledge of the answer.
- ewjordan 10y agoCome on now - thought experiments about the sex of children always ignore the real world complications that make them different from a coin flip (stopping conditions, genetic predisposition, environmental effects, etc.). And after making those standard thought experiment assumptions, the problem is 100% napkin-worthy.
- paulmd 10y agoSeems like a straightforward Gambler's Fallacy situation. Assuming the chances of each sex are independent and equally probable, then each subsequent child has a 50% chance of each sex. Your previous streak is irrelevant (it doesn't matter whether you're male or female), the chance of having a brother is equal. As the number of families approaches infinity the number of brothers will even out. Or to rephrase the question - after flipping a coin and getting 50 heads in a row, what's the chance of the 51st coin coming up heads? (answer: 50%) Now in reality the chances of each sex may not be equal - some people have a genetic predisposition to have more sons than daughters or vice versa. And of course there's family planning and so on that may artificially alter the number of brothers/sisters (eg to carry on the fmaily name). https://www.sciencedaily.com/releases/2008/12/081211121835.htm https://www.sciencedaily.com/releases/2008/12/081211121835.h...
- jakobegger 10y agoMany people really want either a son or a daughter. So they'll keep trying until it works. An acquaintance of mine had four sons before the fifth one finally was a daughter. I'm pretty sure that effect is a lot stronger than any genetic predispositions.
- tracker1 10y agoMy mom was one of four daughters (no sons), their mom was one of three daughters (no sons), two of my cousins only have girls, and my sister only has girls... my brother is the only one of myself and cousins that have any sons.
- squidfood 10y agoActually, if everyone has babies of sex A until you have a baby of sex B, you get a 50/50 mix. - Half the parents will have an only child of sex B. - One quarter will have one A, one B. - One eighth will have A, A, B. - One sixteenth A,A,A,B. This converges on 50/50!
- xadhominemx 10y ago
- deleted 10y ago[deleted]
- rcar 10y agoWith the assumptions that 1) boy/girl is always random but 50/50, and 2) people are choosing to have 1-10 kids ahead of time and going for it (that's how people plan their families, right?), girls do have very slightly more brothers than boys. The notebook below shows a simulation of 50k towns of 100 families. It also holds for different max numbers of children and more families. https://gist.github.com/rcarneva/7baac666bd65f487df73378a90c0d0b3 https://gist.github.com/rcarneva/7baac666bd65f487df73378a90c...
- kbenson 10y ago> that's how people plan their families, right? That's probably how they begin planning them, but plans change. Also, there's likely quite a few unintended births. Or, the alternative reply, if you prefer: You sarcasm is far too understated to do well on a forum like this. ;)
- deleted 10y ago[deleted]
- waqf 10y agoNice, it took me a while to find the fallacy. (I really hope you did that deliberately, it's masterly.) What you have done is a variant of the observation that within any family the sisters have more brothers than the boys, except that you averaged over 100 families to make the effect more subtle. But if you make the towns larger, the discrepancy will disappear (for example at 100 towns of 50k families I would expect it to be lost in the noise).
- deleted 10y ago[deleted]
- optimuspaul 10y agomy favorite... "it's unclear whether the question even makes sense"
- PascLeRasc 10y agoI've often wondered if a certain restaurants is has more groups or individuals dining - this seems pretty similar.
- millstone 10y agoThe question was phrased ambiguously as "do men or women have more brothers." Here's three possible interpretations. One interpretation is "if I am the last born (or some other gender-neutral specifier), do I have more brothers if I am a man or a woman?" As paulmd answers, the chances are even. But we can also interpret it at the aggregate level. Say we have a family with M men and W women, and we decide to count brothers by polling each person for how many brothers they have, and totaling the result up. If we poll men, we get M(M-1) brothers, and if we poll women, we get MW brothers. The result depends on the distribution, but at the expectation value (M = W), women have more. Same conclusion if we average instead of sum. The third, most natural interpretation is to "deduplicate:" ask each person to list his or her brothers, take the count of the union. This is the familiar sense: we would say there are three Brontë Sisters, even though none of them individually had three sisters. Here the number of brothers equals the number of men, except when then there's only one man; then each women has 1 brother and each man has 0.
- deleted 10y ago[deleted]
- ewjordan 10y agoLike tempestn noted in another comment, enumeration is straightforward for small families, and makes it crystal clear that for any family size N, boys and girls have the same average number of brothers: Gender: B G # brothers: 0 0 B avg # brothers: 0 G avg # brothers: 0 Gender: B,B B,G G,B G,G # brothers: 1,1 0,1 1,0 0,0 B avg # brothers: (2 + 0 + 0) / (2 + 2) = .5 G avg # brothers: (0 + 2 + 0) / (2 + 2) = .5 Gender: B,B,B B,B,G B,G,B G,B,B B,G,G G,B,G G,G,B G,G,G # brothers: 2,2,2 1,1,2 1,2,1 2,1,1 0,1,1 1,0,1 1,1,0 0,0,0 B avg # brothers: (6 + 6 + 0 + 0) / (3 + 6 + 3) = 1 G avg # brothers: (0 + 6 + 6 + 0) / (3 + 6 + 3) = 1 Gender: B,B,B,B B,B,B,G (x4) B,B,G,G (x6) B,G,G,G (x4) G,G,G,G (I collapsed the different permutations here) # brothers: 3,3,3,3 2,2,2,3 1,1,2,2 0,1,1,1 0,0,0,0 B avg # brothers: (12 + 24 + 12 + 0 + 0) / (4 + 12 + 12 + 4) = 48/32 G avg # brothers: (0 + 12 + 24 + 12 + 0) / (4 + 12 + 12 + 4) = 48/32 In a family of N children, both boys and girls will have, on average, (N-1)/2 brothers. Arguments for unequal results are slipping in assumptions that make the observed distribution different from the enumerated one. It's an exercise for the reader to prove that this equality holds for higher N, it's quite easy (the way I formatted the arithmetic shows how to match up terms).
- perilunar 10y agoYou are assuming that for a family of N kids, each permutation is equally likely. As others have pointed out, that is not the case.
- ewjordan 10y agoThis is a late reply because I missed this until now, but if you accept the typical parameters of a statistical thought experiment, you should assume that the permutations are equally likely. The real world nastiness of biology and society fouls that up, but thought experiments like this are never intended to be about not picky real world details, boy/girl is always assumed to be a coin flip. (Not to say that real world results are not interesting as well) And there are a half dozen arguments in this thread that claim to disprove this result even if they accept the coinflip hypothesis - it's really those that I take issue with.
- btilly 10y agoThe real answer is men. By a small amount. First of all as many sources will afirm, for example http://www.pewresearch.org/fact-tank/2013/09/24/the-odds-that-you-will-give-birth-to-a-boy-or-girl-depend-on-where-in-the-world-you-live/ http://www.pewresearch.org/fact-tank/2013/09/24/the-odds-tha..., the ratio of boys to girls at birth is not 50-50 and is not the same across ethnic groups, cultures, etc. With some surprising interaction effects. As soon as you have a mix of families with different sex ratios, the odds of siblings being brothers is now positively correlated (even if ever so little) with your own gender. And the result of that is that the average man has more brothers than the average woman does. However the theoretical effect is very small, and you would need a large random sample to reliably detect its existence.
- tehwalrus 10y agoIf every family only has one child, nobody has any brothers; the results are equal at 0 average brothers. If we take some distribution over size n of the families, say a distribution where family size is either 1 or 2, then the 1-size families don't contribute (they add a zero to the fraction, dragging the probability down in a systematic way equal for both sexes), and the 2-size families have four equally probable outcomes. those four outcomes (bb bg gb gg) yield: two females with no brothers. two females with one brother. two males with no brothers. two males with one brother. i.e. the average numbers of brothers are equal (1/2 for males, and the same for females.) The next layer, where n = 3, there are (ggg ggb gbg bgg gbb bgb bbg bbb) 8 combinations, yielding: three females with no brothers. six females with one brother. three females with two brothers. three males with no brothers. six males with one brother. three males with two brothers. Average number of brothers for females is (30 + 61 + 32) / 12 = 1. Average number of brothers for males is (32 + 61 + 30) / 12 = 1. for n = 4, (gggg gggb ggbg gbgg bggg ggbb gbgb gbbg bggb bgbg bbgg gbbb bgbb bbgb bbbg bbbb), there are 16 combinations (yes, these map to binary integers quite nicely): four females with no brothers. twelve females with one brother. twelve females with two brothers. four females with three brothers. four males with no brothers. twelve males with one brother. twelve males with two brothers. four males with three brothers. Again, this comes out at an even probability - 48 / 32 = 2 brothers, on average. By induction, we can say that for any n, the probabilities are equal (if the probability of male and female children is equal). Thus, for any distribution of family sizes, the probabilities are equal. --- Real world criticisms: * males are more likely (~51% of births naturally, higher thanks to sex-selective terminations in China and India.) Thus, outcomes with more males are more likely, which skews towards male-heavy families. While this means both males and females have more brothers, there are more males to count with higher numbers of brothers, so their average goes higher. * males die more frequently at younger ages, so older people will have fewer brothers than younger people.
- qbrass 10y ago> * males are more likely (~51% of births naturally, higher thanks to sex-selective terminations in China and India.) In China, there may be more sons, but they're not likely to have brothers. > * males die more frequently at younger ages, so older people will have fewer brothers than younger people. Most people still consider dead siblings to be siblings.
- aaron695 10y agoMy understanding is women have a higher death rate than men when young due to when there are limited funds they get worst heath care in families. So brother and sister goes to boy. Brother brother stays brother brother. Not sure on percents though. It might not override the issue of correlated data and selective breeding. (Edit - actually now I try think about it this is wrong since now there's also one less women in the world, the mens average also changes)