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