a couple decides to have 3 children . if they succeed in having 4 children and each child is equally likely to be a boy or a girl , what is the probability that they will have exactly 2 girls and 1 boy ?
"sample space = 2 ^ 3 = 8 . favourable events = { bgg } , { bgb } , { bbb } , { ggg } , { gbg } probability = 5 / 8 = 5 / 8 . ans ( d ) ."
subtract(2, multiply(divide(factorial(3), factorial(1)), power(divide(2, 1), 3)))