• + 0 comments

    Plug x = 3, 4, 5 and 6 into the Binomial Distribution equation to find the proportion of families with 3, 4, 5 and 6 boys respectively and sum them up.

    import math
    boys = 1.09/2.09
    girls = 1/2.09
    ans = 0
    for x in range(3, 7):
        ans += math.comb(6, x)*boys**x*girls**(6-x)
    print(round(ans, 3))