A family has six children – three boys and three girls. What is the probability that three older children are all girls?
Let’s label the children 1, 2, and 3 as girls and 4, 5, and 6 as boys. The required probability is nothing but:
The permutations for 1, 2, and 3 come up in the first three (any order) / All permutations
3! x 3! / 6! = 6/(6 x 5 x 4) = 1/20 = 0.05
Let’s use brute force and perform an R simulation.
itr <- 1000000
girl <- replicate(itr, {
birth <- sample(seq(1:6), size = 3, replace = FALSE, prob = rep(1/6, 6))
all_girl <- c(1,2,3)
if(all(all_girl %in% birth) == TRUE){
counter <- 1
} else {
counter <- 0
}
})
mean(girl)
0.050108