A royal family has children until it has a boy or until it has three children, whichever comes first.
Assume that each child is a boy with probability 1/2.
Find the expected number of boys in this royal family and the expected number of girls.
We can model this family’s policy as a geometric distribution with p=0.5.
The expected number of boys is equal to 7/8, or p(x <= 3).
The expected number of girls is given by the following set of rules:
p(0) = 1/2 p(1) = 1/4 p(2) = 1/8 p(3) = 1/8
Therefore the total expected number is equal to:
0 * 1/2 + 1 * 1/4 + 2 * 1/8 + 3 * 1/8.
This is equal to 7/8 as well.