Probability of at least one boy and one girl

expected valueprobabilityprobability distributions

Assume that the probability of a new born child being a boy is 1-p and the probability of being a girl is p. Assume that the sex of a newborn child is independent of the sex of previous children (if any) with the same parents.

A couple with those probabilities of having a boy or girl decides to continue having children until they have at least one child of each sex. What is the distribution of the number of children,X, the couple must have for this to occur and its expected value.

I found that P(X)=(1-p)^(x-1) *p +(p)^(x-1) *(1-p) and that E(X)= 1/(1-p) + 1/p .

Can anyone confirm whether or not this is correct?

If it is incorrect, could you please explain why?

Best Answer

The distribution is correct but the expected value is not.

I think it is simpler to approach this by noting that you expect it to take $\frac 1p$ tries for a girl and $\frac 1{1-p}$ for a boy so the expected number of times to get one of each is $$E=p\times \left(1+\frac 1{1-p}\right)+(1-p)\times \left(1+\frac 1p\right)=\boxed {\frac {p^2-p+1}{p\,(1-p)}}$$

We remark that, for $p=\frac 12$, this yields $E=\frac {3/4}{1/4}=3$, which is easily seen to be correct (after the first child, you expect it to take two tries to get the opposite gender). The formula provided by the OP gives $2$, so presumably there was an error in summing the infinite series. Indeed, the infinite series is a bit messy, which is a good reason for looking for alternate methods of solution.

Related Question