This question appeared on Introduction to Probability (by Joe Blitzstein and Jessica Hwang)
A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume they never have twins, that the “trials” are independent with probability $1/2$ of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children?
So the answer and explanation provided in the book are as followed:
Let X be the number of children needed, starting with the 2nd child, to obtain one whose gender is not the same as that of the firstborn. Then $X - 1$ is $Geom(1/2)$, so $E(X) = 2$. This does not include the firstborn, so the expected total number of children is $E(X + 1) = E(X) + 1 = 3$
I have two question regarding this:
- Is my approach for the question also correct? Or it shouldn't be that way?
Let X be the number of children needed, including the firstborn.
Therefore $X - 1 \sim Geom(1/2)$, but there are two possibility (i.e. first child is a boy, first child is a girl)
As a result, $E(X - 1) = 2$ (not sure how to explain this but by Geom(1/2) the expected value should be 1, while there are 2 possibilities so it becomes 2)
Geom(p) didn't include the "success" case, so we compute it back -> $E(X) = 2+1 = 3$
- Is the reason for the question setting X to be "starting from second child" to prevent getting 2 possibilities (like I did) and condition on whatever the first child's gender is. Or if anyway can explain the logic behind the formal answer as I am not really sure how the story goes.
Thanks a lot!
EDIT: suddenly one more approach here (Linearity of expectation), is it also valid?
Expectation of having the first child = 1 (regardless of boy/girl)
Expectation of having a child of a specific gender = 2 (we need a specific gender that is the opposite sex of the first child)
By linearity = 1+2 = 3