4 ms·
If anyone is unsure of the truth of the parent post (like I was), I built a simple simulator in Python to test it for myself [0] boys = 100000 gi
by a_conservative 5y ago
If anyone is unsure of the truth of the parent post (like I was), I built a simple simulator in Python to test it for myself [0]
boys = 100000 girls 99350
boys = 100000 girls 100333
boys = 100000 girls 101195
[0] https://pastebin.com/Et5CU3n0 https://pastebin.com/Et5CU3n0
- nightcracker 5y agoYou simulated the limiting case, where you don't stop having babies until you get a boy. That's (obviously) not realistic as we have a finite lifespan and fertility, but note that the expectation still holds. In this process you will always get 1 boy, obviously. But you have a (1/2)^k * (1/2) chance of getting k girls before your first boy. Thus the expected number of girls is Sum[k * (1/2)^k * (1/2), k, 0, inf] which is 1: https://www.wolframalpha.com/input/?i=Sum%5Bk+*+%281%2F2%29%5Ek+*+%281%2F2%29%2C+k%2C+0%2C+inf%5D https://www.wolframalpha.com/input/?i=Sum%5Bk+*+%281%2F2%29%... .
- a_conservative 5y agoExcellent point! I updated it to make the number of births per family a parameter. It's still an approximation of reality of course. Here are the results when the number of max births per family is dropped to 2: boys = 74861 girls 75166 boys = 74752 girls 75464 boys = 75047 girls 74933