Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A couple gives birth to a girl with probability $p$, a boy with probability $q=1-p$.
Let $N$ be the number of children needed so that at least both a girl and a boy are born.
What is the distribution of $N$?

For $$ P(N=k), k \ge 2, $$ two children should be picked such that one is girl and one is boy, so $$ P(N=k)={k \choose 2} pq. $$ I feel this is not correct.

share|cite|improve this question
This is not correct. The situation you want is for the first $k-1 \ge 1$ children to be one gender, and the $k$-th child to be the other. This is just $P[N=k]=p^{k-1}q + q^{k-1}p$ for $k\ge 2$. You should verify that $\sum_{k=2}^{\infty} P[N=k]=1$. – mjqxxxx Dec 27 '12 at 22:16
And take care, $P(N=1)=P(N=0)=0$. Don't skip that the condition that it takes a minimum of two kids. @mjqxxxx – Thomas Andrews Dec 27 '12 at 22:17
In particular, the formula $\binom k 2 pq$ is unbounded - as $k$ gets larger, so does the probability. In particular, you can get $$\binom k 2 pq>1$$ – Thomas Andrews Dec 27 '12 at 22:19
The probability that there are k girls is $p^k$ isn’t the possibility for any N that there is at least one boy and one girl equal to $1-(p^N+q^N)$?? – Carry on Smiling Dec 27 '12 at 22:21
What does P(N=k) mean? – Carry on Smiling Dec 27 '12 at 22:32
up vote 1 down vote accepted

To expand on the question a bit, let $N$ be a random variable equal to the number of children at which you first have children of both genders. This takes on a particular value $k\ge 2$ when the first $k-1$ children are girls and $k$-th is a boy, or vice versa. The distribution is therefore $$ P[N=k]=p^{k-1}q+pq^{k-1} $$ for $k\ge 2$. The probability that you have children of both genders by the time you have $k$ children is $$ P[N\le k]=\sum_{i=2}^{k}\left(p^{i-1}q+pq^{i-1}\right)=q\frac{p-p^k}{1-p}+p\frac{q-q^{k}}{1-q}=1-p^k-q^k, $$ using the fact that $p+q=1$. This approaches $1$ as $k\rightarrow\infty$, as it should, since you will eventually have both boys and girls, a.s. (that is, with probability $1$).

share|cite|improve this answer

Assuming you have $k>0$ children, the probability that all the babies are girls is $p^k$. The probability that all the babies are boys is always $(1-p)^k$. Otherwise, you have both genders.

Therefore, the probability to have both genders with $k$ children is $$1-p^k-(1-p)^k$$

Specifically, for any number of chilren, there's always a finite probability that they'll all be of the same gender, and therefore there's no such $N$.

share|cite|improve this answer
(1) Take care when $k=0$. (2) What question are you answering? The current one asks for a "distribution" of $N$. (I believe this question needs further clarification in order for the meaning of this request to be properly understood.) – whuber Dec 27 '12 at 22:26
if $k=0$ then clearly yuo don't have both genders... – yohBS Dec 27 '12 at 22:28
Right, but your formula gives a "probability" of $-1$ in the case $k=0$, whereas it should be $0$. – whuber Dec 27 '12 at 22:29
OK. fixed. Thanks. – yohBS Dec 27 '12 at 22:29
@yohBS I'm also puzzled by the wording of the question, and I can't explain how to define $N$. However, mjqxxxx pointed that your formula is $P(N \le k)$, which seems true as $1-p^k-q^k \to 1$ as $k\to \infty$. – Nicolas Essis-Breton Dec 28 '12 at 13:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.