TITLE: Boy and girl probability
QUESTION [5 upvotes]: How many births must occur in a family, in order to have one boy and one girl with probability > 80%?

Here is my attempt: If we have n births, all possible arrangements of Bs and Gs (GBGGBBGBG etc) are $2^{n}$. Of those, only one is GGGGG... (only girls) and one is BBBBB... (only boys). All others have both sexes. So in order to find n, we must solve the inequality: $\frac{2^{n} - 2}{2^{n}}\ge 0.80$.

Is this correct? And how do we solve it?
Thank you!

REPLY [3 votes]: Yes, that's a good setup. Another way to see this is to take the complement of the probability of having one boy and one girl, which would be the probability of having no boys (or equivalently all girls) or no girls (or equivalently all boys). This probability would be $$\underbrace{\frac{1}{2^n}}_{P(\text{all boys})} + \underbrace{\frac{1}{2^n}}_{P(\text{all girls})} = \frac{2}{2^n}$$
The actual probability would be $1$ minus this value, or equivalently $$1 - \frac{2}{2^n}$$
You are trying to find the minimum value of $n$ such that this probability is greater than $p=0.8$. This inequality is $$1-\frac{2}{2^n} > p \to \frac{2}{2^n} < 1-p$$
To solve this, multiply by $2^n$ on both sides to get $$2 < (1-p) \cdot 2^n$$
Divide by $0.2$ to get $$\frac{2}{1-p} < 2^n$$
Take the log base 2 to get $$\log_2\left(\frac{2}{1-p}\right) = 1 - \log_2(1-p) < n$$
The LHS is approximately $3.3$ for $p = 0.8$, and since $n$ must be an integer, the minimum value of $n$ is $4$.