This is a math problem I came across:
A family has 2 kids. There is an equal probability of (bb, gg, gb, bg). If the first kid is a boy, what is the probability that the other is also a boy?
I tried to solve this using conditional probability.
$$P(\text{other is boy}\mid\text{one is boy}) = \frac{P(\text{other is boy AND one is boy})}{P(\text{one is boy})}.$$
For the numerator, the only case where both conditions are satisfied is (bb):
$$P(\text{other is boy AND one is boy}) = P(\text{bb}) = \frac{1}{4}.$$
For the denominator, “one is boy” includes cases (bb), (bg), and (gb):
$$P(\text{one is boy}) = P(\text{bb}) + P(\text{bg}) + P(\text{gb}) = \frac{1}{4} + \frac{1}{4} + \frac{1}{4} = \frac{3}{4}.$$
Thus, the final answer is: $$P(\text{other is boy}\mid\text{one is boy}) = \frac{\frac{1}{4}}{\frac{3}{4}} = \frac{1}{3}.$$
I am having trouble accepting that this is the answer! I really thought the final answer should be 0.5!
I tried to write a computer simulation and got the same answer:
set.seed(123)
n <- 1000000
families <- matrix(sample(c(0, 1), n*2, replace = TRUE), ncol = 2)
at_least_one_boy <- families[families[,1] == 1 | families[,2] == 1, ]
both_boys <- families[families[,1] == 1 & families[,2] == 1, ]
probability <- nrow(both_boys) / nrow(at_least_one_boy)
> probability
[1] 0.3344364
Is this really correct?