I have a question regarding binomial distribution while I was reading this question https://stats.stackexchange.com/questions/400294/confusion-with-simple-binomial-distribution-example
Assuming, the probability of a boy or a girl being born is equal, Out of 44 births in a hospital, will the probability that atmost 21 babies will have the same sex is 1.0. Is this possible to prove this with binomial distribution logic?
I ran the below query in numpy python.
import numpy as np
print(sum(np.random.binomial(44, 0.5, 100000)>=21)/100000)
# the output I got is --> 0.67375
if the output is the probability of boy being born then we have to add for the girl as well, then the probability exceeds 1.0 but also for we have to subtract the probability when we compute for 22 babies as in this case if 22 are boys so will 22 be girls and hence we do not have to double this probability, so (.67375 + .67375 - .1209 ) but still it exceeds 1.0 .
Edit:
One Approach is to prove it as below. Is below assumption correct?
P(number of babies with same sex <=21) = P(number of babies with same sex ==22) + 2* P(number of babies with same sex >=23)