Solution
One of Each
Show the problem again
A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume each child is independently a boy or a girl with probability 1/2 each, and that there are no multiple births. What is the expected number of children the couple will have? Give an exact number.
Worked solution
The answer is 3. The first child is whatever it is; from then on the couple is waiting for a child of the other sex. Each later child is of the other sex with probability 1/2, so the additional wait is geometric with mean 2. The total is 1 + 2 = 3. Equivalently, P(N = k) = 2 × (1/2)^k for k ≥ 2 (the first k − 1 children share a sex and the k-th differs), and summing k × 2^(1−k) over k ≥ 2 gives 3.
Source: Classic expected-value exercise in wide circulation; no traceable original source. Statement written for AxiomIQ.