The number of girls and the probability of having this number of girls.
0 0.5
1 0.5?
2 0.5?
…… ……
N 0.5 power of N+ 1
…… ……
Multiply the probability of this time by the number of girls, and then add them together. The number of girls born in this family is always 1. (Because of the actual situation, n can't be infinite. If this family has their first child at the age of 18, and one child every year, it is assumed that there are 38 children at the age of 55, that is, the maximum n is 37), as can be seen from the following table.
The number of girls at this time, the probability of 0.5 is the power of the number of girls * the number of girls born in this family corresponding to the probability.
0 0.5 1 0 0
1 0.25 2 0.25 0.25
2 0. 125 3 0.25 0.5
3 0.0625 4 0. 1875 0.6875
4 0.03 125 5 0. 125 0.8 125
5 0.0 15625 6 0.078 125 0.890625
6 0.0078 125 7 0.046875 0.9375
7 0.00390625 8 0.02734375 0.96484375
8 0.00 1953 125 9 0.0 15625 0.98046875
9 0.000976563 10 0.008789063 0.9892578 13
10 0.00048828 1 1 1 0.0048828 13 0.994 140625
1 1 0.000244 14 1 12 0.002685547 0.996826 172
12 0.000 12207 13 0.00 1464844 0.99829 10 16
13 6. 10352 e-05 14 0.0000778366
14 3.05 176 e-05 15 0.000427246 0.9995 1 17 19
15 1.52588 e-05 16 0.000228882 0.9974060 1
16 7.62939 e-06 17 0.000 12207 0.996267 1
17 3.8 147 e-06 18 6.48499 e-05 0.9992752 1
18 1.90735 e-06 19 3.43323 e-05 0.9996 1853
19 9.53674 e-07 20 1.8 1 198 e-05 0.999999997573
20 4.76837 e-07 2 1 9.53674 e-06 0.99985 1
2 1 2.384 19E-07 22 5.00679 e-06 0.9946546538+06
22 1. 19209
23 5.96046 e-08 24 1.3709 1.99985 1
24 2.98023 e-08 25 7. 15256 e-07 0.9999999999
25 1.490 12E-08 26 3.72529 e-07 0.4965365366
26 7.45058 e-09 27 1.937 1.999979 1
27 3.72529 e-09 28 1.00583 e-07 0.9999589989
28 1.86265 e-09 29 5.2 154 1E-08 0.999999444
29 9.3 1323 e- 10 30 2.70084 e-08 0.99997 1
30 4.6566 1E- 10 3 1.39698 e-08 0.999999985
3 1 2.3283 1E- 10 32 7.2 1775 e-09 0.9999999995
32 1. 164 15E- 10 33 3.72529 e-09 0.9999999996
33 5.82077 e- 1 1.34 1.92085 e-09
34 2.9 1038 e- 1 1.35 9.8953 e- 10 0.999999999
35 1.455 19E- 1 1.36 5.093 17E- 10 0.9999999999
36 7.27596 e- 12 37 2.6 1934 e- 10 1
37 3.63798 e- 12 38 1.34605 e- 10 1
It can be seen that the expectation of the girls born is also 1, that is, the ratio of male to female is 1: 1.