Here is a simplified example of calculating probability when there is a 50% chance of an outcome. This puts to good use the binomial distribution.
# chance of having at least 7 girls out of 8 children
cumulative probability function:
dbinom(7, size=8, p=0.5)
# 3.1%